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
commitf4acb49ea148cdd899f7f29f1591c7bc853c2135 (patch)
treeb62d60873864065d6428a84a119dd8a3c90f1397 /completions/lz4
parentAdding upstream version 1:2.11. (diff)
downloadbash-completion-f4acb49ea148cdd899f7f29f1591c7bc853c2135.tar.xz
bash-completion-f4acb49ea148cdd899f7f29f1591c7bc853c2135.zip
Adding upstream version 1:2.12.0.upstream/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