fosskers / aura

A secure, multilingual package manager for Arch Linux and the AUR.
https://fosskers.github.io/aura/
1.66k stars 110 forks source link

Zsh autocompletes package names only after repository name #640

Open ratijas opened 3 years ago

ratijas commented 3 years ago

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 commented 3 years ago

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

fosskers commented 3 years ago

I will have to revisit these completions.

ratijas commented 3 years ago

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

fosskers commented 3 years ago

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.

ratijas commented 3 years ago

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

fosskers commented 1 week ago

I will be revisiting zsh completions soon.