cd %A doesn't accept envvars

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

cd %A doesn't accept envvars

Post by *MVV »

In wincmd.ini:

Code: Select all

[Alias]
cd=em_Cd
In usercmd.ini:

Code: Select all

[em_Cd]
cmd=cd
param=%A
Effect: TC is able to cd to regular paths, also it allows to jump to paths via editing path in a path panels, but paths with envvars don't work, e.g. cd %TEMP% in a command line simply does nothing, also if I paste %TEMP% to path panel, TC shows auto-complete but Enter does nothing.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The following will work:

Code: Select all

[em_Cd]
cmd=cd %temp%
The parameter %A tells TC to pass the command line to the command exactly as entered. It depends on the called program or function whether it supports env vars or not.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Thanks for the details.

However it is strange that entering paths with envvars doesn't work when I'm editing path bar if such alias is defined.
Post Reply