1

How can I add auto-completion of commands and directories on pressing <TAB> in TCL shell ?

I know that a tclreadline package can be downloaded, but I have no clue how to use it and integrate it in my tcl shell.

logc
  • 3,813
  • 1
  • 18
  • 29

2 Answers2

2

You will find what you need at the TclReadline site. They suggest putting the following in your ~/.tclshrc file:

if {$tcl_interactive} {
    package require tclreadline 
    ::tclreadline::Loop
}

I also added the following prompt to remind me I am using Tcl Readline:

proc ::tclreadline::prompt1 {} { return "%% " }
Hai Vu
  • 37,849
  • 11
  • 66
  • 93
0

You can look also on tkcon. I found it very user friendly. In addition you can work with this tool "just from the box" without additional configurations.

Roman Kaganovich
  • 618
  • 2
  • 6
  • 27