summary refs log tree commit diff
path: root/Completion/X/Command/_vnc
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2001-04-26 14:00:45 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2001-04-26 14:00:45 +0000
commitefe55f77a369fa38f8d9ffaf10499f73b441a390 (patch)
tree0714092385455c19a38c79db36315dae7e69c5ae /Completion/X/Command/_vnc
parent727912d1cbbc5593a870941d26f3234d49b45847 (diff)
downloadzsh-efe55f77a369fa38f8d9ffaf10499f73b441a390.tar.gz
zsh-efe55f77a369fa38f8d9ffaf10499f73b441a390.tar.xz
zsh-efe55f77a369fa38f8d9ffaf10499f73b441a390.zip
new vnc completion and use _guard for pine completion (14112)
Diffstat (limited to 'Completion/X/Command/_vnc')
-rw-r--r--Completion/X/Command/_vnc32
1 files changed, 32 insertions, 0 deletions
diff --git a/Completion/X/Command/_vnc b/Completion/X/Command/_vnc
new file mode 100644
index 000000000..094fa0d9e
--- /dev/null
+++ b/Completion/X/Command/_vnc
@@ -0,0 +1,32 @@
+#compdef vncserver vncviewer
+
+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) 
+    # should allow list for -encodings
+    _xt_arguments -shared -viewonly -fullscreen -bgr233 -owncmap -truecolour \
+      '-encodings:encodings:(copyrect hextile corre rre raw)' \
+      '-depth:depth' \
+      '-passwd:file:_files' \
+      '(1)-listen:display number' \
+      '(-listen)1::display:_x_display'
+  ;;
+esac
+