However, when I load x-cmd, regardless of where I place the initialization statement for x-cmd (before or after zinit), fzf-tab gets overridden under certain circumstances.
\nTo my knowledge, x-cmd seems to directly use the completions from zsh-completions in zsh. I suspect that this might cause zsh-completions to be loaded twice, resulting in fzf-tab becoming ineffective.
\nAlternatively, it could be that the completion mechanism implemented by x-cmd is overriding the completion mechanism of fzf-tab.
\n# {{{ auto install and initialize zinit\nZINIT_HOME=\"${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git\"\nif [ ! -d \"$ZINIT_HOME\" ]; then\nmkdir -p \"$(dirname $ZINIT_HOME)\"\ngit clone https://github.com/zdharma-continuum/zinit.git \"$ZINIT_HOME\"\nfi\nsource \"${ZINIT_HOME}/zinit.zsh\"\n# }}}\n\n# auto download and load plugins\nzinit light zsh-users/zsh-completions\nzinit light Aloxaf/fzf-tab\n\n# load x-cmd\n[ ! -f \"$HOME/.x-cmd.root/X\" ] || . \"$HOME/.x-cmd.root/X\" # boot up x-cmd.
cat
and press the tab
key, you will see fzf-tab's completion menu.cat -
and press the tab
key, you will see x-cmd's completion menu instead of fzf-tab's.cat
and press the tab
key again, fzf-tab's completion menu will never show up again.The completion menu of fzf-tab should always be displayed when press tab
key.
Is there any way to disable x-cmd's autocompletion or any other way to fix this? 🙏
","upvoteCount":1,"answerCount":4,"acceptedAnswer":{"@type":"Answer","text":"You can set this environment variable in your rc files (like zshrc), before loading x-cmd:\n\nexport ___X_CMD_ADVISE_DISABLE=1\n
-
Hi ~ |
Beta Was this translation helpful? Give feedback.
-
What if you place |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@Zevan770 We improve the advise autoload in v0.4.13 ~ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem Description
I am using ZSH with auto-completion powered by zsh-completions (as provider) and fzf-tab (for fuzzy search).
However, the auto-completion feature of fzf-tab gets overridden by x-cmd under certain circumstances.
fzf-tab relies on the completion sources provided by zsh-completions, so I need to load zsh-completions before fzf-tab. Please see this for reference.
To control the loading order, I am using the plugin manager ZINIT. I manually load zsh-completions and fzf-tab as follows:
However, when I load x-cmd, regardless of where I place the initialization statement for x-cmd (before or after zinit), fzf-tab gets overridden under certain circumstances.
To my knowledge, x-cmd seems to directly use the completions from zsh-completions in zsh. I suspect that this might cause zsh-completions to be loaded twice, resulting in fzf-tab becoming ineffective.
Alternatively, it could be that the completion mechanism implemented by x-cmd is overriding the completion mechanism of fzf-tab.
Steps to Reproduce:
cat
and press thetab
key, you will see fzf-tab's completion menu.cat -
and press thetab
key, you will see x-cmd's completion menu instead of fzf-tab's.cat
and press thetab
key again, fzf-tab's completion menu will never show up again.Expected Behavior
The completion menu of fzf-tab should always be displayed when press
tab
key.Is there any way to disable x-cmd's autocompletion or any other way to fix this? 🙏
Beta Was this translation helpful? Give feedback.
All reactions