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

bad math expression: illegal character: "



Hello zsh maintainers,

I ran into an issue with running a sourced script on zsh.

It’s a simple repro. Take the script repro.sh:

while (( "$#" )); do
echo $1
shift
done

Running this with source gives me the following error:
[~] source repro.sh                                                                                            18:15:53
repro.sh:1: bad math expression: illegal character: "

The same script works fine on bash:
[~] bash -c "source repro.sh hello"                                                                            18:17:23
hello

Anyone know what the issue could be here?

This is on Ubuntu, with oh-my-zsh on top.

Thanks,
Artur


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