4 ms·
in nearly all cases, you should always do "$var" instead of $var, this should be mandated on sh scripts. you can even go further to do "${bar}", this is even s
by ausjke 10y ago
in nearly all cases, you should always do "$var" instead of $var, this should be mandated on sh scripts.
you can even go further to do "${bar}", this is even safer I feel.
- scurvy 10y agoYes, it's "${bar}" that should go into style guides and linters (for consistency).
- brazzledazzle 10y agoIt seems kind of petty I guess but that seems kind of annoying to write and even less importantly looks pretty blah.
- dozzie 10y ago"${bar}" is irritating to write. It only makes sense when you need to append a word character ([a-zA-Z0-9_]) to the content of $bar, like in "${bar}qq".
- philipov 10y ago"${bar}" makes my syntax highlighting light up in a satisfying way, and automatic quote/brace completion makes it peachy.