about summary refs log tree commit diff
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
parent727912d1cbbc5593a870941d26f3234d49b45847 (diff)
downloadzsh-efe55f77a369fa38f8d9ffaf10499f73b441a390.tar.gz
zsh-efe55f77a369fa38f8d9ffaf10499f73b441a390.tar.xz
zsh-efe55f77a369fa38f8d9ffaf10499f73b441a390.zip
new vnc completion and use _guard for pine completion (14112)
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Base/Utility/.distfiles2
-rw-r--r--Completion/Unix/Command/_pine4
-rw-r--r--Completion/X/Command/.distfiles2
-rw-r--r--Completion/X/Command/_vnc32
5 files changed, 42 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 4889ec742..96cd1cd74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-04-26  Oliver Kiddle  <opk@zsh.org>
+
+	* 14112: Completion/Base/Utility/.distfiles,
+	Completion/Unix/Command/_pine, Completion/X/Command/.distfiles,
+	Completion/X/Command/_vnc: new _vnc and use of new _guard in _pine
+
 2001-04-26  Sven Wischnowsky  <wischnow@zsh.org>
 
 	* 14107: Completion/compaudit, Completion/compinstall,
diff --git a/Completion/Base/Utility/.distfiles b/Completion/Base/Utility/.distfiles
index 74f431a6f..af44cc8cb 100644
--- a/Completion/Base/Utility/.distfiles
+++ b/Completion/Base/Utility/.distfiles
@@ -2,7 +2,7 @@ DISTFILES_SRC='
 .distfiles
 _alternative      _call_program     _nothing          _sub_commands
 _arg_compile      _combination      _regex_arguments  _values
-_arguments        _contexts         _retrieve_cache
+_arguments        _contexts         _retrieve_cache   _guard
 _cache_invalid    _describe         _sep_parts
 _call_function    _multi_parts      _store_cache
 '
diff --git a/Completion/Unix/Command/_pine b/Completion/Unix/Command/_pine
index bed8a32f3..8eb49fe6a 100644
--- a/Completion/Unix/Command/_pine
+++ b/Completion/Unix/Command/_pine
@@ -31,11 +31,11 @@ _arguments -C -s \
   "($opts $idx -url)-attach_and_delete[go to composer, attach file, delete when finished]:file:_files" \
   "($opts $idx $send)-url[open the given URL]:url:->url" \
   "($opts $send)-f+[specify mailbox to load]:mailbox: _mailboxes" \
-  "($opts $send)-c+[specify context to apply to -f arg]:number" \
+  "($opts $send)-c+[specify context to apply to -f arg]:number:_guard '[0-9]#'" \
   "($opts $send)-sort[specify sort order of folder]:sort order:(${(j: :)sortorder})" \
   "($opts $send)-i[go directly to index, bypassing main menu]" \
   "($opts $send)-I+[specify initial keystrokes to be executed]:keystrokes" \
-  "($opts $send)-n+[entry in index to begin on]:number" \
+  "($opts $send)-n+[entry in index to begin on]:number:_guard '[0-9]#'" \
   "($opts $send)-o[open first folder read-only]" \
   "(-F -h)-r[restricted - can only send mail to oneself]" \
   "(${opts#-F})-k[force use of function keys]" \
diff --git a/Completion/X/Command/.distfiles b/Completion/X/Command/.distfiles
index 51c5d10d1..5cc5d5e6d 100644
--- a/Completion/X/Command/.distfiles
+++ b/Completion/X/Command/.distfiles
@@ -1,5 +1,5 @@
 DISTFILES_SRC='
 .distfiles
 _gv        _netscape  _xauth     _xfig      _xrdb      _xterm     _xwit
-_nedit     _x_utils   _xdvi      _xmodmap   _xset      _xv
+_nedit     _vnc       _x_utils   _xdvi      _xmodmap   _xset      _xv
 '
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
+