Skip to content

Commit

Permalink
querybts: Use _parse_help, not hardcoded option list, misc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed May 27, 2018
1 parent b0de719 commit 00de26b
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions completions/querybts
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,25 @@ _querybts()
COMPREPLY=( $( compgen -W "newt text gnome" -- "$cur" ) )
return
;;
--mbox-reader-cmd)
compopt -o filenames
COMPREPLY=( $( compgen -c -- "$cur" ) )
return
;;
esac

$split && return

COMPREPLY=( $( compgen -W '-h --help -v --version -A --archive -B --bts -l
--ldap --no-ldap --proxy --http_proxy -s --source -w --web -u --ui
--interface \
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' \
-- "$cur" ) $( apt-cache pkgnames -- "$cur" 2> /dev/null ) )
if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
else
COMPREPLY=( $( 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 $( apt-cache pkgnames 2>/dev/null )' -- "$cur" ) )
fi
} &&
complete -F _querybts querybts

Expand Down

0 comments on commit 00de26b

Please sign in to comment.