📄 release.notes
字号:
This file lists major changes which accompany each new release.Version 1.4.0: The contents of the history list can now be saved and restored with the new gl_save_history() and gl_load_history() functions. Event handlers can now be registered to watch for and respond to I/O on arbitrary file descriptors while gl_get_line() is waiting for terminal input from the user. See the gl_get_line(3) man page for details on gl_watch_fd(). As an optional alternative to getting configuration information only from ~/.teclarc, the new gl_configure_getline() function allows configuration commands to be taken from any of, a string, a specified application-specific file, and/or a specified user-specific file. See the gl_get_line(3) man page for details. The version number of the library can now be queried using the libtecla_version() function. See the libtecla(3) man page. The new gl_group_history() function allows applications to group different types of input line in the history buffer, and arrange for only members of the appropriate group to be recalled on a given call to gl_get_line(). See the gl_get_line(3) man page. The new gl_show_history() function displays the current history list to a given stdio output stream. See the gl_get_line(3) man page. new_GetLine() now allows you to specify a history buffer size of zero, thus requesting that no history buffer be allocated. You can subsequently resize or delete the history buffer at any time, by calling gl_resize_history(), limit the number of lines that are allowed in the buffer by calling gl_limit_history(), clear either all history lines from the history list, or just the history lines that are associated with the current history group, by calling gl_clear_history, and toggle the history mechanism on and off by calling gl_toggle_history(). The new gl_terminal_size() function can be used to query the current terminal size. It can also be used to supply a default terminal size on systems where no mechanism is available for looking up the size. The contents and configuration of the history list can now be obtained by the calling application, by calling the new gl_lookup_history(), gl_state_of_history(), gl_range_of_history() and gl_size_of_history() functions. See the gl_get_line(3) man page. Echoing of the input line as it is typed, can now be turned on and off via the new gl_echo_mode() function. While echoing is disabled, newly entered input lines are omitted from the history list. See the gl_get_line(3) man page. While the default remains to display the prompt string literally, the new gl_prompt_style() function can be used to enable text attribute formatting directives in prompt strings, such as underlining, bold font, and highlighting directives. Signal handling in gl_get_line() is now customizable. The default signal handling behavior remains essentially the same, except that the SIGTSTP, SIGTTIN and SIGTTOU are now forwarded to the corresponding signal handler of the calling program, instead of causing a SIGSTOP to be sent to the application. It is now possible to remove signals from the list that are trapped by gl_get_line(), as well as add new signals to this list. The signal and terminal environments in which the signal handler of the calling program is invoked, and what gl_get_line() does after the signal handler returns, is now customizable on a per signal basis. You can now also query the last signal that was caught by gl_get_line(). This is useful when gl_get_line() aborts with errno=EINTR, and you need to know which signal caused it to abort. Key-sequences bound to action functions can now start with printable characters. Previously only keysequences starting with control or meta characters were permitted. gl_get_line() is now 8-bit clean. If the calling program has correctly called setlocale(LC_CTYPE,""), then the user can select an alternate locale by setting the standard LC_CTYPE, LC_ALL, or LANG environment variables, and international characters can then be entered directly, either by using a non-US keyboard, or by using a compose key on a standard US keyboard. Note that in locales in which meta characters become printable, meta characters no longer match M-c bindings, which then have to be entered using their escape-c equivalents. Fortunately most modern terminal emulators either output the escape-c version by default when the meta key is used, or can be configured to do so (see the gl_get_line(3) man page), so in most cases you can continue to use the meta key. Completion callback functions can now tell gl_get_line() to return the input line immediately after a successful tab completion, simply by setting the last character of the optional continuation suffix to a newline character (ie. in the call to cpl_add_completion()). It is now safe to create and use multiple GetLine objects, albeit still only from a single thread. In conjunction with the new gl_configure_getline() function, this optionally allows multiple GetLine objects with different bindings to be used to implement different input modes. The edit-mode configuration command now accepts the argument, none. This tells gl_get_line() to revert to using just the native line editing facilities provided by the terminal driver. This could be used if the termcap or terminfo entry of the host terminal were badly corrupted. Application callback functions invoked by gl_get_line() can now change the displayed prompt using the gl_replace_prompt() function. Their is now an optional program distributed with the library. This is a beta release of a program which adds tecla command-line editing to virtually any third party application without the application needing to be linked to the library. See the enhance(3) man page for further details. Although built and installed by default, the INSTALL document explains how to prevent this. The INSTALL document now explains how you can stop the demo programs from being built and installed. NetBSD/termcap fixes. Mike MacFaden reported two problems that he saw when compiling libtecla under NetBSD. Both cases were related to the use of termcap. Most systems use terminfo, so this problem has gone unnoticed until now, and won't have affected the grand majority of users. The configure script had a bug which prevented the check for CPP working properly, and getline.c wouldn't compile due to an undeclared variable when USE_TERMCAP was defined. Both problems have now been fixed. Note that if you successfully compiled version 1.3.3, this problem didn't affect you. An unfortunate and undocumented binding of the key-sequence M-O was shadowing the arrow-key bindings on systems that use ^[OA etc. I have removed this binding (the documented lower case M-o binding remains bound). Under the KDE konsole terminal this was causing the arrow keys to do something other than expected. There was a bug in the history list code which could result in strange entries appearing at the start of the history list once enough history lines had been added to the list to cause the circular history buffer to wrap. This is now fixed. Version 1.3.3: Signal handling has been re-written, and documentation of its behaviour has been added to the gl_get_line(3) man page. In addition to eliminating race conditions, and appropriately setting errno for those signals that abort gl_get_line(), many more signals are now intercepted, making it less likely that the terminal will be left in raw mode by a signal that isn't trapped by gl_get_line(). A bug was also fixed that was leaving the terminal in raw mode if the editing mode was changed interactively between vi and emacs. This was only noticeable when running programs from old shells that don't reset terminal modes.Version 1.3.2: Tim Eliseo contributed a number of improvements to vi mode, including a fuller set of vi key-bindings, implementation of the vi constraint that the cursor can't backup past the point at which input mode was entered, and restoration of overwritten characters when backspacing in overwrite mode. There are also now new bindings to allow users to toggle between vi and emacs modes interactively. The terminal bell is now used in some circumstances, such as when an unrecognized key sequence is entered. This can be turned off by the new nobeep option in the tecla configuration file. Unrelated to the above, a problem under Linux which prevented ^Q from being used to resume terminal output after the user had pressed ^S, has been fixed.Version 1.3.1: In vi mode a bug was preventing the history-search-backward and history-search-forward actions from doing anything when invoked on
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -