1 # Readline-based interactive shell for Jim
2 # Copyright(C) 2005 Salvatore Sanfilippo <antirez@invece.org>
4 # In order to automatically have readline-editing features
5 # put this in your $HOME/.jimrc
7 # if {$jim_interactive} {
8 # if {[catch {package require rlprompt}] == 0} {
12 package require readline
14 proc rlprompt.shell
{} {
15 puts "Readline shell loaded"
16 puts "Welcome to Jim [info version]!"
20 set line
[readline.readline
$prompt]
22 if {[string length
$line] == 0} {
30 if {![info complete
$buf]} {
34 readline.addhistory
$buf