aura icon indicating copy to clipboard operation
aura copied to clipboard

Zsh autocompletes package names only after repository name

Open ratijas opened this issue 5 years ago • 6 comments

In zsh, aura auto-completion for aura -S only works with on a per-repository level.

When I type in aura -S and press Tab, it only shows repositories. Furthermore, If I narrow it down to aura -S lib32 and press Tab, it won't show anything, despite the fact there's a huge amount of packages in multilib/ repository named like lib32-*.

It doesn't make any sense to disable autocomplete by package names, because after all you are able to install them without a repository/ prefix: aura -S lib32-gcc-libs (btw, despite its name, this one is from core/).

Expected behavior

Autocomplete both repositories and individual packages on a top level (aura -S abc<Tab>). Possibly, group repos and packages into separate autocompletion categories (to the best of my knowledge, it is possible, e.g. in docker).

Actual behavior

Autocompletion for package names is not provided, or provided only with "repository/" prefix.

Alternatives

Consider suggestions from pacaur:

% pacaur -S lib32-<Tab>
zsh: do you wish to see all 754 possibilities (378 lines)?
<Tab anyway>
% pacaur -S lib32-86box-nightly-bin
>lib32-86box-nightly-bin<             lib32-libpaper                      
 lib32-a52dec                          lib32-libpciaccess-git              
 lib32-allegro                         lib32-libplacebo                    
 lib32-allegro4                        lib32-libplacebo-git                
 lib32-alsaequal                       lib32-libpng14                      
 lib32-alure                           lib32-libpng15                      
 lib32-amdgpu-pro-libgl                lib32-libprotobuf                   
 lib32-amdvlk-git                      lib32-libprotobuf-git               
 ...
Scrolling active: current selection at Top

ratijas avatar Oct 03 '20 12:10 ratijas

Fun fact: aura -Qi autocompletes packages with both empty search term, and with package name's starting letters.

ratijas avatar Oct 03 '20 15:10 ratijas

I will have to revisit these completions.

fosskers avatar Oct 05 '20 23:10 fosskers

...or leave zsh to me — I'm actively diving into its depths lately.

ratijas avatar Oct 06 '20 00:10 ratijas

That would actually help quite a lot. I use Fish, so would have to do a lot of background work to fix the zsh completions myself.

fosskers avatar Oct 06 '20 05:10 fosskers

Can you 'assign' it to me, so I won't forget it, please?

ratijas avatar Oct 06 '20 08:10 ratijas