From 78719982ea4a118a29a5c68bde315ff281bf9928 Mon Sep 17 00:00:00 2001 Message-Id: <78719982ea4a118a29a5c68bde315ff281bf9928.1718410784.git.mdw@distorted.org.uk> From: Mark Wooding Date: Thu, 23 Jun 2011 09:17:09 +0100 Subject: [PATCH] dot/tclshrc: Tcl configuration. Organization: Straylight/Edgeware From: Mark Wooding Currently just readline. --- dot/tclshrc | 18 ++++++++++++++++++ setup | 1 + 2 files changed, 19 insertions(+) create mode 100644 dot/tclshrc 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 -- [mdw]