Overview
Comment: | TODO tclreadlineSetup.tcl.in |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | CVS |
Files: | files | file ages | folders |
SHA1: |
c7a9a1576d1ab8516b9fb3ed78117f8b |
User & Date: | johannes@zellner.org on 1999-09-06 06:58:24 |
Other Links: | manifest | tags |
Context
1999-09-06
| ||
09:30 | configure.in tclreadlineSetup.tcl.in check-in: 067d518401 user: johannes@zellner.org tags: trunk | |
06:58 | TODO tclreadlineSetup.tcl.in check-in: c7a9a1576d user: johannes@zellner.org tags: trunk, CVS | |
1999-09-04
| ||
08:48 | .csymrc .login .tclshrc .vimrc vim xyz-stereo tcl_ft.vim HKLlink.h hkl.h tclreadlineSetup.tcl.in check-in: 7d8cdbb1ff user: johannes@zellner.org tags: trunk | |
Changes
Modified TODO from [9c4e002210] to [68a22a50ce].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 | - + | /* ================================================================== FILE: "/diska/home/joze/src/tclreadline/TODO" |
︙ | |||
31 32 33 34 35 36 37 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | - - - - + | + history_truncate_file(int n, char* historyfile) verwenden, um nur eine begrenze Zahl zu schreiben. + wenn nur ein array Element von a vorliegt, wird trotzdem nur auf $a( completed. --> ändern. |
Modified tclreadlineSetup.tcl.in from [99e76e529e] to [8724f1bf99].
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | #!/usr/locanl/bin/tclsh # FILE: "/diska/home/joze/src/tclreadline/tclreadlineSetup.tcl.in" |
︙ | |||
332 333 334 335 336 337 338 | 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 | + - + | } # puts stderr part=$part return ${part} } proc SubCmd {start line} { set depth 0 # puts stderr SubCmd |
︙ | |||
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 | 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 | + + + + + + + - + + + + + | proc QuoteQuotes {line} { regsub -all -- \" $line {\"} line regsub -all -- \{ $line {\{} line; # \}\} (keep the editor happy) return $line } #** # get the word position. # @return the word position # @note will returned modified values. # @sa EventuallyEvaluateFirst # @date Sep-06-1999 # # % p<TAB> # % bla put<TAB> $b # % put<TAB> $b # part == put # start == 0 # end == 3 # line == "put $b" # [PartPosition] should return 0 # |
︙ | |||
635 636 637 638 639 640 641 642 643 644 645 646 647 648 | 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | # set matches [FullQualifiedMatches ${namespaces} ${matches}] set namespaces "" } } return [string trim "${matches} ${namespaces}"] } #** # check, if the first argument starts with a '[' # and must be evaluated before continuing. # NOTE: eventually modifies all arguments. # DATE: Sep-06-1999 # proc EventuallyEvaluateFirst {partT startT endT lineT} { # return; # disabled upvar $partT part $startT start $endT end $lineT line set line [string trim ${line}] set char [string index ${line} 0] if {{[} != ${char} && {$} != ${char}} {return} set pos 0 while {-1 != [set idx [string first {]} ${line} ${pos}]]} { set cmd [string range ${line} 0 ${idx}] if {[info complete ${cmd}]} { break; } set pos [expr ${idx} + 1] } if {![info exists cmd]} {return} if {![info complete ${cmd}]} {return} set cmd [string range ${cmd} 1 [expr [string length ${cmd}] - 2]] set rest [string range ${line} [expr ${idx} + 1] end] if {[catch [list set result [string trim [eval ${cmd}]]]]} {return} set line ${result}${rest} set diff [expr [string length ${result}] - ([string length ${cmd}] + 2)] incr start ${diff} incr end ${diff} } # if the line entered so far is # % puts $b<TAB> # part == $b # start == 5 # end == 7 # line == "$puts $b" |
︙ | |||
699 700 701 702 703 704 705 | 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 | - - - + + - + | # new_line = [lindex $sub 1] == " put $b" # } elseif {"" != [set sub [SubCmd $start $line]]} { set new_start [lindex $sub 0] set new_end [expr $end - ($start - $new_start)] set new_line [lindex $sub 1] # puts stderr "(SubCmd) $new_start $new_end $new_line" |
︙ | |||
1688 1689 1690 1691 1692 1693 1694 | 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 | + - + + - + - + | eval - inscope - forget - parent { return [AttemptFromList ${mod} $space_matches] } code { return "" } current {} export { return [MenuFromList ${mod} -clear ?pattern?] } import { |
︙ | |||
2084 2085 2086 2087 2088 2089 2090 | 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 | - + | return [AttemptFromList ${mod} {r w u}] } return "" } proc complete(update) {text start end line pos mod} { if {1 == $pos && ![llength ${mod}]} { |
︙ | |||
2228 2229 2230 2231 2232 2233 2234 | 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 | - + | [string match ${cmd}* configure])} { set prev [PreviousWord ${start} ${line}] #puts \nprev=|$prev| #puts switches=|$options(switches)| #puts found=[lsearch -exact ${prev} $options(switches)] if {-1 != [set found [lsearch -exact $options(switches) ${prev}]]} { if {![llength ${mod}]} { |
︙ |