Skip to content
\n

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.

\n

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.

\n

Alternatively, it could be that the completion mechanism implemented by x-cmd is overriding the completion mechanism of fzf-tab.

\n

Steps to Reproduce:

\n
    \n
  1. Install x-cmd.
  2. \n
  3. Use the following minimal zshrc configuration file and restart zsh:
  4. \n
\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.
\n\n

Expected Behavior

\n

The completion menu of fzf-tab should always be displayed when press tab key.

\n

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
","upvoteCount":2,"url":"https://github.com/x-cmd/x-cmd/discussions/76#discussioncomment-10574700"}}}

Any way to disable x-cmd's autocompletion? #76

Answered by qiakai
Zevan770 asked this question in Q&A
Discussion options

You must be logged in to vote
You can set this environment variable in your rc files (like zshrc), before loading x-cmd:

export ___X_CMD_ADVISE_DISABLE=1

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Zevan770
Comment options

You must be logged in to vote
1 reply
@edwinjhlee
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants