summaryrefslogtreecommitdiffstats
path: root/completions/lzop
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/lzop
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/lzop')
-rw-r--r--completions/lzop28
1 files changed, 14 insertions, 14 deletions
diff --git a/completions/lzop b/completions/lzop
index 2642742..5cbd51f 100644
--- a/completions/lzop
+++ b/completions/lzop
@@ -1,32 +1,33 @@
# lzop(1) completion -*- shell-script -*-
-_lzop()
+_comp_cmd_lzop()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
+ local noargopts='!(-*|*[oS]*)'
+ # shellcheck disable=SC2254
case $prev in
- --output | -!(-*)o)
- _filedir
+ --output | -${noargopts}o)
+ _comp_compgen_filedir
return
;;
--path)
- _filedir -d
+ _comp_compgen_filedir -d
return
;;
- --suffix | -!(-*)S)
+ --suffix | -${noargopts}S)
return
;;
esac
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '-1 -2 -3 -4 -5 -6 -7 -8 -9 -P
+ _comp_compgen -- -W '-{1..9} -P
--fast --best --decompress --extract --test --list --ls --info
--sysinfo --license --help --version --stdout --output --path
--force --no-checksum --no-name --name --no-mode --no-time --suffix
--keep --delete --crc32 --no-warn --ignore-warn --quiet --verbose
- --no-stdin --filter --checksum --no-color --mono --color' \
- -- "$cur"))
+ --no-stdin --filter --checksum --no-color --mono --color'
return
fi
@@ -48,12 +49,11 @@ _lzop()
;;
esac
- _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 _lzop lzop
+ complete -F _comp_cmd_lzop lzop
# ex: filetype=sh