From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26223 invoked from network); 11 Oct 1999 15:15:13 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Oct 1999 15:15:13 -0000 Received: (qmail 22353 invoked by alias); 11 Oct 1999 15:15:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8210 Received: (qmail 22338 invoked from network); 11 Oct 1999 15:15:02 -0000 From: "Bart Schaefer" Message-Id: <991011151403.ZM6696@candle.brasslantern.com> Date: Mon, 11 Oct 1999 15:14:02 +0000 In-Reply-To: <199910111045.MAA03145@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: coproc tutorial (Re: questions)" (Oct 11, 12:45pm) References: <199910111045.MAA03145@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: PATCH: 3.1.6: "read -k" doc (Re: coproc tutorial (Re: questions)) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 11, 12:45pm, Sven Wischnowsky wrote: } Subject: Re: coproc tutorial (Re: questions) } } 3.1.6-pws-something (at least the latest pws-6) has Functions/Misc/nslookup And Functions/Misc/nslookup has the misconception that "read -k1" reads one byte, which it does, but only by accident: "read -k8192" reads one byte as well. If even Sven is confused, I guess this does need a doc patch. Index: Doc/Zsh/builtins.yo =================================================================== @@ -713,6 +713,9 @@ 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 @@ 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. Index: Functions/Misc/nslookup =================================================================== @@ -10,7 +10,7 @@ coproc command nslookup pid=$! -while read -pk1 char; do +while read -pk 1 char; do line="$line$char" [[ "$line" = *' > ' ]] && break @@ -21,7 +21,7 @@ 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 -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com