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

PATCH: Re: zfanon and nslookup



Tanaka Akira wrote:

> I found that the function nslookup may causes trouble with zfanon.
> 
> Z:akr@coulee% Src/zsh -f
> coulee% autoload -U nslookup zfinit
> coulee% zfinit
> coulee% zfanon ftp.zsh.org
> > 
> 
> Hm.  This prompt is for nslookup.

Oops. But apart from this: maybe zfanon should use `command
nslookup'. Dunno.

Bye
 Sven

Index: Functions/Misc/nslookup
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Misc/nslookup,v
retrieving revision 1.3
diff -u -r1.3 nslookup
--- Functions/Misc/nslookup	2000/05/05 11:10:47	1.3
+++ Functions/Misc/nslookup	2000/05/09 11:52:24
@@ -1,6 +1,11 @@
 # Simple wrapper function for `nslookup'. With completion if you are using
 # the function based completion system.
 
+if [[ $argv[(I)-] -eq 0 && $argv[(I)[^-]*] -ne 0 ]]; then
+  command nslookup "$@"
+  return
+fi
+
 setopt localoptions localtraps completealiases
 
 local tmp line compcontext=nslookup curcontext='nslookup:::' pmpt
@@ -19,7 +24,7 @@
     [[ -z "$pager" ]] && pager="${opager:-more}"
 (( $#pmpt )) || pmpt=(-p '> ')
 
-zpty nslookup nslookup
+zpty nslookup nslookup "$@"
 
 zpty -r nslookup line '*
 > '

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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