mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-21 19:11:30 +01:00
zsh: cleanup command lookup
This commit is contained in:
parent
7312c868b3
commit
114bbe758e
|
@ -18,19 +18,19 @@ antibody bundle < "$DOTFILES/antibody_plugins.txt"
|
||||||
source $DOTFILES/completion_style.zsh
|
source $DOTFILES/completion_style.zsh
|
||||||
source $DOTFILES/extras/fzf-tab-config.zsh
|
source $DOTFILES/extras/fzf-tab-config.zsh
|
||||||
|
|
||||||
if command -vp fd >/dev/null; then
|
if [[ $+commands[fd] ]]; then
|
||||||
export FZF_CTRL_T_COMMAND='fd'
|
export FZF_CTRL_T_COMMAND='fd'
|
||||||
else
|
else
|
||||||
export FZF_CTRL_T_COMMAND='find'
|
export FZF_CTRL_T_COMMAND='find'
|
||||||
fi
|
fi
|
||||||
export FZF_CTRL_T_OPTS=" --preview-window=right,60% --preview \"bash -c 'if [[ -d \"{}\" ]]; then tree -C \"{}\"; else bat --style=plain --color=always \"{}\"; fi'\" --bind 'ctrl-/:change-preview-window(right,70%|down,40%,border-horizontal|hidden|right)'"
|
export FZF_CTRL_T_OPTS=" --preview-window=right,60% --preview \"bash -c 'if [[ -d \"{}\" ]]; then tree -C \"{}\"; else bat --style=plain --color=always \"{}\"; fi'\" --bind 'ctrl-/:change-preview-window(right,70%|down,40%,border-horizontal|hidden|right)'"
|
||||||
|
|
||||||
if [[ "$(command -v systemctl)" ]]; then
|
if [[ $+commands[systemctl] ]]; then
|
||||||
antibody bundle robbyrussell/oh-my-zsh path:plugins/systemd
|
antibody bundle robbyrussell/oh-my-zsh path:plugins/systemd
|
||||||
fi
|
fi
|
||||||
if [[ "$(command -v pacman)" ]]; then
|
if [[ $+commands[pacman] ]]; then
|
||||||
antibody bundle robbyrussell/oh-my-zsh path:plugins/archlinux
|
antibody bundle robbyrussell/oh-my-zsh path:plugins/archlinux
|
||||||
elif [[ "$(command -v apt-get)" ]]; then
|
elif [[ $+commands[apt-get] ]]; then
|
||||||
antibody bundle robbyrussell/oh-my-zsh path:plugins/debian
|
antibody bundle robbyrussell/oh-my-zsh path:plugins/debian
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -82,12 +82,8 @@ export ZSH_AUTOSUGGEST_COMPLETION_IGNORE='* \#*' # prevent completion for commen
|
||||||
|
|
||||||
# less options
|
# less options
|
||||||
export LESS='-xRF-j12' # -j12: displays 12 lines before search results with / and ?
|
export LESS='-xRF-j12' # -j12: displays 12 lines before search results with / and ?
|
||||||
if [[ "$(command -v bat)" || "$(command -v batcat)" ]]; then
|
if [[ $+commands[bat] || $+commands[batcat] ]]; then
|
||||||
if [[ "$(command -v bat)" ]]; then
|
if [[ $+commands[bat] ]]; then cmd=bat else cmd=batcat fi
|
||||||
cmd=bat
|
|
||||||
else
|
|
||||||
cmd=batcat
|
|
||||||
fi
|
|
||||||
|
|
||||||
alias cat=$cmd
|
alias cat=$cmd
|
||||||
export PAGER=$cmd
|
export PAGER=$cmd
|
||||||
|
|
Loading…
Reference in New Issue
Block a user