Created
July 5, 2012 09:24
-
-
Save avsej/3052537 to your computer and use it in GitHub Desktop.
My .tclshrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # vim:ft=tcl: | |
| # GistID: 3052537 | |
| # | |
| # apt-get install tcl-signal | |
| if {$tcl_interactive} { | |
| package require Signal | |
| signal add SIGINT {} | |
| if [info exists env(DISPLAY)] { | |
| set env(TERM) xterm-color | |
| } else { | |
| set env(TERM) linux | |
| } | |
| set env(GTEST_ROOT) /home/avsej/code/cpp/googletest | |
| set env(CFLAGS) {} | |
| set env(CPPFLAGS) {} | |
| set env(CXXFLAGS) {} | |
| set env(PATH) /usr/local/sbin:/usr/sbin:/sbin:${env(HOME)}/.rbenv/shims:${env(HOME)}/.rbenv/bin:${env(HOME)}/script:${env(PATH)} | |
| set env(EMAIL) [email protected] | |
| package require tclreadline | |
| namespace eval ::tclreadline { | |
| proc ::tclreadline::prompt1 {} { | |
| global env | |
| if {[catch {set pwd [pwd]} tmp]} {set pwd "unable to get pwd" } | |
| if [info exists env(HOME)] { | |
| regsub $env(HOME) $pwd "~" pwd | |
| } | |
| set path [split $pwd "/"] | |
| set pwd [lindex $path [expr [llength $path] - 1]] | |
| return "$pwd $ " | |
| } | |
| } | |
| ::tclreadline::Loop | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment