about summary refs log tree commit diff
path: root/Completion/X
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2001-06-28 11:14:53 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2001-06-28 11:14:53 +0000
commitfe1623d5c07f0f0f7a211c5cc558ace47ec04abe (patch)
treee2424ef89b6363be2bc29315741e321b355ebf85 /Completion/X
parentb9714666433b4ff3606331706828a3e341dd5a83 (diff)
downloadzsh-fe1623d5c07f0f0f7a211c5cc558ace47ec04abe.tar.gz
zsh-fe1623d5c07f0f0f7a211c5cc558ace47ec04abe.tar.xz
zsh-fe1623d5c07f0f0f7a211c5cc558ace47ec04abe.zip
fix for two digit display numbers and -encodings option
Diffstat (limited to 'Completion/X')
-rw-r--r--Completion/X/Command/_vnc31
1 files changed, 31 insertions, 0 deletions
diff --git a/Completion/X/Command/_vnc b/Completion/X/Command/_vnc
new file mode 100644
index 000000000..24ffc3f83
--- /dev/null
+++ b/Completion/X/Command/_vnc
@@ -0,0 +1,31 @@
+#compdef vncserver vncviewer xvncviewer
+
+local displays args
+displays=( ~/.vnc/$HOST:<->.pid(N:r:t:s/$HOST//) )
+displays=( \\${^displays} ) 
+
+case $service in
+  vncserver)
+    # currently lacking Xvnc arguments
+    _arguments \
+      - start \
+	'-name:desktop name:_x_name' \
+	'-geometry:geometry:(1600x1200 1280x1024 1152x864 1024x768 800x600 640x480)' \
+	'-depth:pixel depth:(8 16 24 32)' \
+	'-pixelformat:pixel format' \
+	'1::display number:_guard "(|:[0-9]#)"' \
+      - kill \
+	"-kill:display number:($displays)" \
+      - help \
+	'-help'
+  ;;
+  *vncviewer) 
+    _xt_arguments -shared -viewonly -fullscreen -bgr233 -owncmap -truecolour \
+      '-encodings:encodings:_values -s " " copyrect hextile corre rre raw' \
+      '-depth:depth' \
+      '-passwd:file:_files' \
+      '(1)-listen:display number' \
+      '(-listen)1::display:_x_display'
+  ;;
+esac
+