mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-12-22 06:21:40 +01:00
zsh: fix command lookup using $+array[] syntax
This commit is contained in:
parent
26022ea7b6
commit
c572b2cb10
|
@ -39,12 +39,12 @@ if [[ ! ${zsh_plugins}.zsh -nt ${zsh_plugins}.txt ]]; then
|
|||
|
||||
antidote bundle <${zsh_plugins}.txt >>${zsh_plugins}.zsh
|
||||
|
||||
if [[ $+commands[systemctl] ]]; then
|
||||
if (( $+commands[systemctl] )); then
|
||||
antidote bundle robbyrussell/oh-my-zsh path:plugins/systemd >>${zsh_plugins}.zsh
|
||||
fi
|
||||
if [[ $+commands[pacman] ]]; then
|
||||
if (( $+commands[pacman] )); then
|
||||
antidote bundle robbyrussell/oh-my-zsh path:plugins/archlinux >>${zsh_plugins}.zsh
|
||||
elif [[ $+commands[apt-get] ]]; then
|
||||
elif (( $+commands[apt-get] )); then
|
||||
antidote bundle robbyrussell/oh-my-zsh path:plugins/debian >>${zsh_plugins}.zsh
|
||||
fi
|
||||
|
||||
|
@ -60,7 +60,7 @@ source $DOTFILES/extras/completion_style.zsh
|
|||
source $DOTFILES/extras/colors.zsh
|
||||
source $DOTFILES/extras/fzf-tab-config.zsh
|
||||
|
||||
if [[ $+commands[fd] ]]; then
|
||||
if (( $+commands[fd] )); then
|
||||
export FZF_CTRL_T_COMMAND='fd'
|
||||
else
|
||||
export FZF_CTRL_T_COMMAND='find'
|
||||
|
@ -112,8 +112,8 @@ export ZSH_AUTOSUGGEST_COMPLETION_IGNORE='* \#*' # prevent completion for commen
|
|||
|
||||
# less options
|
||||
export LESS='-xRF-j12' # -j12: displays 12 lines before search results with / and ?
|
||||
if [[ $+commands[bat] || $+commands[batcat] ]]; then
|
||||
if [[ $+commands[bat] ]]; then cmd=bat else cmd=batcat fi
|
||||
if (( $+commands[bat] || $+commands[batcat] )); then
|
||||
if (( $+commands[bat] )); then cmd=bat else cmd=batcat fi
|
||||
|
||||
alias cat=$cmd
|
||||
export PAGER=$cmd
|
||||
|
|
Loading…
Reference in New Issue
Block a user