.tclshrc
author Oleksandr Gavenko <gavenkoa@gmail.com>
Fri, 27 May 2016 22:55:56 +0300
changeset 797 6cf66a062f3b
parent 635 799341bb0ea7
permissions -rw-r--r--
~/usr/bin can't be placed before /bin in PATH because cygrun is recursively runs in that case. Introduce ~/usr/xbin for symlinks to override /usr/bin.

# -*- mode: tcl -*-

if {$tcl_interactive} {
    catch {
        package require tclreadline
        namespace eval tclreadline {
            if ([regexp "^(xterm|eterm-color)" "$::env(TERM)"]) {
                proc prompt1 {} { return "\[0;31m\[1mtcl>\[0m " }
                proc prompt2 {} { return "\[0;31m...> \[0m" }
            } {
                proc prompt1 {} { return "tcl> " }
                proc prompt2 {} { return "...> " }
            }
        }
        ::tclreadline::Loop
    }
}