Please support %Commander_Drive% for new View modes

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Hans.Müller
Junior Member
Junior Member
Posts: 4
Joined: 2016-06-12, 12:47 UTC

Please support %Commander_Drive% for new View modes

Post by *Hans.Müller »

Please support %Commander_Drive% for new View modes.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

OK, I will try to add environment variable support in general.
Author of Total Commander
https://www.ghisler.com
Emalis.Reckah
Junior Member
Junior Member
Posts: 30
Joined: 2016-06-13, 21:03 UTC

Post 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 :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post 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.
Author of Total Commander
https://www.ghisler.com
Emalis.Reckah
Junior Member
Junior Member
Posts: 30
Joined: 2016-06-13, 21:03 UTC

Post 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
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Ah, I see - but with which variables? They could be ambigous, e.g. %commander_drive% is part of %commander_path%.
Author of Total Commander
https://www.ghisler.com
Emalis.Reckah
Junior Member
Junior Member
Posts: 30
Joined: 2016-06-13, 21:03 UTC

Post 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 :)
User avatar
Dalai
Power Member
Power Member
Posts: 10023
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

2ghisler(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
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Post Reply