diff options
Diffstat (limited to 'Doc/Zsh')
-rw-r--r-- | Doc/Zsh/contrib.yo | 6 | ||||
-rw-r--r-- | Doc/Zsh/zle.yo | 11 |
2 files changed, 14 insertions, 3 deletions
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 9d3fc7562..bb6613ece 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -3155,7 +3155,7 @@ sect(Mathematical Functions) startitem() findex(zcalc) -item(tt(zcalc) [ var(expression) ... ])( +item(tt(zcalc) [ tt(-ef) ] [ var(expression) ... ])( A reasonably powerful calculator based on zsh's arithmetic evaluation facility. The syntax is similar to that of formulae in most programming languages; see @@ -3195,6 +3195,10 @@ The output base can be initialised by passing the option `tt(-#)var(base)', for example `tt(zcalc -#16)' (the `tt(#)' may have to be quoted, depending on the globbing options set). +If the option `tt(-e)' is set, the function runs non-interactively: +the arguments are treated as expressions to be evaluated as if entered +interactively line by line. + If the option `tt(-f)' is set, all numbers are treated as floating point, hence for example the expression `tt(3/4)' evaluates to 0.75 rather than 0. Options must appear in separate words. 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. |