1
0
mirror of synced 2026-02-20 13:55:16 +00:00

Compare commits

...

4 Commits

View File

@@ -47,7 +47,7 @@ function _find_xen_images
# #
_xen_create_image() _xen_create_image()
{ {
local cur prev ip roles partitions dists vgs local cur prev ip evmscontainers roles partitions dists vgs
COMPREPLY=() COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]} cur=${COMP_WORDS[COMP_CWORD]}
@@ -158,7 +158,7 @@ complete -F _xen_create_image xen-create-image
# #
_xen_create_nfs() _xen_create_nfs()
{ {
local cur prev ip roles dists vgs local cur prev
COMPREPLY=() COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]} cur=${COMP_WORDS[COMP_CWORD]}
@@ -208,6 +208,7 @@ _xen_delete_image()
# Complete the options + all available hostnames. # Complete the options + all available hostnames.
# Determine arguments dynamically. Avoids out-of-dateness. # Determine arguments dynamically. Avoids out-of-dateness.
# #
names=`_find_xen_images`
opts=$(xen-delete-image --help|grep -- --|awk '{print $1}'|grep -- -- | sort -u) opts=$(xen-delete-image --help|grep -- --|awk '{print $1}'|grep -- -- | sort -u)
opts="${opts} ${names}" opts="${opts} ${names}"
@@ -221,7 +222,6 @@ _xen_delete_image()
return 0 return 0
;; ;;
--hostname) --hostname)
names=`_find_xen_images`
COMPREPLY=( $(compgen -W "${names}" -- ${cur}) ) COMPREPLY=( $(compgen -W "${names}" -- ${cur}) )
return 0 return 0
;; ;;
@@ -251,7 +251,7 @@ complete -F _xen_delete_image xen-delete-image
# #
_xen_update_image() _xen_update_image()
{ {
local cur prev opts base names vgs local cur prev opts evmscontainers names vgs
COMPREPLY=() COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}" cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}" prev="${COMP_WORDS[COMP_CWORD-1]}"
@@ -303,7 +303,7 @@ complete -F _xen_update_image xen-update-image
# #
_xen_list_images() _xen_list_images()
{ {
local cur prev opts vgs local cur prev opts
COMPREPLY=() COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}" cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}" prev="${COMP_WORDS[COMP_CWORD-1]}"
@@ -325,7 +325,7 @@ complete -F _xen_list_images xen-list-images
# #
_xt-create-xen-config() _xt-create-xen-config()
{ {
local cur prev local cur prev opts
COMPREPLY=() COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]} cur=${COMP_WORDS[COMP_CWORD]}
@@ -360,7 +360,7 @@ complete -F _xt-create-xen-config xt-create-xen-config
# #
_xt-customize-image() _xt-customize-image()
{ {
local cur prev dists local cur prev dists opts
COMPREPLY=() COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]} cur=${COMP_WORDS[COMP_CWORD]}
@@ -401,7 +401,7 @@ complete -F _xt-customize-image xt-customize-image
# #
_xt-install-image() _xt-install-image()
{ {
local cur prev dists local cur prev dists opts
COMPREPLY=() COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]} cur=${COMP_WORDS[COMP_CWORD]}