Digits in command line
Moderators: Hacker, petermad, Stefan2, white
Digits in command line
May be it is not a bug, but it is unpleasant surprise in TC7 beta 3.
If typed command (in the command line) contains digits only TC tries to execute corresponding internal command.
I discovered this while attempting to run several batch files named 1.bat, 2.bat, etc... And it was really BIG surprise.
If this behavior is intentionally, I think it should be optionally also.
If typed command (in the command line) contains digits only TC tries to execute corresponding internal command.
I discovered this while attempting to run several batch files named 1.bat, 2.bat, etc... And it was really BIG surprise.
If this behavior is intentionally, I think it should be optionally also.
Support.
executables (.exe, .com, .bar, .cmd) with mumeric names really should have precedence over internal command numbers.
Same thing applies to executables with same name as alias'es.
IMHO internal commands and alias'es should only be executed if normal execution of the command is unsuccessful.
executables (.exe, .com, .bar, .cmd) with mumeric names really should have precedence over internal command numbers.
Same thing applies to executables with same name as alias'es.
IMHO internal commands and alias'es should only be executed if normal execution of the command is unsuccessful.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
The precedence of real executables files over internal numeric commands and user defined aliases is questionable.petermad wrote:Support.
executables (.exe, .com, .bar, .cmd) with mumeric names really should have precedence over internal command numbers.
Same thing applies to executables with same name as alias'es.
IMHO internal commands and alias'es should only be executed if normal execution of the command is unsuccessful.

Your arguments sound convincing at first glance only, but actually, there is the possibility that a user deliberately chooses to create aliases which have the same name as internal commands or external executables in order to override them.
The question really is which should be the order of priority if names collide?
(1) external executable (without extension, with extension there is no collision very likely)
(2) internal commands
(3) aliases
Or which order?
Have a look at 4NT (JpSoft) e.g.:
The order is - if names collide -:
(1) aliases
(2) internal commands
(3) external executables
If you wish to override this order, then you prefix an asterix to the commandline.
E.g.:
+ alias "cm_edit" defined to call pspad.exe
+ internal command "cm_edit" will call Windows default editor (notepad.exe)
+ So launching "cm_edit" inside 4NT will launch pspad.exe.
+ If you wish the internal command, you would type "*cm_edit" and get the Windows default editor.
+ And if there were a cm_edit.exe somewhere in your path you woud have to launch "cm_edit.exe".
You see things are only simple and unambiguous if one looks at them only from one perspective.
Taking a different perspective, things will look differently.
As I have got used to the JPSoft 4NT logic for years now (which somehow seems to be in accordance with the Linux/Unix handling of aliases) , bet which order of priority I would prefer?!
--
Summary
There is no such thing as a natural order of aliases, internal commands and external executables, if their names collide.
There is only such a thing as a broadly accepted convention as to what the order of precedence should be.
Christian might explain what the current order of precedence is. (It should definitely be clearly stated inside the helpfile - did not search for it so far

Kind regards,
Karl
I won't argue against that - my opinion was based on not having worked with neither 4NT nor Linux/Unix - merely thinking that assigning the name of an executable to an alias would be more likely to by accident than by choice, but I can appreciate your way of seing it too.here is only such a thing as a broadly accepted convention as to what the order of precedence should be
I agree - and I haven't found anything there yet.It should definitely be clearly stated inside the helpfile
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
This feature has now been removed from TC7 beta 4.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
You mean something like em_number?Hacker wrote:DrShark,
Just create aliases for the internal commands you intend to use.
It's not difficult for me


Why using digits in command line is bad if will be disabled by default?
p.s. I think command em_xxx more useful for button/menu but not for command line...