about summary refs log tree commit diff
path: root/Doc/Zsh/contrib.yo
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2014-04-07 07:21:21 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2014-04-07 07:21:21 -0700
commit141089231c9731811939d6ce24888fc95693eb6e (patch)
tree376d6a022648790ae06fec23c1c2877e6fa9b1b7 /Doc/Zsh/contrib.yo
parent2be3ff58e234456348765e435ef3185ff9d43a1c (diff)
parent08d4a6136e5c289d1be6d6290568866c2d59ef53 (diff)
downloadzsh-141089231c9731811939d6ce24888fc95693eb6e.tar.gz
zsh-141089231c9731811939d6ce24888fc95693eb6e.tar.xz
zsh-141089231c9731811939d6ce24888fc95693eb6e.zip
Merge branch 'master' of git://git.code.sf.net/p/zsh/code
Conflicts:
	ChangeLog
Diffstat (limited to 'Doc/Zsh/contrib.yo')
-rw-r--r--Doc/Zsh/contrib.yo19
1 files changed, 19 insertions, 0 deletions
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index a4000fd12..9f59f231d 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -2473,6 +2473,25 @@ The style tt(whence) is available in the context tt(:zle:$WIDGET); this
 may be set to an array to give the command and options that will be used to
 investigate the command word found.  The default is tt(whence -c).
 )
+tindex(zcalc-auto-insert)
+item(tt(zcalc-auto-insert))(
+This function is useful together with the tt(zcalc) function described in
+ifzman(the section Mathematical Functions)\
+ifnzman(noderef(Mathematical Functions)).
+It should be bound to a key representing a binary operator such
+as `tt(PLUS())', `tt(-)', `tt(*)' or `tt(/)'.  When running in zcalc,
+if the key occurs at the start of the line or immediately following
+an open parenthesis, the text tt("ans ") is inserted before the
+representation of the key itself.  This allows easy use of the
+answer from the previous calculation in the current line.  The
+text to be inserted before the symbol typed can be modified by setting
+the variable tt(ZCALC_AUTO_INSERT_PREFIX).
+
+Hence, for example, typing `tt(PLUS()12)' followed by return adds 12
+to the previous result.
+
+When not in zcalc, the key simply inserts the symbol itself.
+)
 enditem()
 
 subsect(Utility Functions)