changeset 634 | 89a1a77ad559 |
parent 632 | 500dcbf3445d |
child 635 | 799341bb0ea7 |
--- a/.tclshrc Fri Aug 30 00:26:29 2013 +0300 +++ b/.tclshrc Fri Aug 30 00:28:47 2013 +0300 @@ -1,6 +1,15 @@ # -*- mode: tcl -*- if {$tcl_interactive} { - package require tclreadline - ::tclreadline::Loop + catch { + package require tclreadline + namespace eval tclreadline { + if ([regexp "^(xterm|eterm-color)" "$::env(TERM)"]) { + proc prompt1 {} { return "\[0;31m\[1mtcl>\[0m " } + } { + proc prompt1 {} { return "tcl> " } + } + } + ::tclreadline::Loop + } }