tumult.plugin.zsh icon indicating copy to clipboard operation
tumult.plugin.zsh copied to clipboard

The plugin disables autocomplete when only one option is available

Open aserrallerios opened this issue 11 months ago • 9 comments

I just type cd Down<TAB>.

Without the plugin:

❯ cd Downloads/

With the plugin:

❯ cd Down
local directory
Downloads/

aserrallerios avatar Aug 01 '23 19:08 aserrallerios

There are no bindkey, zstyle or zle commands in the plugin file, so I'm not sure how it is altering your tab completion behavior.

Which ZSH framework are you using?

unixorn avatar Aug 26 '23 14:08 unixorn

I'm loading a bunch of plugins (some from oh-my-zsh) with antibody. I tested loading this pluging both first and last of the list, and the problem persisted.

I compared the zstyle with and without the plugin, and it's identical, even though the autocomplete works differently (as described in the first message).

aserrallerios avatar Aug 28 '23 11:08 aserrallerios

That's really strange. Could you try starting with nothing but tumult in your plugin list and seeing if the behavior is still there?

I don't think the plugin sets any variables that should be altering tab completion behavior

unixorn avatar Aug 28 '23 17:08 unixorn

Yeah, I'll try the other way around. Add tumult and then add more and more of my other plugins until I identify the conflict.

Will keep you posted, thanks!

aserrallerios avatar Aug 30 '23 16:08 aserrallerios

Thanks, I appreciate the help. If there's something I'm doing in tumult to break tab completion behavior I want to know so I can pre-emptively fix it in my other plugins.

unixorn avatar Aug 31 '23 19:08 unixorn

So I found out that this combination reproduces the problem: oh-my-zsh "base" + tumult.

#~/.zsh_plugins.txt
robbyrussell/oh-my-zsh
unixorn/tumult.plugin.zsh

which translates to:

#~/.zsh_plugins.sh
source /Users/albert.serralle/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh/oh-my-zsh.sh
fpath+=( /Users/albert.serralle/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh )
source /Users/albert.serralle/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-unixorn-SLASH-tumult.plugin.zsh/tumult.plugin.zsh
fpath+=( /Users/albert.serralle/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-unixorn-SLASH-tumult.plugin.zsh )
#~/.zshrc
source ~/.zsh_plugins.sh

You should be able to reproduce by downloading both repos manually instead of using antibody.

aserrallerios avatar Sep 13 '23 21:09 aserrallerios

I'm not sure how I can fix it given that tumult doesn't make any ZSH settings changes, it just adds its bin directory to $PATH.

It does set up a few functions and aliases, I guess I can try turning those into full-on scripts so they don't alter the ZSH environment at all.

unixorn avatar Sep 14 '23 14:09 unixorn

But were you able to reproduce? I'm asking because I'm not 100% confident that other component of my setup is not interfering.

aserrallerios avatar Sep 14 '23 17:09 aserrallerios

I haven't had a chance to play with it, hoping to this weekend.

unixorn avatar Sep 15 '23 14:09 unixorn