[Fish, Profile] Move custom paths to .profile

This commit is contained in:
Lucien Cartier-Tilet 2022-11-03 12:12:40 +01:00
parent ffd0a3bbeb
commit 6ce7200739
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
2 changed files with 8 additions and 44 deletions

View File

@ -3,8 +3,6 @@ export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share" export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state" export XDG_STATE_HOME="$HOME/.local/state"
export PATH="$HOME/.cargo/bin:$PATH"
export EMAIL="lucien@phundrak.com" export EMAIL="lucien@phundrak.com"
export NAME="Lucien Cartier-Tilet" export NAME="Lucien Cartier-Tilet"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
@ -74,3 +72,11 @@ export QSYS_ROOTDIR="/home/phundrak/.cache/paru/clone/quartus-free/pkg/quartus-f
export XMODIFIERS= export XMODIFIERS=
alias wget="wget --hsts-file${XDG_DATA_HOME}/wget-hsts" alias wget="wget --hsts-file${XDG_DATA_HOME}/wget-hsts"
PATH="/usr/lib/xfce-polkit/:$PATH"
PATH="$HOME/.cabal/bin:$PATH"
PATH="$GEM_HOME/ruby/2.6.0/bin:$PATH"
PATH="$GEM_HOME/ruby/2.6.0/bin:$PATH"
PATH="$GOPATH/bin:$PATH"
PATH="${CARGO_HOME}/bin:$PATH"
PATH="$HOME/.local/bin:$PATH"
export PATH

View File

@ -63,48 +63,6 @@ lets do so.
set -gx PKG_CONFIG_PATH /usr/local/lib/pkgconfig/ $PKG_CONFIG_PATH set -gx PKG_CONFIG_PATH /usr/local/lib/pkgconfig/ $PKG_CONFIG_PATH
#+END_SRC #+END_SRC
** ~$PATH~
:PROPERTIES:
:CUSTOM_ID: Global_variables-$PATH-e1320303
:END:
A variable available with the fish shell is ~fish_user_paths~ which lists custom
paths to binaries specified by the user. Using this variable ensures they are
included in the ~$PATH~ variable only once without the need to set it directly.
For instance, my ~PATH~ variable needs Rusts Cargos binaries, Gos binaries,
my own executables, and some more.
#+NAME: extra-paths
| additional path | what it leads to |
|--------------------------+---------------------------------------------------|
| $HOME/.local/bin | Custom executables, see [[file:bin.org]] |
| $GOPATH/bin | Go binaries and executables |
| $CARGO_HOME/bin | Rust binaries and executables |
| $GEM_HOME/ruby/3.0.0/bin | Ruby 3.0 binaries and executables |
| $GEM_HOME/ruby/2.6.0/bin | Ruby 2.6 binaries and executables |
| $HOME/.cabal/bin | Haskel binaries |
| /usr/lib/xfce-polkit | Path to XFCEs PolKit |
#+NAME: generate-extra-paths
#+BEGIN_SRC emacs-lisp :var paths=extra-paths[,0] :exports none :cache yes
(mapconcat #'identity
paths " \\\n")
#+END_SRC
#+RESULTS[8fe70e73420376a50897de0f9518689ec3088288]: generate-extra-paths
: $HOME/.local/bin \
: $GOPATH/bin \
: $CARGO_HOME/bin \
: $GEM_HOME/ruby/3.0.0/bin \
: $GEM_HOME/ruby/2.6.0/bin \
: $HOME/.cabal/bin \
: /usr/lib/xfce-polkit
So, lets set our user paths:
#+BEGIN_SRC fish :noweb yes
set -g fish_user_paths \
<<generate-extra-paths()>>
#+END_SRC
* Tramp remote access * Tramp remote access
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Tramp_remote_access-72aedec2 :CUSTOM_ID: Tramp_remote_access-72aedec2