1

So I installed zsh a few days ago, and I'm loving it. But when I type something in, it shows me the possible completion using the autosuggestions plugin, but I cannot fill it using tab, i have to use the arrow keys. Pressing tab opens a menu of possible completions and/or a list of subdirectories and files. I want to have no menu completions and the only completions to be done through the autosuggestions plugin.

I've been tinkering for a few hours trying to get this so if anyone knows how to achieve this I would appreciate some help (debian using ohmyzsh)

1 Answer 1

1

You can unload the completion system completely like this:

zmodload -u zsh/compctl zsh/complete bindkey '^I' forward-word 

Instead of inserting completions, Tab will now accept the next word from zsh-autosuggestions.


Before you give up completely on completions, though, may I suggest you give my zsh-autocomplete plugin a try? It gives you Visual Studio Code -style, type-head autocompletion in Zsh. And yes, you can use both zsh-autosuggestions and zsh-autocompletion in parallel.

6
  • The auto-complete plugin is exactly what i was looking for. I use visual studio a lot so that is perfect. The first command i need some help on though, it says "zmodload: module zsh/complete is in use by another module and cannot be unloaded". Ive tried messing with it for an hour or two and cant figure it out Commented Jan 18, 2021 at 16:36
  • zsh-autocomplete uses zsh’s own completion system under the hood. So, no need to unload it. Commented Oct 31, 2021 at 6:56
  • zmodload: module zsh/complete is in use by another module and cannot be unloaded Commented Apr 20, 2022 at 23:49
  • zsh/complete can't be unloaded. It has zsh/zle, i.e. the line editor, as a dependency, as can be seen by running zmodload -d zsh/complete. zsh/zle can't be unloaded, and hence zsh/complete can't be unloaded. Commented Oct 3, 2022 at 18:50
  • @Carl You’ve understood it the wrong. If A has B as a dependency, then you cannot unload B without also unloading A. However, zle can never be unloaded in an interactive session anyway. Commented Oct 4, 2022 at 8:17

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.