Re: [Fish-users] math in fish

2012-09-06 Thread Myrddin Emrys
The syntax is consistent if you see that *math *expects one parameter. But I agree the example could be clearer. On Thu, Sep 6, 2012 at 9:56 AM, Wai Yan Pong wrote: > Torsten and Jon, thank you both. > > If you type help, all you get is the example math 1+1 (without quotes). > Hum... so the exam

Re: [Fish-users] math in fish

2012-09-06 Thread Wai Yan Pong
Torsten and Jon, thank you both. If you type help, all you get is the example math 1+1 (without quotes). Hum... so the example is misleading and the syntax is inconsistent. I hope these can be fixed in the next version. --Pong On Thu, Sep 6, 2012 at 7:33 AM, Jon Clayden wrote: > It will work i

Re: [Fish-users] math in fish

2012-09-06 Thread Jon Clayden
It will work if you quote it: $ math '2*2' 4 All the best, Jon On 6 September 2012 15:27, Wai Yan Pong wrote: > What is the syntax for multiplying two numbers using the "math" > function in fish? > > Type math 1+1 at the prompt will give you 2, but neither * nor x seems > to work for multiplic

Re: [Fish-users] math in fish

2012-09-06 Thread Torsten Grust
You need to quote your math expression if it contains characters that the shell would expand otherwise: > math '21 * 2' 42 Cheers, --Torsten On 6 Sep 2012, at 16:27, Wai Yan Pong wrote: > What is the syntax for multiplying two numbers using the "math" > function in fish? > > Type math 1+1 a