1
0
mirror of synced 2026-02-19 13:25:04 +00:00

bash completion: Define $names before using it

This commit is contained in:
Axel Beckert
2010-05-19 12:18:46 +02:00
parent e0c242e388
commit 27b2a55fab

View File

@@ -208,6 +208,7 @@ _xen_delete_image()
# Complete the options + all available hostnames.
# Determine arguments dynamically. Avoids out-of-dateness.
#
names=`_find_xen_images`
opts=$(xen-delete-image --help|grep -- --|awk '{print $1}'|grep -- -- | sort -u)
opts="${opts} ${names}"
@@ -221,7 +222,6 @@ _xen_delete_image()
return 0
;;
--hostname)
names=`_find_xen_images`
COMPREPLY=( $(compgen -W "${names}" -- ${cur}) )
return 0
;;