We implemented some tcl commands, if we type only part of the command at Tcl> prompt in tcl shell interactive mode, the tcl shell can recognize the command. But if we put the same partial command in tcl script file, then source the script from tcl shell, unknown command will be reported. And the whole command in tcl sript can be recognized.
How can we make source tcl script behavior same as shell interactive mode? We expect when source tcl script, partial command can also be reconginzed.
Please see following sample.
- Partial command can be recognized in shell interactive mode.
Tcl> my_prove Info: proving started Info: .... Info: .... Tcl> my_pro Info: proving started Info: .... Info: ....
- Partial command cannot be recognized when source run.tcl script.
a) run.tcl
setup_design my_prove my_pro
b) source the script run.tcl
Tcl> source run.tcl $inside source$$> setup_desgin Design setup... Done $inside source$$> my_prove Info: proving started Info: .... Info: .... $inside source$$> ::unknown my_pro invalid command name "my_pro"
unknownproc (withinfo body unknown), and copy that implementation (or the relevant parts of it) into your tcl scripts/libraries.