summaryrefslogtreecommitdiff
path: root/to_review/vncviewer
blob: 02c9105102e25d8c5efad017259e5337c976691d (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
# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
# ex: ts=8 sw=8 noet filetype=sh
#
# bash completion for vncviewer

have vncviewer &&
_vncviewer()
{
	local cur prev

	COMPREPLY=()
	cur=`_get_cword`
	prev=${COMP_WORDS[COMP_CWORD-1]}

	case $prev in
		-passwd)
			_filedir
			return 0
			;;
		-encodings)
			COMPREPLY=( $( compgen -W 'copyrect tight hextile zlib \
				corre rre raw' -- $cur ) )
			return 0
			;;
		-via)
			_known_hosts
			return 0
			;;
	esac


	if [[ "$cur" == -* ]]; then
		COMPREPLY=( $( compgen -W '-help -listen -via -shared -noshared\
			-viewonly -fullscreen -noraiseonbeep -passwd -encodings\
			-bgr233 -owncmap -truecolour -truecolor -depth \
			-compresslevel -quality -nojpeg -nocursorshape \
			-x11cursor' -- $cur ) )
	else
		_known_hosts
	fi
} &&
complete -F _vncviewer vncviewer