Possible bug : Function not implemented

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

User avatar
wanderer
Power Member
Power Member
Posts: 1578
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Possible bug : Function not implemented

Post by *wanderer »

TC7pb3. Type a number (only) in the command line, i.e. "1". When you press Enter, you get the message "function not implemented". Is this normal behavior or a bug?
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

1 is nothing

Post by *Clo »

2wanderer

:) Hi !

• It seems normal as long as "1" doesn't represent any legal command¦alias…

:mrgreen: KR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Post by *Slavic »

It's interesting! User can be surprised that digits 1...9 are reserved for some internal commands (and cannot be the file names, yes?), but 0, in contrary, isn't linked to any command: the common message "File not found" is shown :-)
User avatar
wanderer
Power Member
Power Member
Posts: 1578
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Re: 1 is nothing

Post by *wanderer »

Clo wrote:It seems normal as long as "1" doesn't represent any legal command¦alias…
This did not happen in TC 6.56 so i assume that either is an error message from a new feature which correctly appears there or an error message that should not appear at all.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
wanderer
Power Member
Power Member
Posts: 1578
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

Slavic wrote:It's interesting! User can be surprised that digits 1...9 are reserved for some internal commands (and cannot be the file names, yes?), but 0, in contrary, isn't linked to any command: the common message "File not found" is shown :-)
Not really. Try a larger number, i.e. "1223523552". You'll get the same message.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48173
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I was asked by several users to support internal commands in the command line - not only by name cm_xyz, but also by number. If the number doesn't correspond to an internal command, an error will be shown.

What do you think, what should be changed? Should this function be removed at all? Or should I try to run a program 1.exe if there is no internal command "1"?
Author of Total Commander
https://www.ghisler.com
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

This problem was already reported.
http://www.ghisler.ch/board/viewtopic.php?t=13844
User avatar
wanderer
Power Member
Power Member
Posts: 1578
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

ghisler(Author) wrote:I was asked by several users to support internal commands in the command line - not only by name cm_xyz, but also by number. If the number doesn't correspond to an internal command, an error will be shown.

What do you think, what should be changed? Should this function be removed at all? Or should I try to run a program 1.exe if there is no internal command "1"?
Wow, isn't that a little confusing? Ok, it is a nice feature but what if someone has a file named 1.exe and a command named 1? Maybe the following is the best:

- both exe file and internal command do not exist: display a message saying "file not found".
- only one of the two exists (exe file or internal command): execute whichever is appropriate.
- both exe file and internal command exist: display a small window with three buttons "close, execute internal command, execute exe" and let the user decide. The same thing you do when a user tries to execute an exe inside a zip which contains more than one file: "close, unpack and execute, unpack all and execute".
Last edited by wanderer on 2007-01-30, 22:25 UTC, edited 1 time in total.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
Sombra
Power Member
Power Member
Posts: 811
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Post by *Sombra »

What do you think, what should be changed? Should this function be removed at all? Or should I try to run a program 1.exe if there is no internal command "1"?
Hmmm... Perhaps the internal command only should run if is launched with a combination of keys. Example: ALTGR + ENTER
Shift+Enter isn't viable if exist number.pif or an packed file without extension...
Note that ALTGR+Enter place the cursor at begin of commandline.

CTRL+Shift+Enter ??
I can read English, but... I write like Tarzan. (sorry)
User avatar
szlori
Senior Member
Senior Member
Posts: 263
Joined: 2005-01-17, 07:12 UTC
Location: Sydney

Post by *szlori »

Yes, there should be a search order, perhaps: internal command -> file
If both exists, you could display a dialog as wanderer suggested or simply apply the search order and execute the internal command.

Better yet (at least in my opinion) impose that internal commands should be prepended with a special character when entered on the command line.
This character could be one that is invalid in the file name: ex. the question mark (?)
So, for example, user would need to enter: ?323 or ?cm_SrcBySize
In this case there would be no ambiguity between internal command and file.
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

I think simple and flexible solution is a new option "EnableRunInternalCommand" with the wollowing values:
0 - commands are disabled;
1 - commands are enabled and have higher priority then external commands;
2 - commands are enabled and have lover priority then external commands;
User avatar
wanderer
Power Member
Power Member
Posts: 1578
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

VadiMGP wrote:0 - commands are disabled;
1 - commands are enabled and have higher priority then external commands;
2 - commands are enabled and have lover priority then external commands;
3 - always ask the user to choose (dialog). :) Which could also be the default, so users know there is a new feature when they install TC7.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Post by *Slavic »

I suppose that such option should be disabled by default for common users (but mentioned in Help). Advanced users would be able to enable it manually in wincmd.ini. Also I think that using a special character before these numbers is a good idea, even for advanced users. The better solution is to select the character that can't exist in the normal command line (DOS restrictions). Will it be a question mark or other symbol, is not so important.
User avatar
wanderer
Power Member
Power Member
Posts: 1578
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

Slavic wrote:I suppose that such option should be disabled by default for common users (but mentioned in Help).
A user may be advanced enough to create a custom command but there is no assurance he will know that custom commands are supported in the command line. Perhaps option 3 should be the default - it seems helpful and safe too.
Slavic wrote:Also I think that using a special character before these numbers is a good idea, even for advanced users. The better solution is to select the character that can't exist in the normal command line (DOS restrictions). Will it be a question mark or other symbol, is not so important.
If option 3 exists, there is no need for a special character (unless someone wishes to force the execution of an internal command, even if a file exists with the same name and not have a new window popping-up every time, asking what to do).
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
szlori
Senior Member
Senior Member
Posts: 263
Joined: 2005-01-17, 07:12 UTC
Location: Sydney

Post by *szlori »

I was saying about the special character, because it's a common practice.
It's same for environment variables: you use % (or $).

These internal commands are a bit like "command variables" (well "constants" most of them, but you get the idea...)
Post Reply