fix zshrc command checks
This commit is contained in:
11
zsh/.zshrc
11
zsh/.zshrc
@ -25,6 +25,7 @@ unsetopt EXTENDED_HISTORY
|
|||||||
|
|
||||||
# General options
|
# General options
|
||||||
setopt autocd extendedglob
|
setopt autocd extendedglob
|
||||||
|
unset command_not_found_handle
|
||||||
|
|
||||||
# fzf extra shell features
|
# fzf extra shell features
|
||||||
command -v fzf >/dev/null 2>&1 && source <(fzf --zsh)
|
command -v fzf >/dev/null 2>&1 && source <(fzf --zsh)
|
||||||
@ -35,7 +36,7 @@ export FZF_TMUX="1"
|
|||||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||||
zstyle ':completion:*' list-colors "$\{(s.:.)LS_COLORS}"
|
zstyle ':completion:*' list-colors "$\{(s.:.)LS_COLORS}"
|
||||||
zstyle ':completion:*' menu no
|
zstyle ':completion:*' menu no
|
||||||
command -v fzf >/dev/null 2>& zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
|
command -v fzf >/dev/null 2>&1 && zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
|
||||||
|
|
||||||
autoload -U promptinit; promptinit
|
autoload -U promptinit; promptinit
|
||||||
autoload -U compinit && compinit
|
autoload -U compinit && compinit
|
||||||
@ -48,10 +49,10 @@ bindkey '^p' history-search-backward
|
|||||||
bindkey '^n' history-search-forward
|
bindkey '^n' history-search-forward
|
||||||
|
|
||||||
# init prompt
|
# init prompt
|
||||||
command -v starship >/dev/null 2>& eval "$(starship init zsh)"
|
command -v starship >/dev/null 2>&1 && eval "$(starship init zsh)"
|
||||||
|
|
||||||
# run fastfetch on new shells
|
# run fastfetch on new shells
|
||||||
command -v fastfetch >/dev/null 2>& fastfetch
|
command -v fastfetch >/dev/null 2>&1 && fastfetch
|
||||||
|
|
||||||
# automatically enter a tmux session
|
# automatically enter a tmux session
|
||||||
tmux start-server
|
tmux start-server
|
||||||
@ -68,7 +69,7 @@ if test -n "$KITTY_INSTALLATION_DIR"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# add direnv hook if installed
|
# add direnv hook if installed
|
||||||
command -v direnv >/dev/null 2>& eval "$(direnv hook zsh)"
|
command -v direnv >/dev/null 2>&1 && eval "$(direnv hook zsh)"
|
||||||
|
|
||||||
# export common env vars
|
# export common env vars
|
||||||
export EDITOR="nvim"
|
export EDITOR="nvim"
|
||||||
@ -127,7 +128,7 @@ alias -- gs='git switch'
|
|||||||
alias -- gst='git status'
|
alias -- gst='git status'
|
||||||
|
|
||||||
# ls aliases
|
# ls aliases
|
||||||
if [[ command -v eza >/dev/null 2>&1 ]]; then
|
if command -v eza >/dev/null 2>&1 ; then
|
||||||
alias -- ls='eza -lh -s=name --git --group-directories-first --no-permissions --icons --no-user'
|
alias -- ls='eza -lh -s=name --git --group-directories-first --no-permissions --icons --no-user'
|
||||||
alias -- lsa='eza -lha -s=name --git --group-directories-first --no-permissions --icons --no-user'
|
alias -- lsa='eza -lha -s=name --git --group-directories-first --no-permissions --icons --no-user'
|
||||||
alias -- lsg='eza -lh -s=name --git --group-directories-first --git-ignore --no-permissions --icons --no-user'
|
alias -- lsg='eza -lh -s=name --git --group-directories-first --git-ignore --no-permissions --icons --no-user'
|
||||||
|
|||||||
Reference in New Issue
Block a user