summaryrefslogtreecommitdiffstats
path: root/completions/querybts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--completions/querybts31
1 files changed, 16 insertions, 15 deletions
diff --git a/completions/querybts b/completions/querybts
index edeba96..5b9f33a 100644
--- a/completions/querybts
+++ b/completions/querybts
@@ -1,40 +1,41 @@
# querybts completion -*- shell-script -*-
-_querybts()
+_comp_cmd_querybts()
{
- local cur prev words cword split
- _init_completion -s || return
+ local cur prev words cword was_split comp_args
+ _comp_initialize -s -- "$@" || return
+ local noargopts='!(-*|*[Bu]*)'
+ # shellcheck disable=SC2254
case $prev in
- --bts | -!(-*)B)
- COMPREPLY=($(compgen -W "debian guug kde mandrake help" \
- -- "$cur"))
+ --bts | -${noargopts}B)
+ _comp_compgen -- -W 'debian guug kde mandrake help'
return
;;
- --ui | --interface | -!(-*)u)
- COMPREPLY=($(compgen -W "newt text gnome" -- "$cur"))
+ --ui | --interface | -${noargopts}u)
+ _comp_compgen -- -W "newt text gnome"
return
;;
--mbox-reader-cmd)
- compopt -o filenames
- COMPREPLY=($(compgen -c -- "$cur"))
+ _comp_compgen_commands
return
;;
esac
- $split && return
+ [[ $was_split ]] && return
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ _comp_compgen_help
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
else
- COMPREPLY=($(compgen -W 'wnpp boot-floppies kernel bugs.debian.org
+ _comp_compgen -- -W 'wnpp boot-floppies kernel bugs.debian.org
cdimage.debian.org general installation-reports listarchives
lists.debian.org mirrors nm.debian.org press project qa.debian.org
release-notes security.debian.org tech-ctte upgrade-reports
- www.debian.org $(_xfunc apt-cache _apt_cache_packages)' -- "$cur"))
+ www.debian.org'
+ _comp_compgen -ax apt-cache packages
fi
} &&
- complete -F _querybts querybts
+ complete -F _comp_cmd_querybts querybts
# ex: filetype=sh