File: bti-bashcompletion

package info (click to toggle)
bti 028-2%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 600 kB
  • ctags: 302
  • sloc: ansic: 3,993; sh: 1,099; xml: 917; makefile: 56
file content (25 lines) | stat: -rw-r--r-- 636 bytes parent folder | download
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
_bti()
{
	local cur prev
	COMPREPLY=()
	cur="${COMP_WORDS[COMP_CWORD]}"
	prev="${COMP_WORDS[COMP_CWORD-1]}"
	if [[ "${cur}" == -* ]] ; then
		COMPREPLY=( $(compgen -W "-a -A -p -P -H -b -d -v -s -n -g -h -r
			--account --action --password --proxy --host --bash \
			--user --debug --dry-run --shrink-urls --page --version --verbose \
			--help --replyto" -- ${cur}) )
	fi

	if [[ "${prev}" == "--host" ]] ; then
		COMPREPLY=( $(compgen -W "twitter identica" -- ${cur} ) )
	fi

	if [[ "${prev}" == "--action" ]] ; then
		COMPREPLY=( $(compgen -W "friends public update user replies" -- ${cur} ) )
	fi

	return 0
}

complete -F _bti bti