From 2dc06f464c255c5d7a5ccb004a07caeda13963ab Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 11 Oct 1999 15:16:44 +0000 Subject: zsh-workers/8210 --- Doc/Zsh/builtins.yo | 6 +++++- Functions/Misc/nslookup | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo index 328e7db80..cfd86b660 100644 --- a/Doc/Zsh/builtins.yo +++ b/Doc/Zsh/builtins.yo @@ -713,6 +713,9 @@ Read only one (or var(num)) characters. All are assigned to the first var(name), without word splitting. This flag is ignored when tt(-q) is present. Input is read from the terminal unless one of tt(-u) or tt(-p) is present. This option may also be used within zle widgets. + +Note that var(num) must be in the argument word that follows tt(-k), not +in the same word. See tt(-u). ) item(tt(-z))( Read one entry from the editor buffer stack and assign it to the first @@ -749,7 +752,8 @@ and that when the cursor is at the end of the line, its character index is the length of the line plus one. ) item(tt(-u)var(n))( -Input is read from file descriptor var(n). +Input is read from file descriptor var(n), where var(n) is a single +digit and must em(not) be separated from tt(-u) by any whitespace. ) item(tt(-p))( Input is read from the coprocess. diff --git a/Functions/Misc/nslookup b/Functions/Misc/nslookup index 15afb2ff1..d59a5e66c 100644 --- a/Functions/Misc/nslookup +++ b/Functions/Misc/nslookup @@ -10,7 +10,7 @@ trap 'print -p exit;return' INT coproc command nslookup pid=$! -while read -pk1 char; do +while read -pk 1 char; do line="$line$char" [[ "$line" = *' > ' ]] && break @@ -21,7 +21,7 @@ line='' while vared -p '> ' line; do print -p "$line" line='' - while read -pk1 char; do + while read -pk 1 char; do line="$line$char" [[ "$line" = *' > ' ]] && break -- cgit 1.4.1