My dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.8 KiB

12 months ago
  1. #!/bin/sh
  2. # FILE: sample.tclshrc
  3. # $Id$
  4. # ---
  5. # tclreadline -- gnu readline for tcl
  6. # https://github.com/flightaware/tclreadline/
  7. # Copyright (c) 1998 - 2014, Johannes Zellner <johannes@zellner.org>
  8. # This software is copyright under the BSD license.
  9. # ---
  10. # exec with tclsh \
  11. exec tclsh "$0" "$@"
  12. if {$tcl_interactive} {
  13. package require tclreadline
  14. # uncomment the following if block, if you
  15. # want `ls' executed after every `cd'. (This was
  16. # the default up to 0.8 == tclreadline_version.)
  17. #
  18. # if {"" == [info procs cd]} {
  19. # catch {rename ::tclreadline::Cd ""}
  20. # rename cd ::tclreadline::Cd
  21. # proc cd {args} {
  22. # if {[catch {eval ::tclreadline::Cd $args} message]} {
  23. # puts stderr "$message"
  24. # }
  25. # tclreadline::ls
  26. # }
  27. # }
  28. # uncomment the following line to use
  29. # tclreadline's fancy ls proc.
  30. #
  31. # namespace import tclreadline::ls
  32. # tclreadline::Print is on (`yes') by default.
  33. # This mimics the command echoing like in the
  34. # non-readline interactive tclsh.
  35. # If you don't like this, uncomment the following
  36. # line.
  37. #
  38. # tclreadline::Print no
  39. # uncomment the folling line, if you want
  40. # to change tclreadline's print behaviour
  41. # frequently with less typing.
  42. #
  43. # namespace import tclreadline::Print
  44. # store maximal this much lines in the history file
  45. #
  46. set tclreadline::historyLength 200
  47. # disable tclreadline's script completer
  48. #
  49. # ::tclreadline::readline customcompleter ""
  50. # automatically save the history after every
  51. # command (instead of when cleanly exiting)
  52. set tclreadline::autosave 1
  53. # go to tclrealdine's main loop.
  54. #
  55. tclreadline::Loop
  56. }
  57. # vim:set ft=tcl: