[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: comments inside command subst are handled inconsistently
From: |
Martin D Kealey |
Subject: |
Re: comments inside command subst are handled inconsistently |
Date: |
Mon, 31 Jul 2023 04:21:10 +1000 |
On Sun, 30 Jul 2023, 08:22 Chet Ramey, <chet.ramey@case.edu> wrote:
> On 7/28/23 1:51 PM, Martin D Kealey wrote:
>
> > maybe it's time to start issuing a warning
> > when [backticks are] used at all? 🤪
>
> There's no reason to use `` over $(...), but that form is still a required
> POSIX expansion.
Oh, then only warn when set +o posix and shopt -u
compat_im_too_lazy_to_fix_backticks is in effect!
(Insert large tongue-in-cheek smiley)
Seriously though, the internet is awash with "helpful" Shell guides and
examples loaded with poor practices. The only way this is going to improve
is if there's a "linting mode" is included in the Shell and on by default.
Consider this a feature request for a linting mode, on when invoked with
bash -n or bash6.
-Martin
- comments inside command subst are handled inconsistently, Denys Vlasenko, 2023/07/27
- Re: comments inside command subst are handled inconsistently, Denys Vlasenko, 2023/07/31
- Re: comments inside command subst are handled inconsistently, Chet Ramey, 2023/07/31
- Re: comments inside command subst are handled inconsistently, Denys Vlasenko, 2023/07/31
- Re: comments inside command subst are handled inconsistently, G. Branden Robinson, 2023/07/31
Re: comments inside command subst are handled inconsistently, Chet Ramey, 2023/07/29