Index: README ================================================================== --- README +++ README @@ -1,8 +1,8 @@ FILE: "/home/joze/src/tclreadline/README" - LAST MODIFICATION: "Mon Sep 20 00:59:50 1999 (joze)" + LAST MODIFICATION: "Tue Sep 21 21:21:36 1999 (joze)" (C) 1998, 1999 by Johannes Zellner, $Id$ --- tclreadline -- gnu readline for tcl @@ -74,10 +74,18 @@ does the rest. 4. History and Changes. ----------------------- + +tclreadline-1.0.1: (Sep 1999) + + changes: + - tclreadline::readline bell. + Ring the terminal bell, obeying the setting + of bell-style -- audible or visible. + tclreadline-1.0.0: (Sep 1999) note: - the script completer procs are written. Index: configure.in ================================================================== --- configure.in +++ configure.in @@ -1,8 +1,8 @@ # -*- autoconf -*- -# FILE: "/disk01/home/joze/src/tclreadline/configure.in" -# LAST MODIFICATION: "Mon Sep 20 18:16:22 1999 (joze)" +# FILE: "/home/joze/src/tclreadline/configure.in" +# LAST MODIFICATION: "Tue Sep 21 21:12:23 1999 (joze)" # (C) 1998, 1999 by Johannes Zellner, # $Id$ # --- # # tclreadline -- gnu readline for tcl @@ -36,11 +36,11 @@ AC_INIT(tclreadline.c) AC_CONFIG_HEADER(config.h) TCLREADLINE_MAJOR_VERSION=1 TCLREADLINE_MINOR_VERSION=0 -TCLREADLINE_PATCHLEVEL=0 +TCLREADLINE_PATCHLEVEL=1 TCLREADLINE_VERSION=$TCLREADLINE_MAJOR_VERSION.$TCLREADLINE_MINOR_VERSION TCLREADLINE_PATCHLEVEL_STR=${TCLREADLINE_VERSION}.${TCLREADLINE_PATCHLEVEL} VERSION=$TCLREADLINE_VERSION Index: tclreadline.c ================================================================== --- tclreadline.c +++ tclreadline.c @@ -1,10 +1,10 @@ /* ================================================================== - FILE: "/disk01/home/joze/src/tclreadline/tclreadline.c" - LAST MODIFICATION: "Mon Sep 20 02:20:33 1999 (joze)" + FILE: "/home/joze/src/tclreadline/tclreadline.c" + LAST MODIFICATION: "Tue Sep 21 21:19:35 1999 (joze)" (C) 1998, 1999 by Johannes Zellner, $Id$ --- tclreadline -- gnu readline for tcl @@ -195,17 +195,17 @@ Tcl_Obj** objv = (Tcl_Obj**) MALLOC((argc + 1) * sizeof(Tcl_Obj *)); static char *subCmds[] = { "read", "initialize", "write", "add", "complete", "customcompleter", "builtincompleter", "eofchar", - "reset-terminal", + "reset-terminal", "bell", (char *) NULL }; enum SubCmdIdx { TCLRL_READ, TCLRL_INITIALIZE, TCLRL_WRITE, TCLRL_ADD, TCLRL_COMPLETE, TCLRL_CUSTOMCOMPLETER, TCLRL_BUILTINCOMPLETER, TCLRL_EOFCHAR, - TCLRL_RESET_TERMINAL + TCLRL_RESET_TERMINAL, TCLRL_BELL }; Tcl_ResetResult(interp); /* clear the result space */ @@ -396,10 +396,18 @@ } else { rl_cleanup_after_signal(); #endif } break; + + case TCLRL_BELL: + /* + * ring the terminal bell obeying the current + * settings -- audible or visible. + */ + ding(); + break; default: goto BAD_COMMAND; /* NOTREACHED */ break; Index: tclreadline.n.in ================================================================== --- tclreadline.n.in +++ tclreadline.n.in @@ -1,10 +1,10 @@ .TH tclreadline n "@TCLREADLINE_VERSION@.@TCLREADLINE_PATCHLEVEL@" "Johannes Zellner" .\" (C) 1999 by Johannes Zellner .\" FILE: "/home/joze/src/tclreadline/tclreadline.n.in" -.\" LAST MODIFICATION: "Sun Sep 19 21:24:19 1999 (joze)" +.\" LAST MODIFICATION: "Tue Sep 21 21:18:31 1999 (joze)" .\" (C) 1998, 1999 by Johannes Zellner, .\" $Id$ .\" --- .\" .\" tclreadline -- gnu readline for the tcl scripting language @@ -182,10 +182,17 @@ .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. +The form w/o argument might not work if tclreadline was compiled +with an older version of libreadline. + +.TP 5 +\fB::tclreadline::readline bell\fP +Ring the terminal bell, obeying the setting of bell-style +-- audible or visible. .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 Index: tclreadlineCompleter.tcl ================================================================== --- tclreadlineCompleter.tcl +++ tclreadlineCompleter.tcl @@ -1,8 +1,8 @@ # -*- tclsh -*- # FILE: "/home/joze/src/tclreadline/tclreadlineCompleter.tcl" -# LAST MODIFICATION: "Sun Sep 19 22:09:08 1999 (joze)" +# LAST MODIFICATION: "Tue Sep 21 21:19:07 1999 (joze)" # (C) 1998, 1999 by Johannes Zellner, # $Id$ # --- # # tclreadline -- gnu readline for tcl @@ -766,12 +766,11 @@ return [string trim ${new}] } proc Alert {} { - puts -nonewline \a - flush stdout + ::tclreadline::readline bell } #** # get the longest common completion # e.g. str == {tcl_version tclreadline_version tclreadline_library} @@ -3482,12 +3481,12 @@ 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 - customcompleter builtincompleter eofchar reset-terminal}] + read initialize write add complete customcompleter + builtincompleter eofchar reset-terminal bell}] } 2 { switch -- ${cmd} { read {} initialize {}