3 ms·
On the other hand, not splitting words at spaces during variable expansion would make impossible things like: OPTS="-a -b -c" foo $OPTS
by teo_zero 3y ago
On the other hand, not splitting words at spaces during variable expansion would make impossible things like:
OPTS="-a -b -c"
foo $OPTS
- o11c 3y agoJust use an array. POSIX sh is a useless target, all serious shells support arbitrary arrays.
- arp242 3y agoUse $=opts in zsh for explicit splitting. Better would to be use an array though: 'opts=(-a -b -c)' and then just 'foo $opts'. I'm not sure about rc on this as I'm not too familiar with rc, but I'd be surprised if there wasn't a way to do this.