Expand all aliases on the command line

     _x64: 1
   _admin: 1
_elevated: 1

TCC  25.00.20 x64   Windows 10 [Version 10.0.18362.356]

I have the following aliases;
e:\utils>alias cscript64
C:\Windows\system32\cscript.exe //nologo %$

e:\utils>alias vbs64
%@if[%# eq 0,dir *.vbs,cscript64]

If I run the command;
vbs64 math.vbs
...and expand it on the command line by pressing Ctrl-W...
e:\utils>%@if[1 eq 0,dir *.vbs,cscript64 //nologo] math.vbs
...why is the cscript64 alias not expanded?



Staff member
May 14, 2008
Ctrl- W only expands aliases at the beginning of the command line or following a command separator.

To expand aliases inside an @IF would require the command line editor to execute the command line and evaluate the result. That's outside the editor's scope, and would introduce a host of new problems.
  • Like
Reactions: nikbackm
Similar threads
Thread starter Title Forum Replies Date
MickeyF expand alias in cmdline with Ctrl-F in TCC Support 21
jbanaszczyk DOC: @expand Support 0
I "IF" command in a variable does not expand redirection variable name Support 0
williamleara WAD ribbon doesn't remember expand/collapse setting Support 3
C %systemroot% doesn't expand Support 11
Jay Sage Parameter %$ Different in Aliases and BTMa Support 4
vefatica Questions about aliases. Support 1
Jay Sage Request Re Aliases CD_LEAVE and CD_ENTER Support 2
S Take Command crashes for aliases with length > 1015 Support 1
Joe Caverly SETLOCAL removes Aliases and Functions Support 3
vefatica Two @FUNCTIONs/aliases with the same name Support 4
D Can ANSI escape sequences be used in keystroke aliases? Support 8
Joe Caverly Documentation Aliases Overview Support 3
vefatica Display of special characters in aliases. Support 25
T aliases disappearing Support 22
J Autoexecute Keystroke Aliases Support 1
vefatica Aliases ... appending unused parameters? Support 2
cgunhouse Problem with CALL and Directory Aliases in V17 Support 9
MickeyF WAD 'if' and aliases don't mix so well Support 5
M How to? Logic in aliases... Support 3
J Saving aliases Support 21
vefatica Backquotes, aliases get 'em, BTMs don't? Support 1
vefatica Aliases global vs. local Support 12
R key aliases no longer working Support 2
newbie Test to ensure aliases are loaded Support 6
D Are local aliases inherited? Support 4
T FTP.CFG file aliases Support 5
vefatica @@key aliases cause new prompt? Support 16
J TCC Out of memory with aliases and functions Support 5
J Problem with aliases Support 6
P Quick help for aliases Support 3
R Alt-key aliases? Support 3
old coot tee command cancels colors Support 16
Dmitry L. Kobyakov How to? How to remove the record of the old version of the Take Command? Support 9
D Can alias pass parameters to for command? Support 3
samintz How to? Search for %(command) in Help? Support 1
T VIEW only works from command line Support 14
rconn News Take Command / TCC / CMDebug / TCC-RT v28 Released Support 0
T Take Command 28: Lua reports version 5.4.0 (5.4.3 expected) Support 0
Jay Sage WAD Possible Bug With OPTION Command With @FILE Support 5
rconn News Take Command / TCC / CMDebug / TCC-RT 27.01.24 uploaded Support 0
J Take command does not start on Windows 10 Support 3
vefatica `Back quotes` - command line vs. batch file Support 5
Jay Sage WAD Failure of Alias Command with /Z Option Support 14
Phileosophos Is there any way to open the Take Command options dialog from the command line? Support 8
Phileosophos Command-line Editing Shortkeys That Fail Support 6
fpefpe How to? free (internal) command Support 0
rconn News Take Command / TCC / CMDebug / TCC-RT 27.01.23 uploaded Support 0
T How to? retain command history across reboot? Support 6
rconn News Take Command / TCC / CMDebug / TCC-RT v27.01 Build 22 Uploaded Support 0

Similar threads