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

PATCH: fix nslookup function



At some point nslookup stopped printing the name and IP of the default
DNS server when you start it. This breaks our nslookup function. The
function is an example zpty based wrapper around a REPL style program
which uses vared to allow you to use the zsh line editor for nslookup.
The following fix will also work with an old nslookup.

Oliver

diff --git a/Functions/Misc/nslookup b/Functions/Misc/nslookup
index 150bd03..8c11909 100644
--- a/Functions/Misc/nslookup
+++ b/Functions/Misc/nslookup
@@ -26,8 +26,7 @@ zstyle -s ':nslookup' pager tmp &&
 
 zpty nslookup command nslookup "${(q)@}"
 
-zpty -r nslookup line '*
-> '
+zpty -r nslookup line '*> '
 print -nr "$line"
 
 while line=''; vared -he "$pmpt[@]" line; do



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