1
0
Fork 0
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:
Stephane Chazelas 2017-06-13 21:34:55 -04:00 committed by Eric Cook
parent eb783754bd
commit 4d007e269d
5 changed files with 28 additions and 6 deletions

View file

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