.tclshrc
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sat, 28 Jan 2017 01:45:34 +0200
changeset 821 7bfa94a26cde
parent 635 799341bb0ea7
permissions -rw-r--r--
Swap modifiers to previous assignment because I don't want to fix them in ~/.fvwm. Assign keycode to Caps_Lock before aliasing to LCtrl so ~/.xmodmaprc script can be re-evaluated without errors.

# -*- 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
    }
}