Behavior of CD command for C: v.s C:\

English support forum

Moderators: white, Hacker, petermad, Stefan2

Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: [Implemented in Tc11.03rc3] [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *Fla$her »

2petermad
I don't see the point in linking this behavior to the cmd.exe logic, because there is no notion of an inactive panel from which this path is taken.
Overquoting is evil! 👎
User avatar
AntonyD
Power Member
Power Member
Posts: 1249
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [Implemented in Tc11.03rc3] [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *AntonyD »

2Fla$her
The logic seems to be very simple. This command has its BASIC understanding and functionality. And this is to follow the canons of supporting this command at the level of built-in windows shells. If the command "do this and that" gives the same result in them (and it is), then you need to get the same result in the subj.
And the fact that the author THEN introduced ADDITIONAL functionality for this command is a question for its support of this "extension". If there are any questions at all. But this empowerment shouldn't affect the BASIC logic in any way.
#146217 personal license
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: [Implemented in Tc11.03rc3] [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *Fla$her »

2AntonyD
There can't be the same result here for the reason I described — there are no panels. Why is the current path of the working directory taken not the one in the active panel, but the one in the inactive one, if we are looking for a relationship with cmd.exe? It would be possible to take a path, for example, from the previous/next tab, in order to somehow bring the behavior closer to cmd.
Last edited by Fla$her on 2024-01-30, 11:53 UTC, edited 1 time in total.
Overquoting is evil! 👎
User avatar
AntonyD
Power Member
Power Member
Posts: 1249
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [Implemented in Tc11.03rc3] [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *AntonyD »

Reasonable guess and suggestion about active panel. It would really be better the way you described.
BUT the main thing should remain precisely this - that the behavior during the execution of a _directories_ change command (and only _them_ - any other objects suitable for this "change"/command - are only an extension of the basic functionality and their problems (if any) should be considered separately) should be the same as it will be with a similar call from the Windows command shell.
#146217 personal license
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: [Implemented in Tc11.03rc3] [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *beb »

You guys are deep-diving into an abyss that doesn't exist.
There are three variables that return paths:
%COMMANDER_INI%
%COMMANDER_DRIVE%
%COMMANDER_INI_PATH%
All of them essentially can point to the same location.
I expect all of them will be consistent, behave the same way, and imply the same syntax in any circumstances.
Either, all and each of them should return paths with trailing backslashes, or no one.
Currently, none of them use the trailing backslash, the main condition is fulfilled, and as a common user, I am fully satisfied.

And, by the way, this is namely the way all the Windows path-related variables are going (while if I recall correctly, the Windows version of Total Commander is being discussed over here).
Last edited by beb on 2024-01-30, 12:10 UTC, edited 1 time in total.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: [Implemented in Tc11.03rc3] [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *Fla$her »

2beb
The variable has already been sorted out, everything is fixed. We discussed something else.
Overquoting is evil! 👎
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: [Implemented in Tc11.03rc3] [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *beb »

2Fla$her
OK, but if something else is being discussed, why not create a dedicated post for it somewhere else?
Otherwise, your fascinating discussion will remain unseen, unsung, and under the title of another opera.
I'm wondering out of curiosity.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: [Implemented in Tc11.03rc3] [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *Fla$her »

2beb
Well, talking about "cd" started from here. If the moderator separates the posts into a separate topic, I won't mind.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [Implemented in Tc11.03rc3] [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *petermad »

Fla$her wrote: 2024-01-30, 10:15 UTC I don't see the point in linking this behavior to the cmd.exe logic, because there is no notion of an inactive panel from which this path is taken.
It does not have anything to do with the inactive panel, it will also happen if you are in some subdir in the active panel and change the drive of that active panel. If you thereafter perform cd X: in the command line, where X is the previous drive in the panel, then TC wil open the drive in the subdir.

Or like this: open TC with drive c: in the left panel and drive D: in the right panel
Go into a cubfolder in drive C:
Change the drive in the left panel to D:
in either the left or the right panel open drive c: - TC wil open drive C: in the subfolder.

All assuming that AlwaysToRoot=0. cd X: behaves the same ways as clicking one of the drive abr buttons or a drive in the drive combobox, and I find that very logical and intuitive.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Behavior of CD command for C: v.s C:\

Post by *petermad »

Moderator message from: petermad » 2024-01-30, 14:20 UTC

Previous 24 posts split from "[Tc11] Suggestion: COMMANDER_INI_PATH"
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: [Implemented in Tc11.03rc3] [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *Fla$her »

petermad wrote: 2024-01-30, 13:57 UTC It does not have anything to do with the inactive panel, it will also happen if you are in some subdir in the active panel and change the drive of that active panel.
It sounds pointless. If the drive on the other panel doesn't coincide with the one to which you are navigating, then the path in the active panel will simply remain the same, since there will simply be nowhere to get it, the command will not work.
petermad wrote: 2024-01-30, 13:57 UTC in either the left or the right panel open drive c: - TC wil open drive C: in the subfolder.
But this behavior only confirms my thesis.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Behavior of CD command for C: v.s C:\

Post by *petermad »

If the drive on the other panel doesn't coincide with the one to which you are navigating, then the path in the active panel will simply remain the same, since there will simply be nowhere to get it, the command will not work.
That is a false assumption - TC remembers the last active directory for all visited drives (until restarted), and if you go back to that drive (and the same drive is NOT open in the opposite panel), then TC goes back to the remembered directory. If the drive you go back to happens to be open in the other panel, then TC goes to the same directory as in that other panel, when going back to the drive in the active panel. It works that way fore any drive that can be assigned to a drive letter and for FTP connetions.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Behavior of CD command for C: v.s C:\

Post by *Fla$her »

petermad wrote: 2024-01-31, 22:56 UTC That is a false assumption
I disagree. In the described conditions, it's the cancellation that occurs, otherwise the panel would have been updated.
petermad wrote: 2024-01-31, 22:56 UTC TC remembers the last active directory for all visited drives (until restarted), and if you go back to that drive (and the same drive is NOT open in the opposite panel), then TC goes back to the remembered directory.
Then one more clarification is required here — on the active panel, the drive must also differ from the selected one.
That is, if C: and D: are on both sides, then when "E: is opened, E:\path will open.
I switched to AlwaysToRoot=1 a long time ago, so it didn't even stick in memory.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Behavior of CD command for C: v.s C:\

Post by *petermad »

Then one more clarification is required here
OK - i'll clarify once again:
  1. Use AlwaysToRoot=0.
  2. Open TC with C:\ in the left and D:\test on the right.
  3. Open drive E: in the right side.
  4. surf around in C:'s subdirecties in the left side.
  5. Surf around in E:'s subdirecties in the right side.
  6. In ANY side open drive D: by pressing the D: drive button, or using the drive combobox or typing cd D: in the command line.
  7. D:\test is opened in the side you chose to open.
  8. In the side with the D: drive go to another drive.
  9. Execute cm:Exit 9 to restart TC with the same directories left and right (none of them with drive D:).
  10. Open drive D: again like in step 6 - TC will open in D:\ - not in D:\test - because the memory is flushed by the restart.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply