From: Mark Wooding Date: Thu, 23 Jun 2011 08:17:09 +0000 (+0100) Subject: dot/tclshrc: Tcl configuration. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/78719982ea4a118a29a5c68bde315ff281bf9928 dot/tclshrc: Tcl configuration. Currently just readline. --- diff --git a/dot/tclshrc b/dot/tclshrc new file mode 100644 index 0000000..a25c8e1 --- /dev/null +++ b/dot/tclshrc @@ -0,0 +1,18 @@ +### -*-tcl-*- + +if {$tcl_interactive} { + if {![catch { package require tclreadline }]} { + proc _set_prompt {} { + set bold [exec tput bold] + set unbold [exec tput sgr0] + set interp [file tail [info nameofexecutable]] + proc ::tclreadline::prompt1 {} \ + [list return "$bold$interp%$unbold "] + proc ::tclreadline::prompt2 {} \ + [list return "$bold$interp>$unbold "] + } + _set_prompt + rename _set_prompt {} + ::tclreadline::Loop + } +} diff --git a/setup b/setup index 307e3d0..d5111d8 100755 --- a/setup +++ b/setup @@ -140,6 +140,7 @@ dotfiles=" toprc mc-ini:.mc/ini mc-panels.ini:.mc/panels.ini aspell.conf + tclshrc:.tclshrc tclshrc:.wishrc lisp-init.lisp:.cmucl-init.lisp lisp-init.lisp:.sbclrc lisp-init.lisp:.clisprc.lisp