Re: Call dynamic builtins with 'builtin' command

2024-10-12 Thread Greg Wooledge
On Sat, Oct 12, 2024 at 16:55:31 -0400, Chet Ramey wrote: > On 10/9/24 7:15 AM, Vadim Nevorotin wrote: > > 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? > > Is this anything more complicated than doing >

Re: Call dynamic builtins with 'builtin' command

2024-10-12 Thread Chet Ramey
On 10/9/24 7:15 AM, Vadim Nevorotin wrote: 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). S

Re: Call dynamic builtins with 'builtin' command

2024-10-09 Thread Greg Wooledge
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',

Call dynamic builtins with 'builtin' command

2024-10-09 Thread Vadim Nevorotin
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: built