[pacman-dev] [PATCH] Make strip paths configurable

Xavier shiningxc at gmail.com
Mon Jul 28 17:44:13 EDT 2008


On Mon, Jul 28, 2008 at 11:22 PM, Aaron Griffin <aaronmgriffin at gmail.com> wrote:
>
> That'd work, except for cases of idiocy, like...
> array=('' {foo,bar,baz}

Arf. And guess what, that is like the 1000000000th thing that works
like I want with zsh and not with bash...
zsh : echo $array -> foo bar baz
bash : echo $array -> nothing, because it displays the first element
which is an empty string.

Anyway, I have something else, look :
[xavier at nx7400 ~]$ array=('' {foo,bar,baz})
[xavier at nx7400 ~]$ [ -z "${array[@]}" ] || echo array not empty
bash: [: too many arguments
array not empty
[xavier at nx7400 ~]$ [ -z "${array[*]}" ] || echo array not empty
array not empty

I never understood what the differences between @ and * were though...

Another thing, I just realized that the current code already seems to
work like we want, so this is a small issue.
We only get that "too many arguments" message which look very odd and
let us think that something probably broke.




More information about the pacman-dev mailing list