mirror of
https://github.com/gryf/vboxmanage-bash-completion.git
synced 2025-12-17 03:20:20 +01:00
Fixed list command
This commit is contained in:
12
VBoxManage
12
VBoxManage
@@ -323,14 +323,10 @@ _VBoxManage() {
|
||||
|
||||
_list_comp() {
|
||||
local list
|
||||
list=$(VBoxManage list | \
|
||||
grep '|' | \
|
||||
sed 's/\[.*\]//g'| \
|
||||
sed 's/VBoxManage list//' | \
|
||||
tr "\\n" " " | \
|
||||
sed 's/$/\n/' | \
|
||||
sed 's/\s\+//g' | \
|
||||
sed 's/|/ /g')
|
||||
list=$(VBoxManage list | sed -e '1,2d' \
|
||||
-e 's/VBoxManage list //' \
|
||||
-e 's/[\[\]\|]/ /g' \
|
||||
-e 's/|/ /g'|xargs echo)
|
||||
COMPREPLY=( $(compgen -W "$list" -- ${cur}) )
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user