1
0
mirror of synced 2026-01-26 11:42:00 +00:00

Fix code styling issues.

Tabs, trailing spaces, you name it.
This commit is contained in:
Stéphane Jourdois
2010-07-24 10:39:32 +02:00
committed by Axel Beckert
parent 64c9c8398b
commit dff767c692

View File

@@ -1,4 +1,4 @@
# -*- shell-script -*- #!/bin/bash
# #
# /etc/bash_completion.d/xen-tools # /etc/bash_completion.d/xen-tools
# #
@@ -82,65 +82,65 @@ _xen_create_image()
evmscontainers=`evms_query containers 2>/dev/null` evmscontainers=`evms_query containers 2>/dev/null`
case "$prev" in case "$prev" in
--cache) --cache)
COMPREPLY=( $( compgen -W 'yes no' -- "${COMP_WORDS[COMP_CWORD]}" ) ) COMPREPLY=( $( compgen -W 'yes no' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0 return 0
;; ;;
--config) --config)
_filedir _filedir
return 0 return 0
;; ;;
--dir) --dir)
_filedir -d _filedir -d
return 0 return 0
;; ;;
--dist) --dist)
COMPREPLY=( $( compgen -W '${dists}' -- "${COMP_WORDS[COMP_CWORD]}" ) ) COMPREPLY=( $( compgen -W '${dists}' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0 return 0
;; ;;
--evms) --evms)
COMPREPLY=( $( compgen -W '${evmscontainers}' -- "${COMP_WORDS[COMP_CWORD]}" ) ) COMPREPLY=( $( compgen -W '${evmscontainers}' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0 return 0
;; ;;
--fs) --fs)
COMPREPLY=( $( compgen -W 'xfs ext3 reiserfs' -- "${COMP_WORDS[COMP_CWORD]}" ) ) COMPREPLY=( $( compgen -W 'xfs ext3 reiserfs' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0 return 0
;; ;;
--hooks) --hooks)
COMPREPLY=( $( compgen -W '0 1' -- "${COMP_WORDS[COMP_CWORD]}" ) ) COMPREPLY=( $( compgen -W '0 1' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0 return 0
;; ;;
--install) --install)
COMPREPLY=( $( compgen -W '0 1' -- "${COMP_WORDS[COMP_CWORD]}" ) ) COMPREPLY=( $( compgen -W '0 1' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0 return 0
;; ;;
--image) --image)
COMPREPLY=( $( compgen -W 'sparse full' -- "${COMP_WORDS[COMP_CWORD]}" ) ) COMPREPLY=( $( compgen -W 'sparse full' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0 return 0
;; ;;
--install-method) --install-method)
COMPREPLY=( $( compgen -W 'copy debootstrap rinse rpmstrap tar' -- "${COMP_WORDS[COMP_CWORD]}" ) ) COMPREPLY=( $( compgen -W 'copy debootstrap rinse rpmstrap tar' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0 return 0
;; ;;
--ip) --ip)
ip=`echo ${ip} | sed -e 's/[.][^.]*$/./'` ip=`echo ${ip} | sed -e 's/[.][^.]*$/./'`
COMPREPLY=( $(compgen -W "${ip}" -- ${cur}) ) COMPREPLY=( $(compgen -W "${ip}" -- ${cur}) )
return 0 return 0
;; ;;
--lvm) --lvm)
COMPREPLY=( $( compgen -W '${vgs}' -- "${COMP_WORDS[COMP_CWORD]}" ) ) COMPREPLY=( $( compgen -W '${vgs}' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0 return 0
;; ;;
--role) --role)
roles=$(ls -1 /etc/xen-tools/role.d/ | xargs echo ) roles=$(ls -1 /etc/xen-tools/role.d/ | xargs echo )
COMPREPLY=( $( compgen -W '${roles}' -- "${COMP_WORDS[COMP_CWORD]}" ) ) COMPREPLY=( $( compgen -W '${roles}' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0 return 0
;; ;;
--partitions) --partitions)
partitions=$(for x in `/bin/ls -1 /etc/xen-tools/partitions.d/ 2>/dev/null | grep -v \/ 2>/dev/null`; do echo ${x} ; done ) partitions=$(for x in `/bin/ls -1 /etc/xen-tools/partitions.d/ 2>/dev/null | grep -v \/ 2>/dev/null`; do echo ${x} ; done )
COMPREPLY=( $( compgen -W '${partitions}' -- "${COMP_WORDS[COMP_CWORD]}" ) ) COMPREPLY=( $( compgen -W '${partitions}' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0 return 0
;; ;;
esac esac
if [[ ${cur} == -* ]] || [[ ${prev} == xen-create-image ]]; then if [[ ${cur} == -* ]] || [[ ${prev} == xen-create-image ]]; then
@@ -169,10 +169,10 @@ _xen_create_nfs()
case "$prev" in case "$prev" in
--template) --template)
_filedir _filedir
return 0 return 0
;; ;;
esac esac
if [[ ${cur} == -* ]]; then if [[ ${cur} == -* ]]; then
@@ -213,22 +213,22 @@ _xen_delete_image()
case "${prev}" in case "${prev}" in
--dir) --dir)
_filedir -d _filedir -d
return 0 return 0
;;
--evms)
COMPREPLY=( $( compgen -W '${evmscontainers}' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0
;; ;;
--evms)
COMPREPLY=( $( compgen -W '${evmscontainers}' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0
;;
--hostname) --hostname)
names=`_find_xen_images` names=`_find_xen_images`
COMPREPLY=( $(compgen -W "${names}" -- ${cur}) ) COMPREPLY=( $(compgen -W "${names}" -- ${cur}) )
return 0 return 0
;;
--lvm)
COMPREPLY=( $( compgen -W '${vgs}' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0
;; ;;
--lvm)
COMPREPLY=( $( compgen -W '${vgs}' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0
;;
esac esac
if [[ ${cur} == -* ]]; then if [[ ${cur} == -* ]]; then
@@ -271,17 +271,17 @@ _xen_update_image()
case "${prev}" in case "${prev}" in
--dir) --dir)
_filedir -d _filedir -d
return 0 return 0
;;
--evms)
COMPREPLY=( $( compgen -W '${evmscontainers}' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0
;;
--lvm)
COMPREPLY=( $( compgen -W '${vgs}' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0
;; ;;
--evms)
COMPREPLY=( $( compgen -W '${evmscontainers}' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0
;;
--lvm)
COMPREPLY=( $( compgen -W '${vgs}' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0
;;
esac esac
if [[ ${cur} == -* ]]; then if [[ ${cur} == -* ]]; then
@@ -336,14 +336,14 @@ _xt-create-xen-config()
case "$prev" in case "$prev" in
--output) --output)
_filedir -d _filedir -d
return 0 return 0
;; ;;
--template) --template)
COMPREPLY=( $( compgen -f -- ${cur#*:} ) ) COMPREPLY=( $( compgen -f -- ${cur#*:} ) )
return 0 return 0
;; ;;
esac esac
if [[ ${cur} == -* ]]; then if [[ ${cur} == -* ]]; then
@@ -377,14 +377,14 @@ _xt-customize-image()
fi fi
case "$prev" in case "$prev" in
--dist) --dist)
COMPREPLY=( $( compgen -W '${dists} sid sarge etch lenny' -- "${COMP_WORDS[COMP_CWORD]}" ) ) COMPREPLY=( $( compgen -W '${dists} sid sarge etch lenny' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0 return 0
;; ;;
--location) --location)
_filedir -d _filedir -d
return 0 return 0
;; ;;
esac esac
if [[ ${cur} == -* ]]; then if [[ ${cur} == -* ]]; then
@@ -420,26 +420,26 @@ _xt-install-image()
case "$prev" in case "$prev" in
--cache) --cache)
COMPREPLY=( $( compgen -W 'yes no' -- "${COMP_WORDS[COMP_CWORD]}" ) ) COMPREPLY=( $( compgen -W 'yes no' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0 return 0
;; ;;
--config) --config)
_filedir _filedir
return 0 return 0
;; ;;
--dist) --dist)
COMPREPLY=( $( compgen -W '${dists} sid sarge etch lenny' -- "${COMP_WORDS[COMP_CWORD]}" ) ) COMPREPLY=( $( compgen -W '${dists} sid sarge etch lenny' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0 return 0
;; ;;
--install-method) --install-method)
COMPREPLY=( $( compgen -W 'copy debootstrap rinse rpmstrap tar' -- "${COMP_WORDS[COMP_CWORD]}" ) ) COMPREPLY=( $( compgen -W 'copy debootstrap rinse rpmstrap tar' -- "${COMP_WORDS[COMP_CWORD]}" ) )
return 0 return 0
;; ;;
--location) --location)
_filedir -d _filedir -d
return 0 return 0
;; ;;
esac esac
if [[ ${cur} == -* ]]; then if [[ ${cur} == -* ]]; then