Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Can't execute @ALIAS[...]

May
12,846
164
Here's my (global, shared) alias for "d".
Code:
v:\> echo %@alias[d]
*dir /a /p /m /k /h /ne
Executing @ALIAS[d] doesn't work in v20.
Code:
v:\test> ver

TCC  20.11.40   Windows 7 [Version 6.1.7601]

v:\test> %@alias[d]
v:\test>
It works in v18.
Code:
v:\test> ver

TCC  18.00.32   Windows 7 [Version 6.1.7601]

v:\test> %@alias[d]
2016-01-07  17:35         <DIR>    Bar
2016-01-07  17:35         <DIR>    Baz
2016-01-07  17:35         <DIR>    Foo
2016-06-25  22:31               9  foobar.txt
2016-01-07  17:32             178  test.btm

v:\test>
 
There's something odd going on here. I can no longer reproduce the problem with the "d" alias. But now I see a similar problem with another alias. Note the difference between v18 and v20.

upload_2017-2-24_13-17-29.png
 
This is really strange. In the same instance of v20 in which the command %@alias[d] didn't work, and then did work, it's not working again. But it does work (once) if I do it twice on the same command line.
Code:
v:\test> %@alias[d]
v:\test> %@alias[d] & %@alias[d]
2016-01-07  17:35         <DIR>    Bar
2016-01-07  17:35         <DIR>    Baz
2016-01-07  17:35         <DIR>    Foo
2016-06-25  22:31               9  foobar.txt
2016-01-07  17:32             178  test.btm
v:\test> %@alias[d]
v:\test>

And I can toggle whether it works or not by removing/restoring the leading '*'.
Code:
v:\test> eset /a d
d=dir /a /p /m /k /h /ne

v:\test> %@alias[d]
2016-01-07  17:35         <DIR>    Bar
2016-01-07  17:35         <DIR>    Baz
2016-01-07  17:35         <DIR>    Foo
2016-06-25  22:31               9  foobar.txt
2016-01-07  17:32             178  test.btm

v:\test> eset /a d
d=*dir /a /p /m /k /h /ne

v:\test> %@alias[d]
v:\test>
 
I can also toggle whether %@alias[d] (or %@alias[ b ]) works, as a command, by adding a space after it. They work when followed by a space, otherwise they don't work.
 
Not reproducible here. Try it without TCMD.INI & plugins.
It got better without an INIfile. V20 had DelayedExpansion=Yes. When I changed that to No, the problem went away. Similarly, when I changed v18's No to Yes, the problem appeared in v18.

Is that expected behavior? I can't imagine a connection.
 

Similar threads

Back
Top