procsub doesn't release the terminal without reading one byte
The first letter I type after running this command won't show up on the terminal: : < <(cat) This is reproducible on 5.3 beta too. Oğuz
Re: Call dynamic builtins with 'builtin' command
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.
Call dynamic builtins with 'builtin' command
Hello! I'm trying to do a very simple task: I want to use the 'stat' builtin from BASH_LOADABLES_PATH without overwriting the current behavior of the 'stat' command in the current shell (whether it's a binary from $PATH, or an alias, or a function). This does not work: $ builtin stat bash: builtin: stat: not a shell builtin 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. So: 1. At least the help for 'enable' should be fixed, but there is definitely a bug in enable+builtin usage for dynamic builtins. 2. Can you explain how to load and use e.g. stat builtin without overwriting the current behavior of stat in the whole existing script? Thanks, Vadim