marlonrichert / zsh-autocomplete

🤖 Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.
MIT License
5.19k stars 144 forks source link

Change group order or disable some groups completely in dropdown #742

Open karpov-kir opened 1 month ago

karpov-kir commented 1 month ago

What do you want?

Change group order in the dropdown or disable some groups completely.

Why do you want this?

I often need to open something in my home directory using ~/some-path/..., but when I start typing ~/something the suggested elements in the dropdown have "expansion" category first:

image

so pressing <TAB> sometimes breaks the flow. For example, $ nano ~/.z <TAB> changes it to $ nano /Users/kirill/.z instead of $ nano ~/.zprezto/.

I find it very useful to rely on <TAB> to guide me through folders and files.

With zsh-autocomplete, every time it expands ~ it creates unnecessary noise, especially when you don't remember the exact folder name and try different names from memory, then this unnecessary expansion makes the navigation experience worse.

Who else would benefit from this?

Well, I think everyone who navigates through folders and files using ~. 😄

How should it work?

When I type ~/ and then <TAB> it should iterate over directories and files, but not expand ~.

I suspect it might be a configuration matter, but I could not find a way to achieve that. I searched on Google, in issues of this repo, even in the source code, but all my attempts failed to configure it. For my use cases, I would like to disable "expansion" category completely. If this can easily be configured, then describing it in README.md would be useful.

I use Prezto, but it should not be a problem as far as I know, because I managed to re-configure <TAB> and <SHIFT> behavior in ~/.zshrc according to the documentation with no problems.

Given the following situation:

I need to open a project folder placed in ~/Documents/WP/project.

When I perform the following steps:

  1. Type ~/Doc <TAB> WP <TAB> proj <TAB>

Then I expect the following to happen:

I end up in the ~/Documents/WP/project with no additional hustle of ~ expansion.

karpov-kir commented 1 month ago

Aha, I think there is a similar open issue - https://github.com/marlonrichert/zsh-autocomplete/issues/741.