Page 1 of 1
Please support %Commander_Drive% for new View modes
Posted: 2016-06-13, 10:00 UTC
by Hans.Müller
Please support %Commander_Drive% for new View modes.
Posted: 2016-06-13, 17:23 UTC
by ghisler(Author)
OK, I will try to add environment variable support in general.
Posted: 2016-06-15, 23:09 UTC
by Emalis.Reckah
Works now in beta 2 !

Thank you.
Now if buttons would be saved with %Commander_Drive%
and %Commander_Path% instead of "real" path names that would be great

Posted: 2016-06-15, 23:14 UTC
by ghisler(Author)
What do you mean? If I use Configuration - Button bar and add a button, I can write %Commander_Path% in the command field and it will be saved like that.
Posted: 2016-06-15, 23:21 UTC
by Emalis.Reckah
ghisler(Author) wrote:What do you mean? If I use Configuration - Button bar and add a button, I can write %Commander_Path% in the command field and it will be saved like that.
for ths example TC is in the folder B:\tcmd.
Now I drag B:\tcmd\mytool.exe on the buttonbar and it becomes %commander_path%\mytool.exe.
Now I drag B:\tool\mytool2.exe on the buttonbar and it stays
B:\tool\mytool2.exe
-> my wish would be to make it instead to
%Commander_Drive%\tool\mytool2.exe
Posted: 2016-06-16, 15:47 UTC
by ghisler(Author)
Ah, I see - but with which variables? They could be ambigous, e.g. %commander_drive% is part of %commander_path%.
Posted: 2016-06-16, 15:54 UTC
by Emalis.Reckah
Well that should be easy to detect.
If variable path = %commander_path% + something -> use %commander_path%.
Else when variable path has the same drive as %commander_drive% replace the drive in path with %commander_drive%
Ofc these are only QoL changes so if they are to difficult I can wait

Posted: 2016-06-16, 16:03 UTC
by Dalai
2
ghisler(Author)
There is an API function which resolves paths back to env variables:
PathUnExpandEnvStrings. However, as I see it, this function only replaces a few system env variables, so I'm not sure it helps much.
But I don't think it's a good idea to do such replacement. I'd expect TC to do exactly as told: use absolute path, not env variables.
Regards
Dalai