Spaces in the command line shouldn't open explorer
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 5
- Joined: 2008-11-29, 10:51 UTC
- Contact:
Spaces in the command line shouldn't open explorer
If I mistakenly add a space to the command line (I don't know how it is happened:)), the, when I try to enter to a directory by pressing Enter, Windows explorer opens. I think Total Commander should ignore command line containing only spaces, because spaces are invisible symbols and you do not know what action invokes your following pressing of Enter key. At least there should be an option to ignore spaces.
- sqa_wizard
- Power Member
- Posts: 3893
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
Welcome to the forum mauzer_tim !
The command line is (as the name already says) a line where you can enter a command !
Typing notepad.exe test.txt has to execute exactly this command (open notepad with file test.txt).
It should not open a file "notepad.exe test.txt" and should not enter a directory with the name "notepad.exe test.txt".
According to the conventions you have to:
- set doublequotes around commands with spaces
- use CD in front of a directory name to enter this directory
Why should TC break this conventions ?
The command line is (as the name already says) a line where you can enter a command !
Typing notepad.exe test.txt has to execute exactly this command (open notepad with file test.txt).
It should not open a file "notepad.exe test.txt" and should not enter a directory with the name "notepad.exe test.txt".
According to the conventions you have to:
- set doublequotes around commands with spaces
- use CD in front of a directory name to enter this directory
Why should TC break this conventions ?
#5767 Personal license
-
- Junior Member
- Posts: 5
- Joined: 2008-11-29, 10:51 UTC
- Contact:
sga_wizard, thanks for your reply!
You're absolutely right, but... you reply doesn't concern my wish. I just suggest to ignore to execute a command line which is consists only from spaces which I mistakenly entered there. By "command line" I mean TotalCommander field which is located at the bottom of the main window.
You're absolutely right, but... you reply doesn't concern my wish. I just suggest to ignore to execute a command line which is consists only from spaces which I mistakenly entered there. By "command line" I mean TotalCommander field which is located at the bottom of the main window.
- sqa_wizard
- Power Member
- Posts: 3893
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
- sqa_wizard
- Power Member
- Posts: 3893
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
Re: Spaces in the command line shouldn't open explorer
you may be interested in a shortish solution for this behaviour/feature.mauzer_tim wrote:If I mistakenly add a space to the command line (I don't know how it is happened:)), the, when I try to enter to a directory by pressing Enter, Windows explorer opens. I think Total Commander should ignore command line containing only spaces, because spaces are invisible symbols and you do not know what action invokes your following pressing of Enter key. At least there should be an option to ignore spaces.
its discussed in the german forum too, and we got a short and effective workaround :-)
put, or add
Code: Select all
[Alias]
=cm_Return
which will force tc to press ENTER, even if there is only a space in the commandline.
Was nützt der Löffel für die Weisheit, wenn man zu weit vom Suppentopf entfernt sitzt?
Mario
Mario
-
- Junior Member
- Posts: 5
- Joined: 2008-11-29, 10:51 UTC
- Contact:
Re: Spaces in the command line shouldn't open explorer
mario, thank you! I do not understand why, but this solution works well for me!versalzen wrote:you may be interested in a shortish solution for this behaviour/feature.mauzer_tim wrote:If I mistakenly add a space to the command line (I don't know how it is happened:)), the, when I try to enter to a directory by pressing Enter, Windows explorer opens. I think Total Commander should ignore command line containing only spaces, because spaces are invisible symbols and you do not know what action invokes your following pressing of Enter key. At least there should be an option to ignore spaces.
its discussed in the german forum too, and we got a short and effective workaround
put, or addin the wincmd.iniCode: Select all
[Alias] =cm_Return
which will force tc to press ENTER, even if there is only a space in the commandline.
Anyway I think that TotalCommander's team should make this behavior by default (do not run explorer if there is only spaces in cmd line). Because otherwise this is a very annoying!
-
- Junior Member
- Posts: 5
- Joined: 2008-11-29, 10:51 UTC
- Contact:
Because some tasks can be accomplished more simplier in Explorer than in TC. E.g. if you need to select a picture from many others it's effectively to do in Explorer because it displays them as thumbnails and do it very quickly, moreover Explorer allows to change thumbnail sizes and display them in full screen window.sqa_wizard wrote:Why should anybody open an Explorer if he has a TC
-
- Junior Member
- Posts: 5
- Joined: 2008-11-29, 10:51 UTC
- Contact:
- sqa_wizard
- Power Member
- Posts: 3893
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
I'd like to bring back to attention this a very old thread. Is there any solution for this? It is happening to me quite often that standalone space in cmd line is opening Explorer instead of navigating to a subdir when pressing Enter...
...WinKey-R that will open "windows run dialog" will not even enable "Ok" button when in cmd line are only spaces
thank you
ado
...WinKey-R that will open "windows run dialog" will not even enable "Ok" button when in cmd line are only spaces
thank you
ado
MVV,
yes, agree... the problem is that if there is the space character you cannot see it. I do not complain about case when there are some visible characters. In such case you get just "File not found" from TC. I am perfectly fine with it (enter or space key and that dialog is gone). New explorer process is whole new process that takes time to start and Alt-F4 is not that convenient as enter.
Since there is not that many people comment on this this, I'd say it is not happening that often. But still I'd love if it can be maybe just "turn on/off" feature in wincmd.ini. Or I'd be fine also with that "File not found" on space in cmd line
yes, agree... the problem is that if there is the space character you cannot see it. I do not complain about case when there are some visible characters. In such case you get just "File not found" from TC. I am perfectly fine with it (enter or space key and that dialog is gone). New explorer process is whole new process that takes time to start and Alt-F4 is not that convenient as enter.
Since there is not that many people comment on this this, I'd say it is not happening that often. But still I'd love if it can be maybe just "turn on/off" feature in wincmd.ini. Or I'd be fine also with that "File not found" on space in cmd line
