From: Eli Zaretskii <eliz@gnu.org>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org, dj@delorie.com
Subject: Re: [PATCH] [gdb/config/djgpp] Make djcheck.sh and djconfig.sh shellcheck-clean
Date: Mon, 31 Aug 2026 15:15:54 +0300 [thread overview]
Message-ID: <86h5ka8ozp.fsf@gnu.org> (raw)
In-Reply-To: <6a252b3f-d0c3-4744-97ea-af18822674b1@suse.de> (message from Tom de Vries on Mon, 31 Aug 2026 13:54:56 +0200)
> Date: Mon, 31 Aug 2026 13:54:56 +0200
> Cc: gdb-patches@sourceware.org, DJ Delorie <dj@delorie.com>
> From: Tom de Vries <tdevries@suse.de>
>
> On 8/31/26 1:47 PM, Eli Zaretskii wrote:
> >> From: Tom de Vries <tdevries@suse.de>
> >> Date: Mon, 31 Aug 2026 12:08:26 +0200
> >>
> >> Make gdb/config/djgpp/{djcheck.sh,djconfig.sh} shellcheck-clean:
> >> - add missing quotes
> >> - add "|| exit 1" after cd
> >> - use printf instead of echo -n
> >> - use $()
> >> - disable SC2016 for "configure --prefix='${DJDIR}' assuming ${DJDIR} is
> >> indeed not meant to be expanded
> >
> > What's the problem with `foo` that you replace it with $() everywhere?
> >
>
> Here ( https://www.shellcheck.net/wiki/SC2006 ) it's mentioned:
> ...
> Rationale
>
> Backtick command substitution `...` is legacy syntax with several issues.
>
> It has a series of undefined behaviors related to quoting in POSIX.
> It imposes a custom escaping mode with surprising results.
> It's exceptionally hard to nest.
>
> $(...) command substitution has none of these problems, and is therefore
> strongly encouraged.
> ...
>
> > I don't remember, but there's a risk that DJGPP ports of Bash might
> > not support the latter.
>
> I suppose I can suppress this rule in the entire directory using a
> .shellcheckrc entry.
Thanks, maybe DJ will have an opinion or suggestions.
next prev parent reply other threads:[~2026-08-31 12:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 10:08 Tom de Vries
2026-08-31 11:47 ` Eli Zaretskii
2026-08-31 11:54 ` Tom de Vries
2026-08-31 12:15 ` Eli Zaretskii [this message]
2026-09-01 7:41 ` Tom de Vries
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=86h5ka8ozp.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dj@delorie.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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