zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: 3.1.6: "read -k" doc (Re: coproc tutorial (Re: questions))
       [not found] <199910111045.MAA03145@beta.informatik.hu-berlin.de>
@ 1999-10-11 15:14 ` Bart Schaefer
  0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 1999-10-11 15:14 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-10-11 15:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <199910111045.MAA03145@beta.informatik.hu-berlin.de>
1999-10-11 15:14 ` PATCH: 3.1.6: "read -k" doc (Re: coproc tutorial (Re: questions)) Bart Schaefer

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).