2009-05-25 23:03:08 +03:00
|
|
|
# bash completion for (Debian) reportbug package
|
|
|
|
|
|
|
|
have reportbug &&
|
|
|
|
_reportbug()
|
|
|
|
{
|
2009-10-04 19:42:50 +02:00
|
|
|
local cur prev
|
2009-05-25 23:03:08 +03:00
|
|
|
|
2009-10-04 19:42:50 +02:00
|
|
|
COMPREPLY=()
|
|
|
|
cur=`_get_cword`
|
|
|
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
2009-05-25 23:03:08 +03:00
|
|
|
|
2009-10-04 19:42:50 +02:00
|
|
|
case "$prev" in
|
|
|
|
-f|--filename|-i|--include|--mta|-o|--output)
|
|
|
|
_filedir
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
-B|--bts)
|
|
|
|
COMPREPLY=( $( compgen -W "debian guug kde mandrake help" -- \
|
|
|
|
"$cur" ))
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
-e|--editor|--mua)
|
|
|
|
COMP_WORDS=(COMP_WORDS[0] "$cur")
|
|
|
|
COMP_CWORD=1
|
|
|
|
_command
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
--mode)
|
|
|
|
COMPREPLY=( $( compgen -W "novice standard expert" -- "$cur" ) )
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
-S|--severity)
|
|
|
|
COMPREPLY=( $( compgen -W "grave serious important normal \
|
|
|
|
minor wishlist" -- "$cur" ) )
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
-u|--ui|--interface)
|
|
|
|
COMPREPLY=( $( compgen -W "newt text gnome" -- "$cur" ) )
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
-t|--type)
|
|
|
|
COMPREPLY=( $( compgen -W "gnats debbugs" -- "$cur" ) )
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
-T|--tags)
|
|
|
|
COMPREPLY=( $( compgen -W "none \
|
|
|
|
woody potato sarge sarge-ignore etch etch-ignore \
|
|
|
|
lenny lenny-ignore sid experimental confirmed \
|
|
|
|
d-i fixed fixed-in-experimental fixed-upstream \
|
|
|
|
help l10n moreinfo patch pending security \
|
|
|
|
unreproducible upstream wontfix ipv6 lfs" -- "$cur" ))
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
2009-05-25 23:03:08 +03:00
|
|
|
|
2009-10-04 19:42:50 +02:00
|
|
|
COMPREPLY=($( compgen -W '-h --help -v --version -a --af -b \
|
|
|
|
--no-query-bts --query-bts -B --bts -c --configure \
|
|
|
|
--no-config-files --check-available -d --debug \
|
|
|
|
--no-check-available -e --editor --email -f \
|
|
|
|
--filename -g --gnupg -H --header -i --include -j \
|
|
|
|
--justification -l --ldap --no-ldap -L --list-cc -m \
|
|
|
|
--maintonly --mode --mua --mta --mutt -n --mh --nmh \
|
|
|
|
-o --output -p --print -P --pgp --proxy --http_proxy\
|
|
|
|
-q --quiet -Q --query-only --realname --report-quiet \
|
|
|
|
--reply-to --replyto -s --subject -S --severity \
|
|
|
|
--smtphost -t --type -T --tags --template -V -x \
|
|
|
|
--no-cc --package-version -z --no-compress \
|
|
|
|
--ui --interface -u \
|
|
|
|
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) )
|
|
|
|
_filedir
|
|
|
|
return 0
|
2009-05-25 23:03:08 +03:00
|
|
|
} &&
|
2009-10-22 12:04:29 +03:00
|
|
|
complete -F _reportbug -o filenames reportbug
|
2009-05-25 23:03:08 +03:00
|
|
|
|
|
|
|
have querybts &&
|
|
|
|
_querybts()
|
|
|
|
{
|
2009-10-04 19:42:50 +02:00
|
|
|
local cur prev split=false
|
2009-05-25 23:03:08 +03:00
|
|
|
|
2009-10-04 19:42:50 +02:00
|
|
|
COMPREPLY=()
|
|
|
|
cur=`_get_cword`
|
|
|
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
2009-05-25 23:03:08 +03:00
|
|
|
|
2009-10-04 19:42:50 +02:00
|
|
|
_split_longopt && split=true
|
2009-06-12 20:11:23 +03:00
|
|
|
|
2009-10-04 19:42:50 +02:00
|
|
|
case "$prev" in
|
|
|
|
-B|--bts)
|
|
|
|
COMPREPLY=( $( compgen -W "debian guug kde mandrake help" \
|
|
|
|
-- "$cur" ))
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
-u|--ui|--interface)
|
|
|
|
COMPREPLY=($( compgen -W "newt text gnome" -- "$cur" ))
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
2009-05-25 23:03:08 +03:00
|
|
|
|
2009-10-04 19:42:50 +02:00
|
|
|
$split && return 0
|
2009-06-12 20:11:23 +03:00
|
|
|
|
2009-10-04 19:42:50 +02:00
|
|
|
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) )
|
2009-05-25 23:03:08 +03:00
|
|
|
} &&
|
2009-10-22 12:04:29 +03:00
|
|
|
complete -F _querybts -o filenames querybts
|
2009-10-01 20:54:51 +03:00
|
|
|
|
|
|
|
# Local variables:
|
|
|
|
# mode: shell-script
|
2009-10-04 19:42:50 +02:00
|
|
|
# sh-basic-offset: 4
|
2009-10-01 20:54:51 +03:00
|
|
|
# sh-indent-comment: t
|
2009-10-04 19:42:50 +02:00
|
|
|
# indent-tabs-mode: nil
|
2009-10-01 20:54:51 +03:00
|
|
|
# End:
|
2009-10-04 19:42:50 +02:00
|
|
|
# ex: ts=4 sw=4 et filetype=sh
|