zsh-workers
 help / color / mirror / code / Atom feed
* Problems with Functions/Misc/nslookup
@ 2001-05-30 18:01 Bart Schaefer
  2001-05-31  7:33 ` Sven Wischnowsky
  0 siblings, 1 reply; 2+ messages in thread
From: Bart Schaefer @ 2001-05-30 18:01 UTC (permalink / raw)
  To: zsh-workers

Most seriously, on my system it doesn't always notice when the prompt is
back:

schaefer[502] nslookup                                              4.0.1-pre-5
Default Server:  ns.best.com
Address:  204.156.128.1

> set querytype=mx
(hangs here until interrupted)

I think this may be because nslookup does not print anything at all (not
even a blank line) before printing the prompt, after executing a `set'
command.  It does find the prompt after a name lookup (see below).

Then there's this interesting completion behavior:

schaefer[504] nslookup                                              4.0.1-pre-5
Default Server:  ns.best.com
Address:  204.156.128.1

> zanshin.com
Server:  ns.best.com
Address:  204.156.128.1

Name:    zanshin.com
Address:  167.160.213.139

> set querytype=m<TAB>
> set querytype=m:\{a-zA-Z\}=\{A-Za-z\}\ r:\|\[-._,\]=\*\*\ r:\|=\*\* 

I'm pretty sure it wasn't supposed to literally insert a matcher spec there.
:-)

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

* Re: Problems with Functions/Misc/nslookup
  2001-05-30 18:01 Problems with Functions/Misc/nslookup Bart Schaefer
@ 2001-05-31  7:33 ` Sven Wischnowsky
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 2001-05-31  7:33 UTC (permalink / raw)
  To: zsh-workers

Bart Schaefer wrote:

> Most seriously, on my system it doesn't always notice when the prompt is
> back:
> 
> schaefer[502] nslookup                                              4.0.1-pre-5
> Default Server:  ns.best.com
> Address:  204.156.128.1
> 
> > set querytype=mx
> (hangs here until interrupted)
> 
> I think this may be because nslookup does not print anything at all (not
> even a blank line) before printing the prompt, after executing a `set'
> command.  It does find the prompt after a name lookup (see below).

Yes, that pattern used for zpty -r has to be a bit more intelligent.

> Then there's this interesting completion behavior:
> 
> ...
> 
> > set querytype=m<TAB>
> > set querytype=m:\{a-zA-Z\}=\{A-Za-z\}\ r:\|\[-._,\]=\*\*\ r:\|=\*\* 
> 
> I'm pretty sure it wasn't supposed to literally insert a matcher spec there.
> :-)

Oops.  _values got slightly confused when not given a separator character.

Bye
  Sven

Index: Completion/Base/Utility/_values
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/Utility/_values,v
retrieving revision 1.2
diff -u -r1.2 _values
--- Completion/Base/Utility/_values	2001/05/08 12:24:21	1.2
+++ Completion/Base/Utility/_values	2001/05/31 07:32:45
@@ -84,6 +84,7 @@
   # We add the separator character as a autoremovable suffix unless
   # we have only one possible value left.
 
+  sep=()
   [[ ${#snames}+${#names}+${#onames} -ne 1 ]] && compvalues -s sep &&
       expl=( "-qS$sep" "$expl[@]" ) sep=( "-qS$sep" )
 
Index: Functions/Misc/nslookup
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Misc/nslookup,v
retrieving revision 1.9
diff -u -r1.9 nslookup
--- Functions/Misc/nslookup	2001/04/02 13:04:05	1.9
+++ Functions/Misc/nslookup	2001/05/31 07:32:45
@@ -36,8 +36,8 @@
 
   zpty -w nslookup "$line"
 
-  zpty -r nslookup line '*
-> '
+  zpty -r nslookup line '(|*
+)> '
   if [[ -n "$pager" && ${#${(f)line}} -gt LINES ]]; then
     print -nr "$line" | eval "$pager"
   else

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


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

end of thread, other threads:[~2001-05-31  7:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-30 18:01 Problems with Functions/Misc/nslookup Bart Schaefer
2001-05-31  7:33 ` Sven Wischnowsky

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).