summaryrefslogtreecommitdiffstats
path: root/completions/upgradepkg
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/upgradepkg
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/upgradepkg')
-rw-r--r--completions/upgradepkg22
1 files changed, 10 insertions, 12 deletions
diff --git a/completions/upgradepkg b/completions/upgradepkg
index d3ce608..f359e9a 100644
--- a/completions/upgradepkg
+++ b/completions/upgradepkg
@@ -1,30 +1,28 @@
# Slackware Linux upgradepkg completion -*- shell-script -*-
-_upgradepkg()
+_comp_cmd_upgradepkg()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '--dry-run --install-new --reinstall
- --verbose' -- "$cur"))
+ _comp_compgen -- -W '--dry-run --install-new --reinstall --verbose'
return
fi
if [[ $cur == ?*%* ]]; then
prev="${cur%%?(\\)%*}"
cur="${cur#*%}"
- local nofiles IFS=$'\n'
+ local nofiles=""
compopt -o filenames
- COMPREPLY=($(compgen -P "$prev%" -f -X "!*.@(t[bgxl]z)" -- "$cur"))
- [[ ${COMPREPLY-} ]] || nofiles=1
- COMPREPLY+=($(compgen -P "$prev%" -S '/' -d -- "$cur"))
- [[ -v nofiles ]] && compopt -o nospace
+ _comp_compgen -- -P "$prev%" -f -X "!*.@(t[bgxl]z)" || nofiles=set
+ _comp_compgen -a -- -P "$prev%" -S '/' -d
+ [[ $nofiles ]] && compopt -o nospace
return
fi
- _filedir 't[bglx]z'
+ _comp_compgen_filedir 't[bglx]z'
} &&
- complete -F _upgradepkg upgradepkg
+ complete -F _comp_cmd_upgradepkg upgradepkg
# ex: filetype=sh