summaryrefslogtreecommitdiff
path: root/Doc/Zsh/contrib.yo
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2013-11-08 11:34:37 +0000
committerPeter Stephenson <pws@zsh.org>2013-11-08 11:34:37 +0000
commit12251d65ffd6fe150f538cee819336228d8bcc31 (patch)
tree47402bfb78924bf47cceedd264c6f7aeca7377b8 /Doc/Zsh/contrib.yo
parentf77a7a5b18f0650d32e5e8dac1f1cb284a9e4690 (diff)
downloadzsh-12251d65ffd6fe150f538cee819336228d8bcc31.tar.gz
zsh-12251d65ffd6fe150f538cee819336228d8bcc31.zip
31940: zcalc -e uses arguments as input
Diffstat (limited to 'Doc/Zsh/contrib.yo')
-rw-r--r--Doc/Zsh/contrib.yo6
1 files changed, 5 insertions, 1 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.