diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
commit | f2621414ee5f2f601424c22f00e207903e3b6104 (patch) | |
tree | 56a856dafd1ca684bb23263cacaa723ee4f404fc /completions/iscsiadm | |
parent | Adding debian version 1:2.11-8. (diff) | |
download | bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.tar.xz bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.zip |
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/iscsiadm')
-rw-r--r-- | completions/iscsiadm | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/completions/iscsiadm b/completions/iscsiadm index 7786ddc..84cc817 100644 --- a/completions/iscsiadm +++ b/completions/iscsiadm @@ -1,31 +1,32 @@ # iscsiadm(1) completion -*- shell-script -*- -_iscsiadm() +_comp_cmd_iscsiadm() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return + local noargopts='!(-*|*[motLU]*)' + # shellcheck disable=SC2254 case $prev in - --mode | -!(-*)m) - COMPREPLY=($(compgen -W 'discovery node session iface fw host' \ - -- "$cur")) + --mode | -${noargopts}m) + _comp_compgen -- -W 'discovery node session iface fw host' return ;; - --op | -!(-*)o) - COMPREPLY=($(compgen -W 'new delete update show' -- "$cur")) + --op | -${noargopts}o) + _comp_compgen -- -W 'new delete update show' return ;; - --type | -!(-*)t) - COMPREPLY=($(compgen -W 'sendtargets st slp isns fw' -- "$cur")) + --type | -${noargopts}t) + _comp_compgen -- -W 'sendtargets st slp isns fw' return ;; - --loginall | --logoutall | -!(-*)[LU]) - COMPREPLY=($(compgen -W 'all manual automatic' -- "$cur")) + --loginall | --logoutall | -${noargopts}[LU]) + _comp_compgen -- -W 'all manual automatic' return ;; esac - $split && return + [[ $was_split ]] && return local options if ((cword > 1)); then @@ -59,8 +60,8 @@ _iscsiadm() options='--mode' fi - COMPREPLY=($(compgen -W "$options" -- "$cur")) + _comp_compgen -- -W "$options" } && - complete -F _iscsiadm iscsiadm + complete -F _comp_cmd_iscsiadm iscsiadm # ex: filetype=sh |