mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-25 12:49:26 +01:00
{bash,zsh}rc: fix $PATH mainly for rbenv
This commit is contained in:
parent
b65b306c9e
commit
22425e5d12
18
rc/bashrc
18
rc/bashrc
@ -210,14 +210,6 @@ TZ=$(date +%Z)
|
||||
# Sets PATH. To add another path, add :</path/to/new/path> to string below.
|
||||
PATH=$HOME/.local/bin:$HOME/bin:$HOME/go/bin:$HOME/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/usr/local/bin:/usr/local/sbin:/usr/local/games:/snap/bin:/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 https://unix.stackexchange.com/a/14896
|
||||
PATH=$(echo "$PATH" | awk -v RS=':' -v ORS=":" '!a[$1]++{if (NR > 1) printf ORS; printf $a[$1]}')
|
||||
|
||||
# Colours to less
|
||||
# Copied from https://nion.modprobe.de/blog/archives/572-less-colors-for-man-pages.html
|
||||
export LESS_TERMCAP_mb=$'\E[01;31m'
|
||||
@ -276,12 +268,17 @@ fi
|
||||
|
||||
# https://github.com/rbenv/rbenv
|
||||
if [ -d ~/.rbenv/bin ]; then
|
||||
PATH="$HOME/.rbenv/bin:$PATH"
|
||||
PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"
|
||||
rbenv init > /dev/null 2>&1
|
||||
# Remember! And verify it before running!
|
||||
# git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
|
||||
fi
|
||||
|
||||
# Add RubyGems to PATH
|
||||
if hash ruby 2> /dev/null; then
|
||||
PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
|
||||
fi
|
||||
|
||||
# https://github.com/pyenv/pyenv
|
||||
if [ -d ~/.pyenv/bin ]; then
|
||||
PATH="$HOME/.pyenv/bin:$PATH"
|
||||
@ -296,6 +293,9 @@ if [ -d ~/.nodenv/bin ]; then
|
||||
# git clone https://github.com/nodenv/node-build.git "$(nodenv root)"/plugins/node-build
|
||||
fi
|
||||
|
||||
# Removes duplicates from $PATH. Copied from https://unix.stackexchange.com/a/14896
|
||||
PATH=$(echo "$PATH" | awk -v RS=':' -v ORS=":" '!a[$1]++{if (NR > 1) printf ORS; printf $a[$1]}')
|
||||
|
||||
##### Aliases RJ706I #####
|
||||
|
||||
# To get sudo work with aliases.
|
||||
|
18
rc/zshrc
18
rc/zshrc
@ -177,14 +177,6 @@ TZ=$(date +%Z)
|
||||
# Sets PATH. To add another path, add :</path/to/new/path> to string below.
|
||||
PATH=$HOME/.local/bin:$HOME/bin:$HOME/go/bin:$HOME/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/usr/local/bin:/usr/local/sbin:/usr/local/games:/snap/bin:/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 https://unix.stackexchange.com/a/14896
|
||||
PATH=$(echo "$PATH" | awk -v RS=':' -v ORS=":" '!a[$1]++{if (NR > 1) printf ORS; printf $a[$1]}')
|
||||
|
||||
# Colours to less
|
||||
# Copied from https://nion.modprobe.de/blog/archives/572-less-colors-for-man-pages.html
|
||||
export LESS_TERMCAP_mb=$'\E[01;31m'
|
||||
@ -242,12 +234,17 @@ fi
|
||||
|
||||
# https://github.com/rbenv/rbenv
|
||||
if [ -d ~/.rbenv/bin ]; then
|
||||
PATH="$HOME/.rbenv/bin:$PATH"
|
||||
PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"
|
||||
rbenv init >/dev/null 2>&1
|
||||
# Remember! And verify it before running!
|
||||
# git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
|
||||
fi
|
||||
|
||||
# Add RubyGems to PATH
|
||||
if hash ruby 2>/dev/null; then
|
||||
PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
|
||||
fi
|
||||
|
||||
# https://github.com/pyenv/pyenv
|
||||
if [ -d ~/.pyenv/bin ]; then
|
||||
PATH="$HOME/.pyenv/bin:$PATH"
|
||||
@ -262,6 +259,9 @@ if [ -d ~/.nodenv/bin ]; then
|
||||
# git clone https://github.com/nodenv/node-build.git "$(nodenv root)"/plugins/node-build
|
||||
fi
|
||||
|
||||
# Removes duplicates from $PATH. Copied from https://unix.stackexchange.com/a/14896
|
||||
PATH=$(echo "$PATH" | awk -v RS=':' -v ORS=":" '!a[$1]++{if (NR > 1) printf ORS; printf $a[$1]}')
|
||||
|
||||
##### Aliases RJ706I #####
|
||||
|
||||
# To get sudo work with aliases.
|
||||
|
Loading…
Reference in New Issue
Block a user