Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: _arguments: Sets not working?



On Sun, Jan 23, 2011 at 07:51:25PM +0100, Mikael Magnusson wrote:

>> It looks like argument sets separated by single hyphens are not working.
>> You can see the bug by trying to complete arguments of 'vncserver'. When
>> you ask for completions, none are returned. [Behaviour persists in
>> latest release from Git]
>>
> FWIW, the completion appears to work fine here. If i specify -help, no
> other completions are offered, and same for -kill or the other set as
> well. I even found i still had an Xvnc process running from a few
> weeks ago when i pressed tab again after -kill :).

Thanks Peter/Mikael for looking into it and confirming it works on your
system. I found the problem was that I had

    alias vncserver='\vncserver -localhost -nolisten tcp'

in my .zshrc. The completer didn't know about -nolisten option, and so
was refusing to complete anything else for me.

I guess this is because the Xvnc options were missing from the
completer. I added them, and am attaching them to this message (diff
-u),

Thanks again,

GI

-- 
A topologist is a person who doesn't know the difference between a
coffee cup and a doughnut.
--- /free/tmp/src/zsh/Completion/X/Command/_vnc	2011-01-15 20:53:15.635331696 -0500
+++ _vnc	2011-01-23 15:28:37.489848153 -0500
@@ -6,13 +6,78 @@
 
 case $service in
   vncserver)
-    # currently lacking Xvnc arguments
+    # currently missing: bc, c, nologo, r, ttyxx, v
+    # Don't know values for -nolisten (other than tcp).
     _arguments \
       - start \
 	'-name:desktop name:_x_name' \
+	'-a[mouse acceleration (pixels)]:#:' \
+	'-ac[disable access control restrictions]' \
+	'-audit[set audit trail level]:int:' \
+	'-auth[select authorization file]:file:_files' \
+	'-bs[disable any backing store support]' \
+	'-c[turns off key-click]' \
+	'-cc[default color visual class]:int:' \
+	'-co[color database file]:file:_files' \
+	'-core[generate core dump on fatal error]' \
+	'-dpi[screen resolution in dots per inch]:int:' \
+	'-deferglyphs[defer loading of glyphs]:type:(none all 16)' \
+	'-f[bell base]:level (0-100):' \
+	'-fc[cursor font]:string:' \
+	'-fn[default font name]:string:' \
+	'-fp[default font path]:string:' \
+	'-help[prints message with these options]' \
+	'-I[ignore all remaining arguments]' \
+	'-ld[limit data space to N Kb]:int:' \
+	'-lf[limit number of open files to N]:int:' \
+	'-ls[limit stack space to N Kb]:int:' \
+	'-nolock[disable the locking mechanism]' \
+	'-logo[enable logo in screen saver]' \
+	'-nolisten[dont listen on protocol]:protocol:(tcp)' \
+	'-p[screen-saver pattern duration (minutes)]:time (minutes):' \
+	'-pn[accept failure to listen on all ports]' \
+	'-nopn[reject failure to listen on all ports]' \
+	'-r[turns off auto-repeat]' \
+	'-s[screen-saver timeout (minutes)]:timeout (minutes):' \
+	'-su[disable any save under support]' \
+	'-t[mouse threshold]:pixels:' \
+	'-terminate[terminate at server reset]' \
+	'-to[connection time out]:time:' \
+	'-tst[disable testing extensions]' \
+	'-v[screen-saver without video blanking]' \
+	'-wm[WhenMapped default backing-store]' \
+	'-x[loads named extension at init time ]:string:' \
+	'-query[contact named host for XDMCP]:host-name:_hosts' \
+	'-broadcast[broadcast for XDMCP]' \
+	'-indirect[contact named host for indirect XDMCP]:host-name:_hosts' \
+	'-port[UDP port number to send messages to]:port:' \
+	'-once[Terminate server after one session]' \
+	'-class[specify display class to send in manage]:display-class:' \
+	'-cookie[specify the magic cookie for XDMCP]:xdm-auth-bits:' \
+	'-displayID[manufacturer display ID for request]:display-id:' \
 	'-geometry:geometry:(1600x1200 1280x1024 1152x864 1024x768 800x600 640x480)' \
 	'-depth:pixel depth:(8 16 24 32)' \
 	'-pixelformat:pixel format' \
+	'-udpinputport[UDP port for keyboard/pointer data]:port:' \
+	'-rfbport[TCP port for RFB protocol]:port:' \
+	'-rfbwait[max time in ms to wait for RFB client]:time:' \
+	'-nocursor[dont put up a cursor]' \
+	'-rfbauth[use authentication on RFB protocol]:passwd-file:_files' \
+	'-httpd[serve files via HTTP from here]:dir:_files -/' \
+	'-httpport[port for HTTP]:port:' \
+	'-deferupdate[time in ms to defer updates (default 40)]:time (ms):' \
+	'-economictranslate[less memory-hungry translation]' \
+	'-lazytight[disable "gradient" filter in tight encoding]' \
+	'-desktop[VNC desktop name (default x11)]:name:' \
+	'-alwaysshared[always treat new clients as shared]' \
+	'-nevershared[never treat new clients as shared]' \
+	'-dontdisconnect[dont disconnect existing clients for new non-shared connections]' \
+	'-viewonly[let clients only to view the desktop]' \
+	'-localhost[only allow connections from localhost]' \
+	'-interface[only bind to specified interface address]:ipaddr:' \
+	'-inetd[Xvnc is launched by inetd]' \
+	'-compatiblekbd[set META key = ALT key as in the original VNC]' \
+	'-version[report Xvnc version on stderr]' \
 	'1:: :_guard "(|:[0-9]#)" "display number"' \
       - kill \
 	"-kill:display number:($displays)" \


Messages sorted by: Reverse Date, Date, Thread, Author