3 ms·
This is the function I use to set PATH: function path { if [[ -d "$1" ]] ; then if [[ -z "$PATH" ]] ; then export PATH=$1 else
by krmbzds 8y ago
This is the function I use to set PATH:
function path {
if [[ -d "$1" ]] ; then
if [[ -z "$PATH" ]] ; then
export PATH=$1
else
export PATH=$PATH:$1
fi
fi
}
export PATH=''
path ~/.homebrew/sbin
path ~/.homebrew/bin
path /usr/local/sbin
path /usr/local/bin
path /usr/sbin
path /usr/bin
path /sbin
path /bin
It simplifies the syntax.
I also like to keep vim swaps/backups/history in a centralized place (.vimrc):
set directory=~/.vim/swaps " centralized swaps
set backupdir=~/.vim/backups " centralized backups
set undodir=~/.vim/undo " centralized undo history
I don't like leaving ~clutter in random folders.
I also like to alias sl to ls :)
alias sl='ls'
Other than that, the least you have to configure the better.
You can check my dotfiles here: https://github.com/krmbzds/dotfiles https://github.com/krmbzds/dotfiles