Two @FUNCTIONs/aliases with the same name

May 20, 2008
12,389
140
Syracuse, NY, USA
Below, shouldn't the function be redefined (as it is in v19, v18, v17, ...)? The same holds for aliases.
Code:
v:\> function foo bar

v:\> function foo jar

v:\> function f*
foo=bar
foo=jar
 
Here, in 20.00.25, this seems to "function" just fine:

Code:
[TEST]ver

TCC  20.00.25 x64   Windows 7 [Version 6.1.7601]

[TEST]function
TCC: No functions defined

[TEST]function test foo
[TEST]function test bar
[TEST]function
test=bar

[TEST]alias
TCC: No aliases defined

[TEST]alias test foo
[TEST]alias test bar
[TEST]alias
test=bar
 
TCC 20.11.38 Windows 7 [Version 6.1.7601]

v:\> alias foo bar

v:\> alias foo bar

v:\> alias foo bar

v:\> alias fo*
foo=bar
foo=bar
foo=bar
 
TCC 20.11.38 Windows 7 [Version 6.1.7601]

v:\> alias foo bar

v:\> alias foo bar

v:\> alias foo bar

v:\> alias fo*
foo=bar
foo=bar
foo=bar

I've been working with a few aliases lately and noticed that I now have to *unalias the existing aliases before redefining a newer version at the command line. Made me wonder what was happening for awhile.

Not the expected behavior since I didn't observe this issue in V19. Didn't check any further back.

I read several aliases from a file and multiple definitions for the same alias does not produce multiple definitions, LILO.
Conclusion: The multiple alias with same name behavior only seems to manifest when working with aliases at the V20 command line.
 

Similar threads