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

Re: PATCH: completion



In article <199908231346.PAA03326@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
  Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:

> This tries to implement this.

OK. I wrote _xterm.

It uses '-e:*::program: _normal' as the argument to _arguments and
`xterm -e <TAB>' works well. But `xterm -132 -e <TAB>' does not.

Z(2):akr@is27e1u11% ./Src/zsh -f
is27e1u11% bindkey -e; fpath=($PWD/Completion/*(/)); autoload -U compinit; compinit -D; compdef _tst tst
is27e1u11% compconf group_matches=yes
is27e1u11% compconf message_format='%d'
is27e1u11% compconf description_format='%d'
is27e1u11% xterm -132 -e <TAB>_normal: bad option: -e [26]

file
CVS/            Functions/      Src/            config.guess*   configure.in 
ChangeLog       INSTALL         StartupFiles/   config.h        install-sh*
ChangeLog.3.0   META-FAQ        Util/           config.h.in     mkinstalldirs*
Completion/     Makefile        acconfig.h      config.log      stamp-h 
Config/         Makefile.in     aclocal.m4      config.status*  stamp-h.in 
Doc/            Misc/           aczsh.m4        config.sub*     
Etc/            README          config.cache    configure*      

This is because _arguments does not cut off words correctly, I think.

Index: Completion/User/_xterm
===================================================================
RCS file: _xterm
diff -N _xterm
--- /dev/null	Fri Apr 17 15:56:34 1998
+++ Completion/User/_xterm	Mon Aug 23 15:43:48 1999
@@ -0,0 +1,72 @@
+#compdef xterm
+
+_arguments \
+  '-version' \
+  '-help' \
+  '-132' \
+  '-ah' '+ah' \
+  '-ai' '+ai' \
+  '-aw' '+aw' \
+  '-b:inner border size:' \
+  '-bc' '+bc' \
+  '-bcf:time text cursor is off when blinking (milliseconds):' \
+  '-bcn:time text cursor is on when blinking (milliseconds):' \
+  '-bdc' '+bdc' \
+  '-cb' '+cb' \
+  '-cc:character class:' \
+  '-cm' '+cm' \
+  '-cn' '+cn' \
+  '-cr:text cursor color:_color' \
+  '-cu' '+cu' \
+  '-dc' '+dc' \
+  '-e:*::program: _normal' \
+  '-fb:bold font:' \
+  '-fi:icon font:' \
+  '-hc:background color for highlighted text:_color' \
+  '-hf' '+hf' \
+  '-ie' '+ie' \
+  '-im' '+im' \
+  '-j' '+j' \
+  '-leftbar' \
+  '-ls' '+ls' \
+  '-mb' '+mb' \
+  '-mc:multi-click threshold (milliseconds):' \
+  '-ms:pointer cursor color:_color' \
+  '-nb:margin bell number:' \
+  '-nul' '+nul' \
+  '-pc' '+pc' \
+  '-rightbar' \
+  '-rw' '+rw' \
+  '-s' '+s' \
+  '-samename' '+samename' \
+  '-sb' '+sb' \
+  '-sf' '+sf' \
+  '-si' '+si' \
+  '-sk' '+sk' \
+  '-sl:save lines:' \
+  '-sp' '+sp' \
+  '-t' '+t' \
+  '-ti:terminal ID:(vt52 vt100 vt101 vt102 vt220)' \
+  '-tm:terminal setting:' \
+  '-tn:terminal type:' \
+  '-u8' '+u8' \
+  '-ulc' '+ulc' \
+  '-ut' '+ut' \
+  '-vb' '+vb' \
+  '-wc' '+wc' \
+  '-wf' '+wf' \
+  '-ziconbeep:iconbeep (percent):' \
+  '-C' \
+  '-S-:pseudo-terminal and file descriptor:' \
+  '-bd:border color:_color' \
+  '-bg:background color:_color' \
+  '-bw:border width:' \
+  '-display:display:' \
+  '-fg:foreground color:_color' \
+  '-fn:font:' \
+  '-geometry:geometry:' \
+  '-iconic' \
+  '-name:name:' \
+  '-rv' \
+  '-title:title:' \
+  '-xrm:resource:'
-- 
Tanaka Akira



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