summaryrefslogtreecommitdiffstats
path: root/completions/cfrun
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
commitf2621414ee5f2f601424c22f00e207903e3b6104 (patch)
tree56a856dafd1ca684bb23263cacaa723ee4f404fc /completions/cfrun
parentAdding debian version 1:2.11-8. (diff)
downloadbash-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 '')
-rw-r--r--completions/cfrun18
1 files changed, 9 insertions, 9 deletions
diff --git a/completions/cfrun b/completions/cfrun
index 72b6138..445bccd 100644
--- a/completions/cfrun
+++ b/completions/cfrun
@@ -1,9 +1,9 @@
# cfrun completion -*- shell-script -*-
-_cfrun()
+_comp_cmd_cfrun()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
local i section=1
for ((i = 1; i < cword; i++)); do
@@ -16,13 +16,13 @@ _cfrun()
1)
case $prev in
-f)
- _filedir
+ _comp_compgen_filedir
return
;;
esac
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '-f -h -d -S -T -v' -- "$cur"))
+ _comp_compgen -- -W '-f -h -d -S -T -v'
else
local hostfile=${CFINPUTS:-/var/lib/cfengine/inputs}/cfrun.hosts
for ((i = 1; i < cword; i++)); do
@@ -33,15 +33,15 @@ _cfrun()
done
[[ ! -f $hostfile ]] && return
- COMPREPLY=($(compgen -W "$(command grep -v \
- -E '(=|^$|^#)' $hostfile)" -- "$cur"))
+ _comp_compgen_split -- "$(command grep -v -E '(=|^$|^#)' \
+ "$hostfile")"
fi
;;
2)
- COMPREPLY=($(compgen -W '$(_parse_help cfagent)' -- "$cur"))
+ _comp_compgen_help -c cfagent --help
;;
esac
} &&
- complete -F _cfrun cfrun
+ complete -F _comp_cmd_cfrun cfrun
# ex: filetype=sh