I have zsh-completions installed on arch linux. Completion of VBoxManage
command seems to work fine, but vboxmanage
doesn't (ie. just does simple completion of files int he local directory). Both VBoxManage
and vboxmanage
are symlinks to the VBox
executable.
It seems that my _virtualbox completion definition has a first line of
#compdef VBoxManage=vboxmanage VBoxHeadless=vboxheadless
which looks like an alias of some sort? but it isn't working.
I have a fix which is to change the above line to
#compdef VBoxManage=vboxmanage vboxmanage=vboxmanage VBoxHeadless=vboxheadless vboxheadless=vboxheadless
This seems long-winded, there is an option to specify a pattern, but What is the correct way to alias commands like this?
compdef _VBoxManage vboxmanage
compdef _VBoxHeadless vboxheadless
In your ~/.zshrc
is the correct way to specify a completion function for a command. It is not recommended to edit the actual function in source, for obvious reasons.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With