[Bash-completion-commits] ./current r1282: completion for vncviewer
Guillaume Rousse
guillomovitch at zarb.org
Mon Jan 19 21:29:24 UTC 2009
------------------------------------------------------------
revno: 1282
committer: Guillaume Rousse <guillomovitch at zarb.org>
branch nick: bash-completion
timestamp: Mon 2009-01-19 22:29:24 +0100
message:
completion for vncviewer
added:
to_review/vncviewer
-------------- next part --------------
=== added file 'to_review/vncviewer'
--- a/to_review/vncviewer 1970-01-01 00:00:00 +0000
+++ b/to_review/vncviewer 2009-01-19 21:29:24 +0000
@@ -0,0 +1,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
More information about the Bash-completion-commits
mailing list