zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: 3.1.6: "read -k" doc (Re: coproc tutorial (Re: questions))
Date: Mon, 11 Oct 1999 15:14:02 +0000	[thread overview]
Message-ID: <991011151403.ZM6696@candle.brasslantern.com> (raw)
In-Reply-To: <199910111045.MAA03145@beta.informatik.hu-berlin.de>

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


           reply	other threads:[~1999-10-11 15:15 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <199910111045.MAA03145@beta.informatik.hu-berlin.de>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=991011151403.ZM6696@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).