On Wed, Oct 09, 2024 at 15:15:52 +0400, Vadim Nevorotin wrote:
> According to 'help enable' this should work, but it also do not:
> 
> $ enable stat
> $ enable -n stat
> $ builtin stat
> bash: builtin: stat: not a shell builtin
> 
> 'enable -n' should just disable stat, according to 'help enable', but
> it looks like it also removes it.

I'm really confused about what you think "disable" means.  If you disable
a builtin, that means you can no longer call it.

hobbit:~$ enable -n cd
hobbit:~$ cd /tmp
bash: cd: command not found

Not even if you prefix it with "builtin".

hobbit:~$ builtin cd /tmp
bash: builtin: cd: not a shell builtin

So, the loadable builtins are behaving consistently with the regular
builtins here.  Seems correct to me.

Reply via email to