summaryrefslogtreecommitdiff
blob: 7170c2205fcce68b692e3f1241035730aed000c1 (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# bash-completion script for devtodo
# place this in /etc/bash_completion.d

_devtodo() {
	local cur prev
	COMPREPLY=()
	cur="${COMP_WORDS[COMP_CWORD]}"
	prev="${COMP_WORDS[COMP_CWORD-1]}"
	
	if [[ "${cur}" == -* ]] || [[ ${COMP_CWORD} -eq 1 ]]; then
			COMPREPLY=($(compgen -W "-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 \
			--timeout" -- "${cur}"))
	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 -o filenames -A file -- "${cur}"))
			;;
	esac
}
complete -F _devtodo devtodo
complete -F _devtodo todo

_tda() {
	local cur prev
	COMPREPLY=()
	cur="${COMP_WORDS[COMP_CWORD]}"
	prev="${COMP_WORDS[COMP_CWORD-1]}"

	if [[ "${cur}" == -* ]] || [[ ${COMP_CWORD} -eq 1 ]]; then
		COMPREPLY=($(compgen -W "-v --verbose -g --graft -p --priority \
		-G --global --global-database --database --mono --help --version" \
		-- "${cur}"))
	fi
	
	case "${prev}" in
		-p|--priority)
			COMPREPLY=($(compgen -W "default veryhigh high medium low \
			verylow" -- "${cur}"))
			;;
			
		--*database)
			COMPREPLY=($(compgen -o filenames -A file -- "${cur}"))
			;;
	esac
}
complete -F _tda tda

_tde() {
	local cur prev
	COMPREPLY=()
	cur="${COMP_WORDS[COMP_CWORD]}"
	prev="${COMP_WORDS[COMP_CWORD-1]}"

	if [[ "${cur}" == -* ]] || [[ ${COMP_CWORD} -eq 1 ]]; then
		COMPREPLY=($(compgen -W "-v --verbose -p --priority -G --global \
		--global-database --database --mono --help --version --title -c \
		--comment"-- "${cur}"))
	fi
	
	case "${prev}" in
		-p|--priority)
			COMPREPLY=($(compgen -W "default veryhigh high medium low \
			verylow" -- "${cur}"))
			;;
			
		--*database)
			COMPREPLY=($(compgen -o filenames -A file -- "${cur}"))
			;;
	esac	
}
complete -F _tde tde

_tdr() {
	local cur prev
	COMPREPLY=()
	cur="${COMP_WORDS[COMP_CWORD]}"
	prev="${COMP_WORDS[COMP_CWORD-1]}"

	if [[ "${cur}" == -* ]] || [[ ${COMP_CWORD} -eq 1 ]]; then
		COMPREPLY=($(compgen -W "-v --verbose --global-database -G --global \
		--database --mono --help --version" -- "${cur}"))
	fi
	
	case "${prev}" in
		--*database)
			COMPREPLY=($(compgen -o filenames -A file -- "${cur}"))
			;;
	esac			
}
complete -F _tdr tdr

_tdd() {
	local cur prev
	COMPREPLY=()
	cur="${COMP_WORDS[COMP_CWORD]}"
	prev="${COMP_WORDS[COMP_CWORD-1]}"

	if [[ "${cur}" == -* ]] || [[ ${COMP_CWORD} -eq 1 ]]; then
		COMPREPLY=($(compgen -W "-v --verbose --global-database -G --global \
		--database --mono --help --version" -- "${cur}"))
	fi
	
	case "${prev}" in
		--*database)
			COMPREPLY=($(compgen -o filenames -A file -- "${cur}"))
			;;
	esac				
}
complete -F _tdd tdd