summaryrefslogtreecommitdiffstats
path: root/completions/hddtemp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:19 +0000
commit6c09f2a45c5541e9c207d14fc7aa21a4a0066bde (patch)
tree0221189d367bf661f6f9493c4f17a03f0dd4b7d2 /completions/hddtemp
parentReleasing progress-linux version 1:2.11-8~progress7.99u1. (diff)
downloadbash-completion-6c09f2a45c5541e9c207d14fc7aa21a4a0066bde.tar.xz
bash-completion-6c09f2a45c5541e9c207d14fc7aa21a4a0066bde.zip
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/hddtemp')
-rw-r--r--completions/hddtemp32
1 files changed, 17 insertions, 15 deletions
diff --git a/completions/hddtemp b/completions/hddtemp
index 7b95f0e..7dbdec3 100644
--- a/completions/hddtemp
+++ b/completions/hddtemp
@@ -1,38 +1,40 @@
# hddtemp(8) completion -*- shell-script -*-
-_hddtemp()
+_comp_cmd_hddtemp()
{
- 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='!(-*|*[flupsS]*)'
+ # shellcheck disable=SC2254
case $prev in
- --file | -!(-*)f)
- _filedir db
+ --file | -${noargopts}f)
+ _comp_compgen_filedir db
return
;;
- --listen | -!(-*)l)
- _ip_addresses
+ --listen | -${noargopts}l)
+ _comp_compgen_ip_addresses
return
;;
- --unit | -!(-*)u)
- COMPREPLY=($(compgen -W 'C F' -- "$cur"))
+ --unit | -${noargopts}u)
+ _comp_compgen -- -W 'C F'
return
;;
- --port | --separator | --syslog | --version | --help | -!(-*)[psSvh?])
+ --port | --separator | --syslog | --version | --help | -${noargopts}[psSvh?])
return
;;
esac
- $split && return
+ [[ $was_split ]] && return
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1") --help' -- "$cur"))
+ _comp_compgen_help
+ _comp_compgen -a -- -W '--help'
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
else
- cur=${cur:=/dev/}
- _filedir
+ _comp_compgen -c "${cur:-/dev/}" filedir
fi
} &&
- complete -F _hddtemp hddtemp
+ complete -F _comp_cmd_hddtemp hddtemp
# ex: filetype=sh