Closed gunnihinn closed 1 year ago
From man find
, note that all the exampes use an escaped semicolon:
$ find . -type f -exec file '{}' \;
I'm pretty sure that works fine with shfmt, as does ';'
. The lack of escaping or quoting would break find, I'm pretty sure - because then the semicolon is not part of the argument list.
That makes sense, I'm not sure how I missed that. I could swear I was running that command with an unquoted ;
before. Sorry for the noise.
PS. I love shfmt
so much. Thank you!
The
find
command manual says about one of its options:However, shfmt shortens
to
resulting in the error
find: missing argument to '-exec'
. A workaround is to quote the;
but is this something the tool should be aware of?