Artifacts Associated With Ticket 1367486
Ticket change [d176232f65] (rid 113353) by nobody on 2005-11-27 12:08:44:
- assignee initialized to: "hobbs"
- cmimetype initialized to: "text/plain"
- comment initialized to:
use an alias for undefined procedure --- (bin) 1 % interp alias {} xxx {} xx xxx (bin) 2 % xx too many nested evaluations (infinite loop?) (bin) 3 % xxx too many nested evaluations (infinite loop?) --- but --- (bin) 1 % interp alias {} xxx {} yy xxx (bin) 2 % yy invalid command name "yy" (bin) 3 % xxx invalid command name "yy" --- (bin) 4 % info patchlevel 8.4.11 (bin) 5 % parray tcl_platform tcl_platform(byteOrder) = littleEndian tcl_platform(machine) = intel tcl_platform(os) = Windows NT tcl_platform(osVersion) = 5.1 tcl_platform(platform) = windows tcl_platform(user) = oleinickoa tcl_platform(wordSize) = 4 - foundin initialized to: "obsolete: 8.4.11"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "20. [interp]"
- title initialized to: "Unexpected error when aliasing undefined command"
- type initialized to: "Bug"
Ticket change [725670686c] (rid 100838) by msofer on 2005-11-27 19:37:40:
- assignee changed to: "msofer"
- closedate changed to: "2005-11-27T12:37:40"
- closer changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 This is not really a bug, and [interp alias] has nothing to do with it. It is the autocompletion in the interactive tclsh playing tricks on you. Look at the following session: % interp alias {} xxx {} xx xxx % xx too many nested evaluations (infinite loop?) % proc xxAHA! {} {} % xx ambiguous command name "xx": xxAHA! xxx What is happening in your case is: (1) you invoke a command named xx (directly) (2) no such command; autocompletion sees that there is a unique command (xxx) starting with xx, and invokes it (3) xxx invokes xx: goto 1. Note also that you see the correct error if the script is sourced from a file, as the autocompletion does not work in that case: mig@uhu:~$ cat /tmp/test interp alias {} xxx {} xx xx mig@uhu:~$ tclsh /tmp/test invalid command name "xx" while executing "xx" (file "/tmp/test" line 2) - login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- username: "msofer"