mirror of
https://github.com/gryf/vboxmanage-bash-completion.git
synced 2025-12-17 11:30:23 +01:00
Added support for other names than vboxmanage.
Currently the completion script will be available for commands:
VBoxManage and vboxmanage. With this commit, renaming/linking this
script with another name will also make that name to be included to
completion.
For example, with alias:
$ alias vb="VBoxManage"
linkig completion script into new name an source it:
$ cd /path/of/completion/script/
$ ln -s VBoxManage vb
# source vb
will start to complete vb command.
This commit is contained in:
@@ -2864,4 +2864,9 @@ _VBoxManage() {
|
||||
complete -o default -F _VBoxManage VBoxManage
|
||||
complete -o default -F _VBoxManage vboxmanage
|
||||
|
||||
if [[ "${BASH_SOURCE[0]}" != 'VBoxManage' &&
|
||||
"${BASH_SOURCE[0]}" != 'vboxmanage' ]]; then
|
||||
complete -o default -F _VBoxManage $(basename "${BASH_SOURCE[0]}")
|
||||
fi
|
||||
|
||||
# vim: set ft=sh tw=80 sw=4 et :
|
||||
|
||||
Reference in New Issue
Block a user