summaryrefslogtreecommitdiffstats
path: root/tcllib/examples/term/imenu
blob: 35944ec9b950afa370e32b158867c00222ff9db8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env tclsh
## -*- tcl -*-

lappend auto_path [file join [file dirname [file dirname [file dirname [info script]]]] modules]

package require term::ansi::send
package require term::ansi::ctrl::unix
package require term::interact::menu

term::ansi::send::import vt
vt::init
vt::clear

term::interact::menu m {
    {[ 0] uri}   a
    {[ 1] aes}   b
    {[ 2] irc}   c
    {[ 3] log}   d
    {[ 4] rc4}   e
    {[ 5] md5}   f
    {[ 6] ntp}   g
    {[ 7] rcs}   h
    {[ 8] tie}   i
    {[ 9] tar}   j
    {[10] taser} k
} -line 2 -column 2 -height 5 \
	-hilitleft 1 -hilitright 2 -framed 1

term::ansi::ctrl::unix::raw
set res [m interact]
term::ansi::ctrl::unix::cooked

puts $res
exit