Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: sourcing a sh file in zsh
- X-seq: zsh-users 13715
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: sourcing a sh file in zsh
- Date: Fri, 16 Jan 2009 16:00:03 +0000
- In-reply-to: <090116075615.ZM21871@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <BD9D2405-AD6A-4336-9C8A-85149165B6B8@xxxxxxxxx> <090116075615.ZM21871@xxxxxxxxxxxxxxxxxxxxxx>
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