01838f0083
The recommended order for the module loading has been changed. The last module to be loaded should be 'completion'. This ensures all completions set by other modules are dumped and included in the completion. Because of this, any compdefs like this one (making the pacman aliases use pacman completion) must be set in the compdefs.zsh file, and loaded with the completion module. This means the compdefs must be wrapped with conditional statements to ensure such aliases/functions have been set by previous modules. I may abstract this conditional to a function in the future to make this an easier process.
15 lines
486 B
Bash
15 lines
486 B
Bash
#
|
|
# Alias compdefs
|
|
#
|
|
|
|
# Any aliased commands will not function with completion without compdefs.
|
|
# Because completion is the LAST module to be loaded (so we make sure to catch all completions)
|
|
# we must assign the compdefs here, as opposed to within the modules themselves.
|
|
|
|
# Unfortunately, I'm not aware of a worthwhile way to ensure that these will be included in .zcompdump
|
|
|
|
# zpacman_frontend -> pacman
|
|
if (( ${+zpacman_frontend} )); then
|
|
compdef ${zpacman_frontend}='pacman'
|
|
fi
|