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

Re: Problems with Functions/Misc/nslookup



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@xxxxxxxxxxxxxxxxxxxxxxx



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