Overview
| Artifact ID: | 725670686cf7fccdd2980d3d92a7407a748a9407 |
|---|---|
| Ticket: | 1367486fffffffffffffffffffffffffffffffff
Unexpected error when aliasing undefined command |
| User & Date: | msofer on 2005-11-27 19:37:40 |
Changes
- 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"