| ▲ | mzs 2 hours ago | |||||||
Wow I hate* that. I use bracket comments. They're cool cause they are bracket comments, so I use it in scripts to document pipelines. They are annoying cause they are bracket comments, in an interactive shell I have to type more and in TWO places. It's fun to reason-out how it works ;)
It's nice to have a way to both /* ... */ and // ...
in shell scripts though:
* in the best possible way, like it's awful - I hate I didn't think of that | ||||||||
| ▲ | rgrau 2 hours ago | parent [-] | |||||||
for multiline pipes, it's WAY better to format like
You don't have to use backquotes, AND, it allows you to comment line by line, because there's no backslash messing with the parser.I also use a last `|\ncat` so you can delete any line and you don't have to worry about the last line being a bit different than the rest I created a list of similar tricks in https://github.com/kidd/scripting-field-guide in case anyone wants to take a look | ||||||||
| ||||||||