Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: sourcing a sh file in zsh



Bart Schaefer wrote:
> } $> source bla.sh
> } bla.sh:1: bad math expression: operand expected at `'
> } 
> } where that line reads:
> }    [ "$a_root" = "" ] && a_root=/some/dir
> 
> I suspect the line number reported in the error is inaccurate, as zsh
> wouldn't invoke any math operations for that.

There are cases where zsh implicitly sets the type of the variable to be
integer, so if you'd had a (( a_root = 0 )) before that you might get
this.  But that would be an odd thing to do with this particular
variable.  Worth searching for previous occurrences.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author