bug-bash
[Top][All Lists]
Advanced

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

Re: Consolidate recommended options?


From: Lawrence Velázquez
Subject: Re: Consolidate recommended options?
Date: Sun, 29 Dec 2024 15:50:36 -0500

On Sun, Dec 29, 2024, at 3:44 PM, Daniel Colascione wrote:
> I wonder whether it would be possible to add a simple catch-all command
> that would encompass a set of options that can't be defaults but that
> make writing shell scripts easier, e.g. set -euo pipefail, nullglob,
> inherit_errexit, extglob, assoc_expand_once, and various other settings.
>
> It's annoying to enable all these settings individually, but enabling
> them by default would break existing scripts.  How about something like
> "shopt -s bash2025" that would succinctly set these options all at once
> so that script writers can more easily opt into modern behavior?

No, the shell should not endorse any options like this.  The
notion that *any* of the options you mentioned is "modern" or
even best practice is ... contentious.

-- 
vq



reply via email to

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