- perform a package require on one of the pure-tcl readline2 type packages, providing a different command line history functionality.
- Set tcl_prompt1 or tcl_prompt2
- Create useful interp aliases.
- Customize proc unknown to, e.g., use expr as a last resort so that tclsh can be used as a calculator.
- I often need to use the Tclx package, so I place the package require statement in the .tclshrc file
- I placed this line in the .tclshrc to remind myself which version the shell is (there are at least two versions at work): puts "TCL $tcl_patchLevel\n"
[Lavin] - 2009-12-24 12:58:52How can I invoke tclsh for interactive execution, but specify file(s) to be sourced before issuing the first command prompt? TIA, -- MarkAMG: Put "source whatever.tcl" in your .tclshrc. Or put the code you'd like to be executed directly in .tclshrc.MGS [2010-05-14]: Maybe prompt can help you?
See also The RC File.