On 5/27/23 12:44 PM, Emanuele Torre wrote:
Since bash 5.2,  enable mkdir  is equivalent to  enable -f mkdir mkdir.

But, if you use the -n flag, and mkdir is not a loaded builtin, it will
also be equivalent to  enable -f mkdir mkdir  (so the -n flag is
ignored), and the newly loaded foo will be enabled instead of disabled:


I think that this is not intended and that, if the -n flag is specified,
enable should only try to disable all the loadable builtins named as the
argument, and skip, with a warning message, arguments that are not
loaded builtins; instead of trying to load (as enabled) arguments, that
are not loaded builtins, from files in the current directory and
BASH_LOADABLES_PATH as it does now.

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.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/


Reply via email to