|
From: | Chet Ramey |
Subject: | Re: Having an alias and a function with the same name leads to some sort of recursion |
Date: | Tue, 7 Feb 2023 14:35:54 -0500 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 |
On 2/7/23 12:33 PM, Dale R. Worley wrote:
ALIASES Aliases allow a string to be substituted for a word when it is used as the first word of a simple command. That makes it clear why the second case behaves as it does. But my reading of the definition of "simple commands" implies that function defintions are not simple commands, and alias substitution should not be done on them (that is, the initial part) in any case.
When you parse a command and perform alias expansion, you don't yet know if you're reading a simple command or a function definition. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
[Prev in Thread] | Current Thread | [Next in Thread] |