3 ms·
> 9. Always quote variable accesses with double-quotes. > - One place where it’s okay not to is on the left-hand-side of an [[ ]] condition. And the right-h
by hun3 4y ago
> 9. Always quote variable accesses with double-quotes.
> - One place where it’s okay not to is on the left-hand-side of an [[ ]] condition.
And the right-hand-side of a variable assignment.
And the WORD in a case statement. (Not in the patterns, though).
Plus a bunch of other single-token(?) contexts.
I don't recommend relying on the context though, it's clever and makes it hard to verify that the script does not have expansion bugs.