forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
devtodo.bash-completion
43 lines (38 loc) · 1.39 KB
/
devtodo.bash-completion
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# bash command-line completion for devtodo
# Author: Aaron Walker <[email protected]>
_devtodo() {
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="-v --verbose -a --add -g --graft -l --link -R --reparent
-p --priority -e --edit --remove -d --done -D --not-done
--global-database -G --global --database -T --TODO -A --all
-f --filter --colour --force-colour --mono --help --version
--title --date-format --format --use-format --sort --paranoid
--database-loaders --backup -s --summary -c --comment --timeout
--purge"
if [[ "${cur}" == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
fi
case "${prev}" in
-p|--priority)
COMPREPLY=( $(compgen -W "default veryhigh high medium low verylow" \
-- ${cur}) )
;;
--database-loaders)
COMPREPLY=( $(compgen -W "xml binary" -- ${cur}) )
;;
-l|--link|--*database)
COMPREPLY=( $(compgen -f -- ${cur}) )
;;
*)
COMPREPLY=()
;;
esac
}
complete -o filenames -F _devtodo devtodo todo tda tde tdr tdd
# vim: set ft=sh tw=80 sw=4 et :