From: Tom de Vries <tdevries@suse.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org, DJ Delorie <dj@delorie.com>
Subject: Re: [PATCH] [gdb/config/djgpp] Make djcheck.sh and djconfig.sh shellcheck-clean
Date: Mon, 31 Aug 2026 13:54:56 +0200 [thread overview]
Message-ID: <6a252b3f-d0c3-4744-97ea-af18822674b1@suse.de> (raw)
In-Reply-To: <86pkyy8qbn.fsf@gnu.org>
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,
- Tom
next prev parent reply other threads:[~2026-08-31 11:55 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 [this message]
2026-08-31 12:15 ` Eli Zaretskii
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=6a252b3f-d0c3-4744-97ea-af18822674b1@suse.de \
--to=tdevries@suse.de \
--cc=dj@delorie.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/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