On Sun, 11 Jun 2023, 09:31 Grisha Levit, <[email protected]> wrote:
> The command printing code can fail to add a required semicolon when the
> last word in the command ends with `&'
>
This could be obviated by unconditionally outputting a newline instead of a
semicolon.
I acknowledge that this style isn't to everyone's taste, but to me it feels
more "natural" to the Shell, rather than pretending that one is writing in
some other language; I detest style guides that insist on obscuring ";then"
on the end of a long line.
Personally I would prefer to have newlines prior to the start of *all*
commands,
including nested ones, particularly after the keywords/symbols "while",
"do", "if", "then", "elif", "else", ";;", ";&", ";;&", "&", "&&", "|",
"||", "{", and "(", and before ")", but obviously don't double up if
there's already a newline.