| 82 | |
| 83 | == Do Explorative Programming in tclsh with Readline Support== |
| 84 | |
| 85 | tclsh does not offer readline support by itself, which is quite annoying. When writing portfiles or tinkering with changes to Macports base, I need to experiment in a Tcl shell all the time to tests small things. But for that, command history and Emacs-like navigation within the line are essential. Unfortunately tclsh does not offer this. |
| 86 | |
| 87 | Solution: use port {{{rlwrap}}} together with tclsh. When you invoke tclsh via rlwrap you get all the convenience you know from bash. |
| 88 | {{{ |
| 89 | rlwrap tclsh |
| 90 | }}} |
| 91 | Or, put even an alias into ~/.bashrc |
| 92 | {{{ |
| 93 | alias tclsh='rlwrap tclsh' |
| 94 | }}} |
| 95 | and don't think about it ever again. |