Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] [gdb] Fix unbound variable in regformats/regdat.sh
Date: Fri, 28 Aug 2026 16:19:15 +0200	[thread overview]
Message-ID: <057c1ec2-e37b-4ea5-ac2e-ee0f9ff234e2@suse.de> (raw)
In-Reply-To: <987c9664-c0ed-4052-be6c-cb80eec17dff@simark.ca>

On 8/28/26 2:46 PM, Simon Marchi wrote:
> Unrelated comment: I'd like if we could standardize on
> 
>    if ...; then
>    for ... in ...; do
>    while ...; do
> 
> instead of
> 
>    if ...
>    then
> 
>    for ... in ...
>    do
> 
>    while ...
>    do
> 
> I think it's more common, easier to read and takes less unnecessary
> lines.

Agreed.  I almost started doing this manually, but suddenly remembered 
that pretty-printers exist.

I've used shfmt ( 
https://sourceware.org/pipermail/gdb-patches/2026-August/229822.html ).

I also tried out beautysh (which would have been easy to integrate into 
pre-commit, because it's python), but it doesn't seem to fix this style.

I also tried out bash --pretty-print, but it has run-away indentation 
and doesn't seem to support customization.

Thanks,
- Tom

      reply	other threads:[~2026-08-28 14:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-28 12:04 [PATCH 0/2] [gdb] Two regformats/regdat.sh fixes Tom de Vries
2026-08-28 12:04 ` [PATCH 1/2] [gdb] Make regformats/regdat.sh shellcheck-clean Tom de Vries
2026-08-28 12:43   ` Simon Marchi
2026-08-28 14:40     ` Tom de Vries
2026-08-28 13:34   ` Andreas Schwab
2026-08-28 14:04     ` Tom de Vries
2026-08-28 12:04 ` [PATCH 2/2] [gdb] Fix unbound variable in regformats/regdat.sh Tom de Vries
2026-08-28 12:46   ` Simon Marchi
2026-08-28 14:19     ` Tom de Vries [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=057c1ec2-e37b-4ea5-ac2e-ee0f9ff234e2@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox