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

Re: [Review Request] Arrays and their usage



I don't know what the exact output of your makepkg pipeline can be,
but unquoted `` will split words on all whitespace, so that is a bit
of a danger. I would probably have written it like this

local pkgs=( ${(f)"$(makepkg --blabla | sed blabla)"} )

There shouldn't be any spaces in it, but better safe than sorry. Even though the array + (f) + quoting seems a handful, which probably ends up in some head scratching later on. But well...

sudo pacman -S $DATABASE/$^pkgs

Oooh... the ${^pkgs} is nice. Haven't known this one.
Thanks!

- René




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