4 set filename [lindex $argv 0]
7 while {[gets $f buf] >= 0} {
8 if {$buf eq "@INSERTINDEX@"} {
14 # Collect lines and commands
19 while {[gets $f buf] >= 0} {
20 if {[string match "~~*" $buf]} {
21 if {[string match "*:*" $prev]} {
24 set lines [linsert $lines end-1 "\[\[$target\]\]"]
28 foreach cmd [split $prev ":,"] {
29 set cmd [string trim $cmd]
31 lappend commands [list $cmd $target]
41 puts {[frame="none",grid="none"]}
42 puts {|=========================}
44 foreach command [lsort $commands] {
45 foreach {cmd target} $command break
47 puts -nonewline "|<<$target,$cmd>> "
58 puts {|=========================}