mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2025-01-03 16:52:37 +01:00
rc: add RubyGems to $PATH
via https://wiki.archlinux.org/index.php/ruby#RubyGems
This commit is contained in:
parent
e7eb3fcba7
commit
38c0722ba3
@ -189,6 +189,11 @@ fi
|
|||||||
# Sets PATH. To add another path, add :</path/to/new/path> to string below.
|
# Sets PATH. To add another path, add :</path/to/new/path> to string below.
|
||||||
PATH=$HOME/.local/bin:$HOME/.local/sbin:$HOME/.local/games:$HOME/bin:$HOME/sbin:$HOME/games:/usr/local/bin:/usr/local/sbin:/usr/local/games:/usr/bin:/usr/sbin:/usr/games:/bin:/sbin:/games:$PATH
|
PATH=$HOME/.local/bin:$HOME/.local/sbin:$HOME/.local/games:$HOME/bin:$HOME/sbin:$HOME/games:/usr/local/bin:/usr/local/sbin:/usr/local/games:/usr/bin:/usr/sbin:/usr/games:/bin:/sbin:/games:$PATH
|
||||||
|
|
||||||
|
# Add RubyGems to PATH
|
||||||
|
if hash ruby 2>/dev/null; then
|
||||||
|
PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
# Removes duplicates from $PATH. Copied from http://unix.stackexchange.com/a/14896
|
# Removes duplicates from $PATH. Copied from http://unix.stackexchange.com/a/14896
|
||||||
PATH=$(echo "$PATH" | awk -v RS=':' -v ORS=":" '!a[$1]++{if (NR > 1) printf ORS; printf $a[$1]}')
|
PATH=$(echo "$PATH" | awk -v RS=':' -v ORS=":" '!a[$1]++{if (NR > 1) printf ORS; printf $a[$1]}')
|
||||||
|
|
||||||
|
5
rc/zshrc
5
rc/zshrc
@ -133,6 +133,11 @@ fi
|
|||||||
# Sets PATH. To add another path, add :</path/to/new/path> to string below.
|
# Sets PATH. To add another path, add :</path/to/new/path> to string below.
|
||||||
PATH=$HOME/.local/bin:$HOME/.local/sbin:$HOME/.local/games:$HOME/bin:$HOME/sbin:$HOME/games:/usr/local/bin:/usr/local/sbin:/usr/local/games:/usr/bin:/usr/sbin:/usr/games:/bin:/sbin:/games:$PATH
|
PATH=$HOME/.local/bin:$HOME/.local/sbin:$HOME/.local/games:$HOME/bin:$HOME/sbin:$HOME/games:/usr/local/bin:/usr/local/sbin:/usr/local/games:/usr/bin:/usr/sbin:/usr/games:/bin:/sbin:/games:$PATH
|
||||||
|
|
||||||
|
# Add RubyGems to PATH
|
||||||
|
if hash ruby 2>/dev/null; then
|
||||||
|
PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
# Removes duplicates from $PATH. Copied from http://unix.stackexchange.com/a/14896
|
# Removes duplicates from $PATH. Copied from http://unix.stackexchange.com/a/14896
|
||||||
PATH=$(echo "$PATH" | awk -v RS=':' -v ORS=":" '!a[$1]++{if (NR > 1) printf ORS; printf $a[$1]}')
|
PATH=$(echo "$PATH" | awk -v RS=':' -v ORS=":" '!a[$1]++{if (NR > 1) printf ORS; printf $a[$1]}')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user