Fwd: Re: Why does the command builtin not circumvent invocation of builtins?

Anselm Schüler <[email protected]> Sat, 31 Aug 2024 03:32:40 +0200
Newsgroups org.kernel.vger.dash
Message-ID <[email protected]>
I forward this message as I originally accidentally sent it as a HTML 
message which got bounced.



-------- Forwarded Message --------
Subject: 	Re: Why does the command builtin not circumvent invocation of 
builtins?
Date: 	Fri, 30 Aug 2024 22:17:00 +0200
From: 	Anselm Schüler <[email protected]>
To: 	Harald van Dijk <[email protected]>, [email protected]



I see that I have misinterpreted the text. Thank you.

You wrote “This also matches how "command" works in other shells as 
well.”. I wanted to note that this is not how it works in Fish, where 
e.g. command cd will try to execute a binary named cd from $PATH. I 
believe this is where my incorrect understanding may have stemmed from. 
Of note, Fish also has the builtin builtin, which is used to run 
builtins shadowed by custom functions, although in the handful of cases 
I tried Fish actually outright prevents defining such functions.

Thanks
Anselm