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