PageRenderTime 78ms CodeModel.GetById 76ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/bash_completion_lib/complete/civclient

http://github.com/brinkman83/bashrc
#! | 36 lines | 29 code | 7 blank | 0 comment | 0 complexity | fa5930e86336e091a02b0636bf8a91d7 MD5 | raw file
 1# civclient completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
 2
 3
 4comp_include _filedir _get_cword _known_hosts
 5
 6
 7_civclient()
 8{
 9	local cur
10
11	COMPREPLY=()
12	cur=`_get_cword`
13	prev=${COMP_WORDS[COMP_CWORD-1]}
14
15	case "$prev" in
16		-@(l|S|t|-log|-Sound|-tiles))
17			_filedir
18			return 0
19			;;
20		-@(P|-Plugin))
21			COMPREPLY=( $( compgen -W 'none esd sdl' -- $cur ) )
22			return 0
23			;;
24		-@(s|-server))
25			_known_hosts
26			return 0
27			;;
28	esac
29
30	if [[ "$cur" == -* ]]; then
31		COMPREPLY=( $( compgen -W '-a -d -h -l -m -n -p -P -s -S -t -v\
32			--autoconnect --debug --help --log --meta --name \
33			--port --Plugin --server --Sound --tiles --version' \
34			-- $cur ) )
35	fi
36} # _civclient()