Historical bug tracker for the Pacman package manager.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
FS#74507 - pacman zsh completion defines _keys in the global name space causing weird collisions
Attached to Project:
Pacman
Opened by Arvid Norlander (VorpalGun) - Tuesday, 19 April 2022, 13:43 GMT
Opened by Arvid Norlander (VorpalGun) - Tuesday, 19 April 2022, 13:43 GMT
|
DetailsSummary and Info:
The zsh completion (_pacman) defines several helper functions. These end up in the global namespace of zsh. Most of which are prefixed with _pacman, making name collisions unlikely. There is also _makepkg where again a name collision is unlikely (since the convention is to name the completion function after your command prefxed with _). However there is _keys defined, which ended up colliding for me, causing hard to debug issues (sometimes my completion function would be overwritten, sometimes pacman completion would break) depending on which order the completion scripts happened to load in. It would be great if a prefixed name could be used instead for this helper function. Note that _key_shortopts and _key_longopts should probably also be renamed to have a prefix, though I didn't happen to collide with those. Steps to Reproduce: 1. Start a new zsh shell 2. Define a _keys function in zsh (for completing a command "keys" for example). 3. Try to tab complete a pacman command 4. Observe using the `type` builtin that your _keys has been overwritten The opposite can be accomplished by switching step 2 and 3, resulting in pacman completion being broken. |
This task depends upon

https://gitlab.archlinux.org/pacman/pacman/-/merge_requests/40