Overview
| Artifact ID: | 17ea9a09116bb3d6d659d2f7ee086ca2a0f8a727 |
|---|---|
| Ticket: | a4494e28edfaa3a5d064dd1d91cfbd6163b6fb20
alias trace did not find command in real command list of import references |
| User & Date: | miguel on 2014-02-06 13:20:50 |
Changes
- icomment:
Still trying to find out WTF. In the meantime, in the "don't do that" tradition, a simpler [alias] that does not have this problem - by deleting the temporary namespace tmpns immediately instead of setting a delete trace. I would actually consider having a permanent namespace for use as scratchpad - mimicking the /tmp directory. proc alias {alias target} { set fulltarget [uplevel 1 [list namespace which $target]] set tailtarget [namespace tail $fulltarget] set tmpns [info cmdcount] namespace eval [namespace qualifiers $fulltarget] \ [list namespace export $tailtarget] namespace eval $tmpns \ [list namespace import $fulltarget] uplevel 1 [list rename \ [namespace which ${tmpns}::$tailtarget] \ $alias] namespace delete $tmpns } - login: "miguel"
- mimetype: "text/plain"