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
commitf2621414ee5f2f601424c22f00e207903e3b6104 (patch)
tree56a856dafd1ca684bb23263cacaa723ee4f404fc /completions/upgradepkg
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/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