bug-bash
[Top][All Lists]
Advanced

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

Re: enable builtin bugs in bash 5.2


From: Robert Elz
Subject: Re: enable builtin bugs in bash 5.2
Date: Wed, 31 May 2023 03:46:30 +0700

    Date:        Tue, 30 May 2023 15:28:57 -0400
    From:        Chet Ramey <chet.ramey@case.edu>
    Message-ID:  <ad399376-280e-bcdd-1aff-740f1a6ea4de@case.edu>

  | Hmmmm. That's not the only option. How about we load it if found but mark
  | it as not enabled? It will still take `enable -d' to delete it.

That wouldn't match the man page, and isn't really rational.

The man page says:

    The -f option means to load the new builtin command name from
    shared object filename, on systems that support dynamic loading.

and

    If no options are supplied and a name is not a shell builtin,
    enable will attempt to load name from a shared object named name,
    as if the command were ``enable -f name name .

That's all it says about loading anything.   So to load something,
either -f needs to be used, or no options be given.

Of -n:

    If -n is used, each name is disabled; otherwise, names are enabled.

which is fine, but says nothing about loading anything (but is an option,
so if -n is given, we are not in the "no options" case).   Nor does it
say what happens in that case if name isn't a builtin - so that could
either just be ignored (like unset does for vars not set) or be an
error, either would be OK.

For the behaviour you're suggesting, I'd expect the usage to be

        enable -fn name

which should load name (if it can be found, of course) and disable
it (though I'm not sure why anyone would ever want to do that).

kre




reply via email to

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