host info updates
[distro-setup] / .tclshrc
1 ; -*- tcl -*-
2
3 ;; iank: i ran tclsh, saw it had barely any editing commands, searched packages for tcl readline,
4 ;; found tcl-tclreadline. it didn't show how to use it for tclsh. googled it, found
5 ;; this page https://wiki.tcl-lang.org/page/tclreadline, which suggested the following snippet.
6
7
8
9 package require tclreadline
10
11 proc ::tclreadline::prompt1 {} {
12 return "[lindex [split [info hostname] "."] 0] [lindex [split [pwd] "/"] end] % "
13 }
14
15 ::tclreadline::Loop