mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-23 04:30:24 +02:00
41275: Leave stdin open when executing widgets
This commit is contained in:
parent
eb783754bd
commit
4d007e269d
5 changed files with 28 additions and 6 deletions
|
@ -750,12 +750,12 @@ sect(User-Defined Widgets)
|
|||
cindex(widgets, user-defined)
|
||||
User-defined widgets, being implemented as shell functions,
|
||||
can execute any normal shell command. They can also run other widgets
|
||||
(whether built-in or user-defined) using the tt(zle) builtin command.
|
||||
The standard input of the function is closed to prevent external commands
|
||||
from unintentionally blocking ZLE by reading from the terminal, but
|
||||
tt(read -k) or tt(read -q) can be used to read characters. Finally,
|
||||
they can examine and edit the ZLE buffer being edited by
|
||||
reading and setting the special parameters described below.
|
||||
(whether built-in or user-defined) using the tt(zle) builtin command. The
|
||||
standard input of the function is redirected from /dev/null to prevent
|
||||
external commands from unintentionally blocking ZLE by reading from the
|
||||
terminal, but tt(read -k) or tt(read -q) can be used to read characters.
|
||||
Finally, they can examine and edit the ZLE buffer being edited by reading
|
||||
and setting the special parameters described below.
|
||||
|
||||
cindex(parameters, editor)
|
||||
cindex(parameters, zle)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue