zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: oops, a set -x
@ 1999-11-12 15:03 Sven Wischnowsky
  1999-11-12 16:08 ` Tanaka Akira
  0 siblings, 1 reply; 2+ messages in thread
From: Sven Wischnowsky @ 1999-11-12 15:03 UTC (permalink / raw)
  To: zsh-workers


I forgot to remove a `set -x' in `_telnet'.

That's because I wanted to find out why Tanaka (I think it was him)
wrote:

  # _arguments cannot handle following three options.
  optionmap=( "[-noasynch]" '-noasynch' \
              "[-noasyncnet]" '-noasyncnet' \
              "[-noasynctty]" '-noasynctty' )

and the proceeds to do the option handling by hand...

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'?


Bye
 Sven

diff -u oldcompletion/User/_telnet Completion/User/_telnet
--- oldcompletion/User/_telnet	Fri Nov 12 15:56:05 1999
+++ Completion/User/_telnet	Fri Nov 12 15:59:54 1999
@@ -7,7 +7,7 @@
 
 local context state line expl
 typeset -A opt_args
-set -x
+
 if (( ! $+_telnet_short )); then
   local k help="$(telnet -\? < /dev/null 2>&1)"
   local -A optionmap

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH: oops, a set -x
  1999-11-12 15:03 PATCH: oops, a set -x Sven Wischnowsky
@ 1999-11-12 16:08 ` Tanaka Akira
  0 siblings, 0 replies; 2+ messages in thread
From: Tanaka Akira @ 1999-11-12 16:08 UTC (permalink / raw)
  To: zsh-workers

In article <199911121503.QAA30053@beta.informatik.hu-berlin.de>,
  Sven Wischnowsky <wischnow@informatik.hu-berlin.de> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-11-12 16:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-12 15:03 PATCH: oops, a set -x Sven Wischnowsky
1999-11-12 16:08 ` Tanaka Akira

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).