Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: 1.6
Fetching contributors…

Cannot retrieve contributors at this time

44 lines (31 sloc) 1.122 kb
#!/bin/bash
_burp() {
local cur prev opts categories src ng
# nullglob avoids problems when no results are found
[[ ! -o nullglob ]] && { shopt -s nullglob; ng=1; }
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
# 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="--user --password --category --keep-cookies --cookies --verbose"
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.