FZF: Use the latest feature for getting shell completions

This commit is contained in:
Pratik Tripathy
2024-04-10 16:15:24 +05:30
parent e47c3fa3f7
commit 3e3d42f7b9
2 changed files with 9 additions and 11 deletions

View File

@@ -176,14 +176,12 @@ HISTFILE="$XDG_STATE_HOME/shell/bash_history"
[ ! -f "$XDG_CONFIG_HOME/exercism/exercism_completion.bash" ] || source "$XDG_CONFIG_HOME/exercism/exercism_completion.bash" [ ! -f "$XDG_CONFIG_HOME/exercism/exercism_completion.bash" ] || source "$XDG_CONFIG_HOME/exercism/exercism_completion.bash"
# [ctrl+r]:replaces shell command search # [ctrl+r]: Search command history
# [ctrl+t]: fzf & over the files & directories under the current one & paste it to prompt # [ctrl+t]: fzf & over the files & directories under the current one & paste it to prompt
# [alt+c] : fzf & cd into a directory under the current one # [alt+c] : fzf & cd into a directory under the current one
[ -f "$XDG_STATE_HOME/shell/fzf.bash" ] && source "$XDG_STATE_HOME/shell/fzf.bash" command -v fzf >/dev/null && eval "$(fzf --bash)"
if command -v zoxide >/dev/null; then command -v zoxide >/dev/null && eval "$(zoxide init --cmd cd bash)"
eval "$(zoxide init --cmd cd bash)"
fi
# Source aliases and shell functions # Source aliases and shell functions
for alias_file in "$XDG_CONFIG_HOME"/shell/*.sh; do source "$alias_file"; done for alias_file in "$XDG_CONFIG_HOME"/shell/*.sh; do source "$alias_file"; done

View File

@@ -98,10 +98,10 @@ zmodload zsh/complist
compinit -d "$XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION" compinit -d "$XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION"
_comp_options+=(globdots) # Include hidden files _comp_options+=(globdots) # Include hidden files
# [ctrl+r]:replaces shell command search # [ctrl+r]: Search command history
# [ctrl+t]: fzf & over the files & directories under the current one & paste it to prompt # [ctrl+t]: fzf & over the files & directories under the current one & paste it to prompt
# [alt+c] : fzf & cd into a directory under the current one # [alt+c] : fzf & cd into a directory under the current one
[ -f "$XDG_STATE_HOME/shell/fzf.zsh" ] && source "$XDG_STATE_HOME/shell/fzf.zsh" command -v fzf > /dev/null && eval "$(fzf --zsh)"
command -v zoxide >/dev/null && eval "$(zoxide init --cmd cd zsh)" command -v zoxide >/dev/null && eval "$(zoxide init --cmd cd zsh)"