Don't use which - use command
This commit is contained in:
parent
625212118a
commit
6054672d0e
15
.zshrc
15
.zshrc
@ -23,8 +23,7 @@ if [[ -z "$USER" ]]; then
|
|||||||
export USER
|
export USER
|
||||||
fi
|
fi
|
||||||
|
|
||||||
which go &> /dev/null
|
if [ $(command -v go) ] && [[ -d "$DEVPATH/go" ]]; then
|
||||||
if (( !$? )) && [[ -d "$DEVPATH/go" ]]; then
|
|
||||||
export GOPATH="$DEVPATH/go"
|
export GOPATH="$DEVPATH/go"
|
||||||
export PATH="$GOPATH/bin:$PATH"
|
export PATH="$GOPATH/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
@ -38,15 +37,9 @@ if (( !$? )); then
|
|||||||
eval "$(rbenv init -)"
|
eval "$(rbenv init -)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
which nvim &> /dev/null
|
if [[ $(command -v nvim) ]]; then
|
||||||
neovim="$?"
|
|
||||||
|
|
||||||
which vim &> /dev/null
|
|
||||||
vim="$?"
|
|
||||||
|
|
||||||
if (( !$neovim )); then
|
|
||||||
export EDITOR="nvim"
|
export EDITOR="nvim"
|
||||||
elif (( !$vim )); then
|
elif [ $(command -v vim) ]; then
|
||||||
export EDITOR="vim"
|
export EDITOR="vim"
|
||||||
else
|
else
|
||||||
export EDITOR="vi"
|
export EDITOR="vi"
|
||||||
@ -84,7 +77,7 @@ function weather() {
|
|||||||
curl -sSL "wttr.in/$loc?"
|
curl -sSL "wttr.in/$loc?"
|
||||||
}
|
}
|
||||||
|
|
||||||
alias e="$EDITOR"
|
alias e='$EDITOR'
|
||||||
alias s="du -sh"
|
alias s="du -sh"
|
||||||
|
|
||||||
alias tmux="tmux -2"
|
alias tmux="tmux -2"
|
||||||
|
Loading…
Reference in New Issue
Block a user