$ {
> echo foo \
> && echo bar \
> || echo baz ;
> }
foo
bar
<^P><^A>$<^F>IFS
${IFS# echo foo && echo bar || echo baz ; }
$ _
There's good and bad to both approaches. I like how I can use () and {} to bracket things and otherwise every line that end in \ is continued. I line-up on the left with the operator, you with indentation. When you use a # style comment, you have to look up and back and forward to see what the operator is you are continuing over to the next line: $ foo |
bar | # ?Do? *the* $bar$ && [do] {it!}
baz
Which only takes an extra neuron or so, but then history... <^P>
$ foo | bar | # ?Do? *the* $bar$ && [do] {it!}
bazUsing brackets like this is something I never thought of, and it's probably why it's hard for me to process it, but I can see it provides nice annotation capabilities, and it's a more self-contained style.
Thx for sharing!