mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 07:46:39 +00:00
feat(shell/completion): add a custom override for fzf-tab-source
This commit is contained in:
15
zsh/fzf-tab/sources/-command-.zsh
Normal file
15
zsh/fzf-tab/sources/-command-.zsh
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# :fzf-tab:complete:(-command-:|command:option-(v|V)-rest)
|
||||||
|
case $group in
|
||||||
|
'external command'|'alias')
|
||||||
|
which $word
|
||||||
|
;;
|
||||||
|
'executable file')
|
||||||
|
which ${realpath#--*=}
|
||||||
|
;;
|
||||||
|
'builtin command'|'reserved word')
|
||||||
|
run-help $word | bat -lman
|
||||||
|
;;
|
||||||
|
parameter)
|
||||||
|
echo ${(P)word}
|
||||||
|
;;
|
||||||
|
esac
|
||||||
5
zshrc
5
zshrc
@@ -82,6 +82,7 @@ if command-exists fzf; then
|
|||||||
zinit light-mode wait lucid atclone'git checkout fit-preview' \
|
zinit light-mode wait lucid atclone'git checkout fit-preview' \
|
||||||
for @jimeh/fzf-tab
|
for @jimeh/fzf-tab
|
||||||
|
|
||||||
|
zstyle ':fzf-tab:sources' config-directory "$DOTZSH/fzf-tab/sources"
|
||||||
zinit light-mode lucid for @Freed-Wu/fzf-tab-source
|
zinit light-mode lucid for @Freed-Wu/fzf-tab-source
|
||||||
# Disable some overly aggressive completions from fzf-tab-source.
|
# Disable some overly aggressive completions from fzf-tab-source.
|
||||||
zstyle -d ':fzf-tab:complete:*' fzf-preview
|
zstyle -d ':fzf-tab:complete:*' fzf-preview
|
||||||
@@ -96,9 +97,9 @@ zinit light-mode wait lucid atload"!_zsh_autosuggest_start" \
|
|||||||
bindkey '^Xh' _complete_help
|
bindkey '^Xh' _complete_help
|
||||||
|
|
||||||
# Group completions by type under group headings
|
# Group completions by type under group headings
|
||||||
zstyle ':completion:*' format '[%d]'
|
zstyle ':completion:*' format '%d'
|
||||||
zstyle ':completion:*' group-name ''
|
zstyle ':completion:*' group-name ''
|
||||||
zstyle ':completion:*:descriptions' format '[%d]'
|
zstyle ':completion:*:descriptions' format '%d'
|
||||||
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
||||||
zstyle ':completion:*' list-grouped true
|
zstyle ':completion:*' list-grouped true
|
||||||
zstyle ':autocomplete:*' groups 'always'
|
zstyle ':autocomplete:*' groups 'always'
|
||||||
|
|||||||
Reference in New Issue
Block a user