summaryrefslogtreecommitdiff
path: root/completions/iscsiadm
diff options
context:
space:
mode:
Diffstat (limited to 'completions/iscsiadm')
-rw-r--r--completions/iscsiadm24
1 files changed, 12 insertions, 12 deletions
diff --git a/completions/iscsiadm b/completions/iscsiadm
index 1fa30db6..7786ddcd 100644
--- a/completions/iscsiadm
+++ b/completions/iscsiadm
@@ -6,21 +6,21 @@ _iscsiadm()
_init_completion -s || return
case $prev in
- --mode|-!(-*)m)
- COMPREPLY=( $(compgen -W 'discovery node session iface fw host' \
- -- "$cur") )
+ --mode | -!(-*)m)
+ COMPREPLY=($(compgen -W 'discovery node session iface fw host' \
+ -- "$cur"))
return
;;
- --op|-!(-*)o)
- COMPREPLY=( $(compgen -W 'new delete update show' -- "$cur") )
+ --op | -!(-*)o)
+ COMPREPLY=($(compgen -W 'new delete update show' -- "$cur"))
return
;;
- --type|-!(-*)t)
- COMPREPLY=( $(compgen -W 'sendtargets st slp isns fw' -- "$cur") )
+ --type | -!(-*)t)
+ COMPREPLY=($(compgen -W 'sendtargets st slp isns fw' -- "$cur"))
return
;;
- --loginall|--logoutall|-!(-*)[LU])
- COMPREPLY=( $(compgen -W 'all manual automatic' -- "$cur") )
+ --loginall | --logoutall | -!(-*)[LU])
+ COMPREPLY=($(compgen -W 'all manual automatic' -- "$cur"))
return
;;
esac
@@ -28,7 +28,7 @@ _iscsiadm()
$split && return
local options
- if [[ $cword -gt 1 ]]; then
+ if ((cword > 1)); then
case ${words[2]} in
discovery)
@@ -59,8 +59,8 @@ _iscsiadm()
options='--mode'
fi
- COMPREPLY=( $(compgen -W "$options" -- "$cur") )
+ COMPREPLY=($(compgen -W "$options" -- "$cur"))
} &&
-complete -F _iscsiadm iscsiadm
+ complete -F _iscsiadm iscsiadm
# ex: filetype=sh