about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-04-25 10:10:49 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-04-25 10:10:49 +0000
commita2d5ebe3c017a3f34ce2ead69110b08c2eeeb67e (patch)
tree3bb9673cdc8e202730e806b68a6b6fde89091401 /Doc
parent85f25bb845ae50fb1e75edd71c83a63e582abadd (diff)
downloadzsh-a2d5ebe3c017a3f34ce2ead69110b08c2eeeb67e.tar.gz
zsh-a2d5ebe3c017a3f34ce2ead69110b08c2eeeb67e.tar.xz
zsh-a2d5ebe3c017a3f34ce2ead69110b08c2eeeb67e.zip
22427: zle <widget> -w sets the environment for <widget>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/zle.yo12
1 files changed, 9 insertions, 3 deletions
diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo
index d6c8c773f..d2c844017 100644
--- a/Doc/Zsh/zle.yo
+++ b/Doc/Zsh/zle.yo
@@ -338,7 +338,7 @@ 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(-I))
-item(tt(zle) var(widget) tt([ -n) var(num) tt(]) tt([ -N ] [ -K) var(keymap) tt(]) var(args) ...)(
+item(tt(zle) var(widget) tt([ -n) var(num) tt(]) tt([ -Nw ] [ -K) var(keymap) tt(]) var(args) ...)(
 The tt(zle) builtin performs a number of different actions concerning
 ZLE.
 
@@ -535,7 +535,7 @@ this may have been by a previous call to `tt(zle -I)' or by a system
 notification.  To test if a zle widget may be called at this point, execute
 tt(zle) with no arguments and examine the return status.
 )
-item(var(widget) tt([ -n) var(num) tt(]) tt([ -N ] [ -K) var(keymap) tt(]) var(args) ...)(
+item(var(widget) tt([ -n) var(num) tt(]) tt([ -Nw ] [ -K) var(keymap) tt(]) var(args) ...)(
 Invoke the specified widget.  This can only be done when ZLE is
 active; normally this will be within a user-defined widget.
 
@@ -548,6 +548,12 @@ With the option tt(-K), var(keymap) will be used as the current keymap
 during the execution of the widget.  The previous keymap will be
 restored when the widget exits.
 
+Normally, calling a widget in this way does not set the special
+parameter tt(WIDGET) and related parameters, so that the environment
+appears as if the top-level widget called by the user were still
+active.  With the option tt(-w), tt(WIDGET) and related parameters are set
+to reflect the widget being executed by the tt(zle) call.
+
 Any further arguments will be passed to the widget.  If it is a shell
 function, these are passed down as positional parameters; for builtin
 widgets it is up to the widget in question what it does with them.
@@ -559,7 +565,7 @@ them.
 
 The return status reflects the success or failure of the operation carried
 out by the widget, or if it is a user-defined widget the return status of
-the shell function.  
+the shell function.
 
 A non-zero return status causes the shell to beep when the widget exits,
 unless the tt(BEEP) options was unset or the widget was called via the