about summary refs log tree commit diff
path: root/Doc/Zsh/zle.yo
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2013-11-07 15:19:07 +0000
committerPeter Stephenson <pws@zsh.org>2013-11-07 15:19:07 +0000
commitf77a7a5b18f0650d32e5e8dac1f1cb284a9e4690 (patch)
tree2cfeba444292386f17afa88237ceeaf20c1fdf67 /Doc/Zsh/zle.yo
parent375115c7dfd6dff576915d25fe2ecdd381dd9d81 (diff)
downloadzsh-f77a7a5b18f0650d32e5e8dac1f1cb284a9e4690.tar.gz
zsh-f77a7a5b18f0650d32e5e8dac1f1cb284a9e4690.tar.xz
zsh-f77a7a5b18f0650d32e5e8dac1f1cb284a9e4690.zip
31937: zle -Fw uses widget semantics for file descriptor handler
Diffstat (limited to 'Doc/Zsh/zle.yo')
-rw-r--r--Doc/Zsh/zle.yo11
1 files changed, 9 insertions, 2 deletions
diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo
index 614924bfb..2d7756859 100644
--- a/Doc/Zsh/zle.yo
+++ b/Doc/Zsh/zle.yo
@@ -373,7 +373,7 @@ xitem(tt(zle) tt(-R) [ tt(-c) ] [ var(display-string) ] [ var(string) ... ])
 xitem(tt(zle) tt(-M) var(string))
 xitem(tt(zle) tt(-U) var(string))
 xitem(tt(zle) tt(-K) var(keymap))
-xitem(tt(zle) tt(-F) [ tt(-L) ] [ var(fd) [ var(handler) ] ])
+xitem(tt(zle) tt(-F) [ tt(-L) | tt(-w) ] [ var(fd) [ var(handler) ] ])
 xitem(tt(zle) tt(-I))
 xitem(tt(zle) tt(-T) [ tt(tc) var(function) | tt(-r) tt(tc) | tt(-L) ] )
 item(tt(zle) var(widget) tt([ -n) var(num) tt(]) tt([ -Nw ] [ -K) var(keymap) tt(]) var(args) ...)(
@@ -487,7 +487,7 @@ This keymap selection affects the interpretation of following keystrokes
 within this invocation of ZLE.  Any following invocation (e.g., the next
 command line) will start as usual with the `tt(main)' keymap selected.
 )
-item(tt(-F) [ tt(-L) ] [ var(fd) [ var(handler) ] ])(
+item(tt(-F) [ tt(-L) | tt(-w) ] [ var(fd) [ var(handler) ] ])(
 Only available if your system supports one of the `poll' or `select' system
 calls; most modern systems do.
 
@@ -502,6 +502,13 @@ Note that zle makes no attempt to check whether this fd is actually
 readable when installing the handler.  The user must make their own
 arrangements for handling the file descriptor when zle is not active.
 
+If the option tt(-w) is also given, the var(handler) is instead a
+line editor widget, typically a shell function made into a widget using
+tt(zle -N).  In that case var(handler) can use all the facilities of
+zle to update the current editing line.  Note, however, that as handling
+var(fd) takes place at a low level changes to the display will not
+automatically appear; the widget should call tt(zle -R) to force redisplay.
+
 Any number of handlers for any number of readable file descriptors may be
 installed.  Installing a handler for an var(fd) which is already handled
 causes the existing handler to be replaced.