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

Re: PATCH: oops, a set -x



In article <199911121503.QAA30053@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
  Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:

> Tanaka: have you mentioned that at the time you wrote it and I missed
> it? I tried and since `_telnet' doesn't support options for my
> `telnet' at all, I couldn't find out what goes wrong with these
> options. Could you explain that to me so that we can fix it and
> simplify `_telnet'?

I wrote _telnet with the telnet source of FreeBSD.
http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.bin/telnet/main.c?rev=1.9

It may have short option "-n" and long options "-noasynch",
"-noasynchtty" and "-noasynchnet" under some circumstances.  These
long options are implemented by special case of short option "-n".

When completion is tryed just after "-n", zsh cannot decide that it is
the short option or not.  So, _telnet should complete option arguments
for "-n" and long options as:

% telnet -<TAB>
-n -noasynch -noasynchtty -noasynchnet and other options

% telnet -n<TAB>
-noasynch -noasynchtty -noasynchnet and filenames

% telnet -n <TAB>
filenames

% telnet -no<TAB>
-noasynch -noasynchtty -noasynchnet and filenames start with "o".

_arguments cannot handle this, maybe.
-- 
Tanaka Akira



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