From 12251d65ffd6fe150f538cee819336228d8bcc31 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 8 Nov 2013 11:34:37 +0000 Subject: 31940: zcalc -e uses arguments as input --- Doc/Zsh/contrib.yo | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Doc') 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. -- cgit 1.4.1