From 79666d2f8eefe11ff7674ea92867eac354f200f9 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Thu, 4 Mar 2010 20:59:55 +1000 Subject: Remove various obsolete files Also rename and chmod some files Signed-off-by: Steve Bennett --- rlprompt.tcl | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 rlprompt.tcl (limited to 'rlprompt.tcl') diff --git a/rlprompt.tcl b/rlprompt.tcl new file mode 100644 index 0000000..556d0e9 --- /dev/null +++ b/rlprompt.tcl @@ -0,0 +1,31 @@ +# Readline-based interactive shell for Jim +# Copyright(C) 2005 Salvatore Sanfilippo +# +# In order to automatically have readline-editing features +# put this in your $HOME/.jimrc +# +# if {$jim_interactive} { +# if {[catch {package require rlprompt}] == 0} { +# rlprompt.shell +# } +# } + +package require readline +package provide rlprompt 1.0 + +proc rlprompt.shell {} { + puts "Readline shell loaded" + puts "Welcome to Jim [info version]!" + set prompt ". " + while 1 { + set line [readline.readline $prompt] + if {[string length $line] == 0} { + continue + } + readline.addhistory $line + set errCode [catch {uplevel #0 $line} err] + if {$err ne {}} { + puts $err + } + } +} -- cgit v1.1