mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-17 15:01:40 +02:00
zsh-workers/8210
This commit is contained in:
parent
60bc079540
commit
2dc06f464c
2 changed files with 7 additions and 3 deletions
|
@ -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
|
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)
|
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.
|
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))(
|
item(tt(-z))(
|
||||||
Read one entry from the editor buffer stack and assign it to the first
|
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.
|
index is the length of the line plus one.
|
||||||
)
|
)
|
||||||
item(tt(-u)var(n))(
|
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))(
|
item(tt(-p))(
|
||||||
Input is read from the coprocess.
|
Input is read from the coprocess.
|
||||||
|
|
|
@ -10,7 +10,7 @@ trap 'print -p exit;return' INT
|
||||||
coproc command nslookup
|
coproc command nslookup
|
||||||
pid=$!
|
pid=$!
|
||||||
|
|
||||||
while read -pk1 char; do
|
while read -pk 1 char; do
|
||||||
line="$line$char"
|
line="$line$char"
|
||||||
[[ "$line" = *'
|
[[ "$line" = *'
|
||||||
> ' ]] && break
|
> ' ]] && break
|
||||||
|
@ -21,7 +21,7 @@ line=''
|
||||||
while vared -p '> ' line; do
|
while vared -p '> ' line; do
|
||||||
print -p "$line"
|
print -p "$line"
|
||||||
line=''
|
line=''
|
||||||
while read -pk1 char; do
|
while read -pk 1 char; do
|
||||||
line="$line$char"
|
line="$line$char"
|
||||||
[[ "$line" = *'
|
[[ "$line" = *'
|
||||||
> ' ]] && break
|
> ' ]] && break
|
||||||
|
|
Loading…
Reference in a new issue