Overview
Comment: | Modified Files: .login Added Files: .tclcrystalrc Removed Files: .csymrc ---------------------------------------------------------------------- tcl_ft.vim tclreadline.c tclreadline.n.in tclreadlineCompleter.tcl tclreadlineSetup.tcl.in |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
a8f8df8300aa49bffe98ecd20a157596 |
User & Date: | johannes@zellner.org on 1999-09-16 17:38:26 |
Other Links: | manifest | tags |
Context
1999-09-17
| ||
00:44 | Modified Files: src/tclcrystal/.tclcrystalrc src/tclcrystal/Makefile.in src/tclcrystal/configure.in src/tclcrystal/crystal.cc src/tclreadline/README src/tclreadline/tclreadlineCompleter.tcl src/tclreadline/tclreadlineSetup.tcl.in check-in: 1f6689ebb8 user: johannes@zellner.org tags: trunk | |
1999-09-16
| ||
17:38 | Modified Files: .login Added Files: .tclcrystalrc Removed Files: .csymrc ---------------------------------------------------------------------- tcl_ft.vim tclreadline.c tclreadline.n.in tclreadlineCompleter.tcl tclreadlineSetup.tcl.in check-in: a8f8df8300 user: johannes@zellner.org tags: trunk | |
09:30 | tclreadlineCompleter.tcl check-in: c4f1436684 user: johannes@zellner.org tags: trunk | |
Changes
Modified tclreadline.c from [8639d7447d] to [42d7384f97].
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 12 | - - + + | /* ================================================================== |
︙ | |||
187 188 189 190 191 192 193 194 195 196 197 | 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | + - + + | { int i, obj_idx, status; Tcl_Obj** objv = (Tcl_Obj**) MALLOC((argc + 1) * sizeof(Tcl_Obj *)); static char *subCmds[] = { "read", "initialize", "write", "add", "complete", "customcompleter", "builtincompleter", "eofchar", "reset-terminal", (char *) NULL }; enum SubCmdIdx { TCLRL_READ, TCLRL_INITIALIZE, TCLRL_WRITE, TCLRL_ADD, TCLRL_COMPLETE, |
︙ | |||
365 366 367 368 369 370 371 372 373 374 375 376 377 378 | 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 | + + + + + + + + + + + + | if (tclrl_eof_string) FREE(tclrl_eof_string); if (!blank_line(argv[2])) tclrl_eof_string = stripwhite(strdup(argv[2])); } Tcl_AppendResult(interp, tclrl_eof_string, (char*) NULL); break; case TCLRL_RESET_TERMINAL: /* TODO: add this to the completer */ if (argc > 3) { Tcl_WrongNumArgs(interp, 2, objv, "?terminal-name?"); return TCL_ERROR; } else if (3 == argc) { rl_reset_terminal(Tcl_GetString(objv[2])); } else { rl_cleanup_after_signal(); } break; default: goto BAD_COMMAND; /* NOTREACHED */ break; } |
︙ |
Modified tclreadline.n.in from [9b636f5135] to [72c7fb52c1].
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 12 | - - + + | .TH tclreadline n "@TCLREADLINE_VERSION@.@TCLREADLINE_PATCHLEVEL@" "Johannes Zellner" .\" (C) 1999 by Johannes Zellner |
︙ | |||
175 176 177 178 179 180 181 182 183 184 185 186 187 188 | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | + + + + + + | .TP 5 \fB::tclreadline::readline write\fP \fIhistoryfile\fP writes the history to the \fIhistoryfile\fP. This command is called automatically from the internal routine ::tclreadline::Exit. If the variable \fBtclreadline::historyLength\fP is non-negative, the historyfile will be truncated to hold only this number lines. .TP 5 \fB::tclreadline::readline reset-terminal\fP [\fIterminalName\fP] w/o argument: reset the state of the terminal to what it was before tclreadline was used. With argument: reinitialize readline's idea of the terminal settings using terminalName as the terminal type. .TP 5 \fB::tclreadline::Print\fP [\fIyes / no\fP] turns on or off the default behavior of tclsh to print the result of every command. This is turned on by default, so it will just behave as the tclsh w/o tclreadline. Turning off might be useful, when reading binary data for example. If \fB::tclreadline::Print\fP is called w/o arguments, it returns the current setting. |
︙ |
Modified tclreadlineCompleter.tcl from [f9084f3db9] to [66fd51af9c].
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | # -*- tclsh -*- # FILE: "/disk01/home/joze/src/tclreadline/tclreadlineCompleter.tcl" |
︙ | |||
980 981 982 983 984 985 986 | 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 | - + | } else { # try to use $pos further ... # puts stderr |$line| # if {"." == [string index [string trim ${line}] 0]} { set alias WIDGET |
︙ | |||
1035 1036 1037 1038 1039 1040 1041 | 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 | + + + - + + | [namespace eval ::tclreadline::${namespc} \ [list complete(${cmd}) $part $start $end $line $pos $mod]]]\ ::tclreadline::errorMsg] } { error [list error during evaluation of `complete(${cmd})'] } # puts stderr \nscript_result=|${script_result}| if {[string length ${script_result}] || \ "tclreadline_complete_unknown" == ${cmd} } { |
︙ | |||
2034 2035 2036 2037 2038 2039 2040 | 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 | - + | } return "" } proc complete(lappend) {text start end line pos mod} { switch -- $pos { 1 { return [VarCompletion ${text}] } |
︙ | |||
2972 2973 2974 2975 2976 2977 2978 | 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 | - + + + + + + + + | } proc tclreadline::complete(readline) {text start end line pos mod} { set cmd [Lindex $line 1] switch -- $pos { 1 { return [CompleteFromList ${text} { read initialize write add complete |
︙ |
Modified tclreadlineSetup.tcl.in from [4dfd34c126] to [4d1fefee5e].
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | #!/usr/locanl/bin/tclsh # FILE: "/disk01/home/joze/src/tclreadline/tclreadlineSetup.tcl.in" |
︙ | |||
134 135 136 137 138 139 140 | 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | - + | } } return -code error "invalid command name \"$name\"" } namespace eval tclreadline { |
︙ | |||
201 202 203 204 205 206 207 208 209 210 211 212 213 214 | 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | + + | if {[catch { ::tclreadline::readline write \ [::tclreadline::HistoryFileGet] } ::tclreadline::errorMsg]} { puts stderr $::tclreadline::errorMsg } ::tclreadline::readline reset-terminal if [catch "eval ::tclreadline::Exit $args" message] { puts stderr "error:" puts stderr "$message" } # NOTREACHED } |
︙ | |||
245 246 247 248 249 250 251 252 253 254 255 256 257 258 | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | + + | } proc HistoryFileGet {} { variable historyfile return $historyfile } # obsolete # proc Glob {string} { set commandstring "" foreach name $string { set replace [glob -nocomplain -- $name] if {$replace == ""} { lappend commandstring $name |
︙ |