Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tag: 1.6.6
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (29 sloc) 1.073 kb
#!/bin/bash
_burp() {
local cur prev opts categories ng
_get_comp_words_by_ref cur prev
# Valid upload categories
categories="daemons devel editors emulators games gnome i18n kde kernels lib
modules multimedia network office science system x11 xfce"
# Valid longopts
opts="-u --user -p --password -c --category -k --keep-cookies -C --cookies -v --verbose"
# nullglob avoids problems when no results are found
[[ -o nullglob ]] || { shopt -s nullglob; ng=1; }
if [[ $cur == -* ]]; then
COMPREPLY=( $(compgen -W "$opts" -- $cur ) )
else
case "$prev" in
# complete normally
"-C"|"--cookies")
COMPREPLY=( $(compgen -f -- $cur) ) ;;
"-c"|"--category") COMPREPLY=($(compgen -W "$categories" -- $cur)) ;;
# don't complete anything
"-u"|"--user"|"-p"|"--password") ;;
# else, complete *.src.tar.gz files
*) COMPREPLY=($(compgen -f -X '!*.src.tar.gz' -- $cur)) ;;
esac
fi
# restore nullglob setting
[[ $ng ]] && shopt -u nullglob
}
complete -o plusdirs -F _burp burp
Jump to Line
Something went wrong with that request. Please try again.