One sentence: command line editing sucks in Linux and Mac. On Windows, you can use the up and down arrows, among other things, to recall last lines and edit. On Linux and Mac OS X, these keys don’t work, making line editing difficult.
In my previous article, I mentioned using tkcon to get around this limitation. Today, I am going to talk about a different mechanism: tclreadline. This is a Tcl package which makes use of GNU readline. To install this package on Debian-family of Linux, which includes Debian, Ubuntu, Kbuntu, Xubuntu, and Linuxmint, issue the following command line from the terminal:
sudo apt-get install tclreadline
Next, follow the instruction in the usage section from the tclreadline page. Now, every time you start tclsh, you can use up/down errors, tab-completion, and many other features that GNU readline provides.