Shellcheck doesn’t insist on braces unless it thinks you need them.
Comment on How do you shell expand your variables and why?
bloopernova@programming.dev 1 year agoThis is the best way. It’s also the way the Shellcheck wants them.
gamma@programming.dev 1 year ago
bloopernova@programming.dev 1 year ago
Oh! I didn’t know that (um, obviously lol)
I’ll edit my comment.
thingsiplay@kbin.social 1 year ago
@bloopernova As you mention it, here the links for anyone interested: Online tool https://www.shellcheck.net/ and you can install it locally too https://github.com/koalaman/shellcheck .
hascat@programming.dev 1 year ago
While this looks like a handy tool, it does make me think shell scripting itself needs a cleaner approach than what we have currently.