Fix _command-exists
This commit is contained in:
parent
20b03d41bf
commit
403412bb58
1 changed files with 8 additions and 5 deletions
13
zsh/zshrc
13
zsh/zshrc
|
@ -45,7 +45,7 @@ zle -N down-line-or-beginning-search
|
|||
[[ -n "$key[Down]" ]] && bindkey -- "$key[Down]" down-line-or-beginning-search
|
||||
|
||||
_command-exists() {
|
||||
[[ -x "$(command -v $1)" ]] && return true || return false
|
||||
[[ -x "$(command -v $1)" ]] && return 0 || return 1
|
||||
}
|
||||
|
||||
export COMPLETION_WAITING_DOTS="true"
|
||||
|
@ -93,7 +93,7 @@ if [[ -d ~/.cargo/bin ]]; then
|
|||
path=($path $HOME/.cargo/bin)
|
||||
fi
|
||||
|
||||
if [[ $(_command-exists starship) -eq 0 ]]; then
|
||||
if (_command-exists starship); then
|
||||
znap eval starship 'starship init zsh --print-full-init'
|
||||
znap prompt starship
|
||||
else
|
||||
|
@ -159,10 +159,13 @@ if [[ $(_command-exists mcfly) -eq 0 ]]; then
|
|||
export MCFLY_USED=1
|
||||
fi
|
||||
|
||||
path+=($(yarn global bin))
|
||||
export PATH
|
||||
if (_command-exists yarn); then
|
||||
echo "found yarn: $(command -v yarn)"
|
||||
path+=($(yarn global bin))
|
||||
export PATH
|
||||
fi
|
||||
|
||||
if [[ $(_command-exists pdm) -eq 0 ]]; then
|
||||
if (_command-exists pdm); then
|
||||
eval "$(pdm --pep582 zsh)"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue