bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] add semicolon if last word in command group ends in &


From: Martin D Kealey
Subject: Re: [PATCH] add semicolon if last word in command group ends in &
Date: Sun, 11 Jun 2023 12:41:16 +1000

On Sun, 11 Jun 2023, 09:31 Grisha Levit, <grishalevit@gmail.com> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]