summaryrefslogtreecommitdiffstats
path: root/completions/sitecopy
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/sitecopy
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/sitecopy')
-rw-r--r--completions/sitecopy30
1 files changed, 16 insertions, 14 deletions
diff --git a/completions/sitecopy b/completions/sitecopy
index 8515687..87e8775 100644
--- a/completions/sitecopy
+++ b/completions/sitecopy
@@ -3,31 +3,33 @@
# 2011 Raphaƫl Droz <raphael.droz+floss@gmail.com>
# License: GNU GPL v2 or later
-_sitecopy()
+_comp_cmd_sitecopy()
{
- 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='!(-*|*[dgrp]*)'
+ # shellcheck disable=SC2254
case $prev in
- --debug | -!(-*)d)
- COMPREPLY=($(compgen -W "socket files rcfile ftp http httpbody
- rsh sftp xml xmlparse cleartext" -- "$cur"))
+ --debug | -${noargopts}d)
+ _comp_compgen -- -W 'socket files rcfile ftp http httpbody rsh sftp
+ xml xmlparse cleartext'
compopt -o nospace
return
;;
- --logfile | --rcfile | -!(-*)[gr])
- _filedir
+ --logfile | --rcfile | -${noargopts}[gr])
+ _comp_compgen_filedir
return
;;
- --storepath | -!(-*)p)
- _filedir -d
+ --storepath | -${noargopts}p)
+ _comp_compgen_filedir -d
return
;;
esac
case $cur in
--*)
- COMPREPLY=($(compgen -W "$(_parse_help $1)" -- "$cur"))
+ _comp_compgen_help
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
return
;;
@@ -41,10 +43,10 @@ _sitecopy()
esac
if [[ -r ~/.sitecopyrc ]]; then
- COMPREPLY=($(compgen -W "$($1 -v |
- command sed -n '/^Site:/s/Site: //p')" -- "$cur"))
+ _comp_compgen_split -- "$("$1" -v |
+ command sed -n '/^Site:/s/Site: //p')"
fi
} &&
- complete -F _sitecopy -o default sitecopy
+ complete -F _comp_cmd_sitecopy -o default sitecopy
# ex: filetype=sh