diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-01-21 10:10:08 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-01-21 10:10:08 +0000 |
commit | b8907b986b739e3c6b07e5df3f4cf4794dc2bc64 (patch) | |
tree | c9e312785eecd116a7b6c332f2f638113d538e28 /Functions/Misc/nslookup | |
parent | 09a9a37aaccf043ad6e9c66344a1b722df633013 (diff) | |
download | zsh-b8907b986b739e3c6b07e5df3f4cf4794dc2bc64.tar.gz zsh-b8907b986b739e3c6b07e5df3f4cf4794dc2bc64.tar.xz zsh-b8907b986b739e3c6b07e5df3f4cf4794dc2bc64.zip |
zsh-workers/9396
Diffstat (limited to 'Functions/Misc/nslookup')
-rw-r--r-- | Functions/Misc/nslookup | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Functions/Misc/nslookup b/Functions/Misc/nslookup index 8cbbdce6b..499cabf5a 100644 --- a/Functions/Misc/nslookup +++ b/Functions/Misc/nslookup @@ -8,19 +8,23 @@ local tmp line compcontext=nslookup curcontext=':nslookup' pmpt trap 'return 130' INT trap 'zpty -d nslookup' EXIT -zstyle -s ':nslookup' prompt pmpt || pmpt='> ' +pmpt=() +zstyle -s ':nslookup' prompt tmp && pmpt=(-p "$tmp") +zstyle -s ':nslookup' rprompt tmp && pmpt=("$pmpt[@]" -r "$tmp") +(( $#pmpt )) || pmpt=(-p '> ') zpty nslookup nslookup zpty -r nslookup line '*> ' print -nr "$line" -while line=''; vared -p "$pmpt" line; do +while line=''; vared -he "$pmpt[@]" line; do + print -s "$line" [[ "$line" = exit ]] && break zpty -w nslookup "$line" - zpty -r nslookup line '*> ' + zpty -r nslookup line '*> ' || break print -nr "$line" done |