Use fd for fzf if available
This commit is contained in:
17
zshrc
17
zshrc
@ -19,7 +19,7 @@ fi
|
||||
# 1. starship
|
||||
# 2. p10k
|
||||
# 3. manjaro
|
||||
if [[ -n "$(command -v starship)" ]]; then
|
||||
if (( $+commands[starship] )); then
|
||||
eval "$(starship init zsh)"
|
||||
else
|
||||
if [[ -s ~/.p10k.zsh ]]; then
|
||||
@ -38,15 +38,26 @@ if [[ -s /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh ]];
|
||||
fi
|
||||
|
||||
# Intelligent and fast autojump
|
||||
if [[ -n "$(command -v zoxide)" ]]; then
|
||||
if (( $+commands[zoxide] )); then
|
||||
eval "$(zoxide init zsh)"
|
||||
fi
|
||||
|
||||
# Cheat my way through the CLI
|
||||
if [[ -n "$(command -v navi)" ]]; then
|
||||
if (( $+commands[navi] )); then
|
||||
eval "$(navi widget zsh)"
|
||||
fi
|
||||
|
||||
# Use fd for fzf
|
||||
if (( $+commands[fd] )); then
|
||||
_fzf_compgen_path() {
|
||||
fd --hidden --follow --exclude ".git" . "$1"
|
||||
}
|
||||
|
||||
_fzf_compgen_dir() {
|
||||
fd --type d --hidden --follow --exclude ".git" . "$1"
|
||||
}
|
||||
fi
|
||||
|
||||
# Custom aliases
|
||||
if [[ -s ~/.aliases ]]; then
|
||||
source ~/.aliases
|
||||
|
Reference in New Issue
Block a user