Fixed list command

This commit is contained in:
2019-12-22 18:40:08 +01:00
parent 10900543fa
commit f73e80c7ad

View File

@@ -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}) )
} }