summaryrefslogtreecommitdiffstats
path: root/completions/lz4
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/lz4
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 'completions/lz4')
-rw-r--r--completions/lz425
1 files changed, 13 insertions, 12 deletions
diff --git a/completions/lz4 b/completions/lz4
index f297b5d..8e2a777 100644
--- a/completions/lz4
+++ b/completions/lz4
@@ -1,25 +1,27 @@
# lz4 completion -*- shell-script -*-
-_lz4()
+_comp_cmd_lz4()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
case $prev in
-b)
- _filedir
+ _comp_compgen_filedir
return
;;
esac
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -X '-*#*' -W \
- '$(_parse_help "$1" -h) -B{4..7} -i{1..9}' -- "$cur"))
+ _comp_compgen -R help -- -h
+ _comp_compgen -- -X '-*#*' -W \
+ '${COMPREPLY+"${COMPREPLY[@]}"} -B{4..7} -i{1..9}'
return
fi
- local args word xspec="*.?(t)lz4"
- _count_args
+ local REPLY word xspec="*.?(t)lz4"
+ _comp_count_args
+ local args=$REPLY
((args > 2)) && return
for word in "${words[@]}"; do
@@ -41,12 +43,11 @@ _lz4()
esac
done
- _tilde "$cur" || return
+ _comp_compgen_tilde && return
- local IFS=$'\n'
compopt -o filenames
- COMPREPLY=($(compgen -f -X "$xspec" -- "$cur") $(compgen -d -- "$cur"))
+ _comp_compgen -- -f -X "$xspec" -o plusdirs
} &&
- complete -F _lz4 lz4 lz4c
+ complete -F _comp_cmd_lz4 lz4 lz4c
# ex: filetype=sh