From d49a9082c0e15bba8cd3d8cc0a994409cf823cac Mon Sep 17 00:00:00 2001
From: Chet Ramey
Date: Thu, 15 Sep 2016 17:02:15 -0400
Subject: [PATCH] Readline-7.0 distribution sources and documentation
---
CHANGELOG | 82 +
CHANGES | 185 +
INSTALL | 2 +-
MANIFEST | 2 +
Makefile.in | 15 +-
NEWS | 236 +
README | 2 +-
aclocal.m4 | 8 +-
bind.c | 218 +-
callback.c | 79 +-
chardefs.h | 18 +-
colors.c | 56 +-
colors.h | 10 +-
complete.c | 182 +-
config.h.in | 38 +-
configure | 415 +-
configure.ac | 31 +-
display.c | 430 +-
doc/Makefile.in | 18 +-
doc/history.0 | 501 +-
doc/history.3 | 22 +-
doc/history.dvi | Bin 85108 -> 69092 bytes
doc/history.html | 19 +-
doc/history.info | 707 +-
doc/history.pdf | Bin 88219 -> 201610 bytes
doc/history.ps | 5283 +++++++--------
doc/history.texi | 2 +-
doc/history_3.ps | 546 +-
doc/hstech.texi | 15 +-
doc/hsuser.texi | 19 +-
doc/readline.0 | 1061 +--
doc/readline.3 | 111 +-
doc/readline.dvi | Bin 314656 -> 310188 bytes
doc/readline.html | 1808 +++---
doc/readline.info | 3105 ++++-----
doc/readline.pdf | Bin 210088 -> 389589 bytes
doc/readline.ps | 12077 ++++++++++++++++++-----------------
doc/readline_3.ps | 1994 +++---
doc/rlman.texi | 2 +-
doc/rltech.texi | 103 +-
doc/rluser.texi | 123 +-
doc/rluserman.dvi | Bin 105200 -> 109432 bytes
doc/rluserman.html | 515 +-
doc/rluserman.info | 1416 ++--
doc/rluserman.pdf | Bin 105809 -> 226783 bytes
doc/rluserman.ps | 3168 ++++-----
doc/rluserman.texi | 2 +-
doc/texi2dvi | 2336 +++++--
doc/texinfo.tex | 2068 ++++--
doc/version.texi | 12 +-
examples/Makefile.in | 35 +-
examples/fileman.c | 18 +
examples/hist_erasedups.c | 2 -
examples/hist_purgecmd.c | 2 -
examples/rl-callbacktest.c | 32 +-
examples/rl.c | 1 +
examples/rlbasic.c | 29 +
examples/rlptytest.c | 8 +
examples/rlversion.c | 1 +
funmap.c | 9 +-
histexpand.c | 48 +-
histfile.c | 295 +-
histlib.h | 3 -
history.c | 54 +-
history.h | 18 +-
input.c | 67 +-
isearch.c | 25 +-
kill.c | 106 +-
macro.c | 4 +-
mbutil.c | 4 +-
misc.c | 8 +-
parens.c | 28 +-
patchlevel | 2 +-
posixjmp.h | 22 +-
readline.c | 127 +-
readline.h | 50 +-
readline.pc.in | 12 +
rlconf.h | 14 +-
rlmbutil.h | 46 +-
rlprivate.h | 35 +-
rltty.c | 57 +-
search.c | 11 +-
shlib/Makefile.in | 10 +-
signals.c | 39 +-
tcap.h | 4 +-
terminal.c | 9 +-
text.c | 85 +-
tilde.c | 10 +-
undo.c | 11 +-
util.c | 65 +-
vi_keymap.c | 6 +-
vi_mode.c | 172 +-
92 files changed, 22642 insertions(+), 17984 deletions(-)
create mode 100644 examples/rlbasic.c
create mode 100644 readline.pc.in
diff --git a/CHANGELOG b/CHANGELOG
index c7c3077..6794591 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1222,3 +1222,85 @@ support/shobj-conf
minor one. The idea is that the minor versions should all be API/ABI
compatible, and it is better to link automatically with the latest
one. Idea from Max Horn
+
+ 2/26/2014
+ ---------
+[readline-6.3 released]
+
+ 3/14
+ ----
+shlib/Makefile.in
+ - fix typo in dependency list for vi_mode.so: it should not depend on
+ just $(topdir). Report and fix from Natanael Copa
+
+
+ 4/15
+ ----
+{.,shlib,examples}/Makefile.in
+ - make sure $(INCLUDES) appears before $(CPPFLAGS) in the various
+ CFLAGS assignments so readline looks in its own source and build
+ directories (INCLUDES) before some directories specified by the
+ user or builder (CPPFLAGS). Report and fix from Max Horn
+
+
+ 6/2
+ ---
+config.h.in
+ - use correct symbols: HAVE_STRUCT_DIRENT_D_INO, HAVE_STRUCT_DIRENT_D_FILENO
+ HAVE_STRUCT_DIRENT_D_NAMLEN. They don't really matter, but they are
+ what posixdir.h looks for. Report from Ross Burton
+
+ 6/11
+ ----
+readline.pc.in
+ - new file, config file for pkgconfig. Patch to add from Jirka Klimes
+
+
+{MANIFEST,configure.ac,Makefile.in}
+ - readline.pc: changes to create file for pkgconfig
+
+ 10/13
+ -----
+doc/Makefile.in
+ - readline.pdf, history.pdf, rluserman.pdf: use texi2dvi --pdf to generate
+ these. Suggestion from Siep Kroonenberg
+
+ 11/29
+ -----
+config.h.in
+ - HAVE_PSELECT: define if pselect(2) available
+
+configure.ac
+ - check for pselect(2), define HAVE_PSELECT if found
+
+ 12/29
+ -----
+configure.ac
+ - bump version number up to 6.4
+
+ 1/6/2015
+ --------
+configure.ac,config.h.in
+ - look for ncurses/termcap.h, define HAVE_NCURSES_TERMCAP_H
+
+ 4/20
+ ----
+configure.ac
+ - add template definitions set by AC_USE_SYSTEM_EXTENSIONS from a report
+ from Andreas Schwab
+
+ 4/24
+ ----
+configure.ac,config.h.in
+ - add check for sys/ioctl.h to AC_CHECK_HEADERS, define HAVE_SYS_IOCTL_H
+ if found
+
+ 5/29
+ ----
+configure.ac
+ - bump library version to 7.0 because of addition of rl_callback_sigcleanup
+
+ 8/26
+ ----
+configure.ac,Makefile.in,examples/Makefile.in
+ - remove references to purify
diff --git a/CHANGES b/CHANGES
index 337275d..b5e16b7 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,188 @@
+This document details the changes between this version, readline-7.0, and the
+previous version, readline-6.3.
+
+1. Changes to Readline
+
+a. A bug that caused vi-mode `.' to be unable to redo `c', `d', and `y'
+ commands with modifiers was fixed.
+
+b. Fixed a bug that caused callback mode to dump core when reading a
+ multiple-key sequence (e.g., arrow keys).
+
+c. Fixed a bug that caused the redisplay code to erase some of the line when
+ using horizontal scrolling with incremental search.
+
+d. Readline's input handler now performs signal processing if read(2) is
+ interrupted by SIGALRM or SIGVTALRM.
+
+e. Fixed a problem with revert-all-at-newline freeing freed memory.
+
+f. Clarified the documentation for the history_quotes_inhibit_expansion
+ variable to note that it inhibits scanning for the history comment
+ character and that it only affects double-quoted strings.
+
+g. Fixed an off-by-one error in the prompt printed when performing searches.
+
+h. Use pselect(2), if available, to wait for input before calling read(2), so
+ a SIGWINCH can interrupt it, since it doesn't interrupt read(2).
+
+i. Some memory leaks caused by signals interrupting filename completion have
+ been fixed.
+
+j. Reading EOF twice on a non-empty line causes EOF to be returned, rather
+ than the partial line. This can cause partial lines to be executed on
+ SIGHUP, for example.
+
+k. Fixed a bug concerning deleting multibyte characters from the search
+ string while performing an incremental search.
+
+l. Fixed a bug with tilde expanding directory names in filename completion.
+
+m. Fixed a bug that did not allow binding sequences beginning with a `\'.
+
+n. Fixed a redisplay bug involving incorrect line wrapping when the prompt
+ contains a multibyte character in the last screen column.
+
+o. Fixed a bug that caused history expansion to disregard characters that are
+ documented to delimit a history event specifier without requiring `:'.
+
+p. Fixed a bug that could cause reading past the end of a string when reading
+ the value when binding the set of isearch terminators.
+
+q. Fixed a bug that caused readline commands that depend on knowing which
+ key invoked them to misbehave when dispatching key sequences that are
+ prefixes of other key bindings.
+
+r. Paren matching now works in vi insert mode.
+
+s. Colored completion prefixes are now displayed using a different color, less
+ likely to collide with files.
+
+t. Fixed a bug that caused vi-mode character search to misbehave when
+ running in callback mode.
+
+u. Fixed a bug that caused output to be delayed when input is coming from a
+ macro in vi-mode.
+
+v. Fixed a bug that caused the vi-mode `.' command to misbehave when redoing
+ a multi-key key sequence via a macro.
+
+w. Fixed a bug that caused problems with applications that supply their own
+ input function when performing completion.
+
+x. When read returns -1/EIO when attempting to read a key, return an error
+ instead of line termination back to the caller.
+
+y. Updated tty auditing feature based on patch from Red Hat.
+
+z. Fixed a bug that could cause the history library to crash on overflows
+ introduced by malicious editing of timestamps in the history file.
+
+aa. The history file writing functions only attempt to create and use a backup
+ history file if the history file exists and is a regular file.
+
+bb. Fixed an out-of-bounds read in readline's internal tilde expansion interface.
+
+cc. Fixed several redisplay bugs with prompt strings containing multibyte
+ and non-visible characters whose physical length is longer than the screen
+ width.
+
+dd. Fixed a redisplay bug with prompt strings containing invisible characters
+ whose physical length exceeds the screen width and using incremental search.
+
+ee. Readline prints more descriptive error messages when it encounters errors
+ while reading an inputrc file.
+
+ff. Fixed a bug in the character insertion code that attempts to optimize
+ typeahead when it reads a character that is not bound to self-insert and
+ resets the key sequence state.
+
+gg. When refreshing the line as the result of a key sequence, Readline attempts
+ to redraw only the last line of a multiline prompt.
+
+hh. Fixed an issue that caused completion of git commands to display
+ incorrectly when using colored-completion-prefix.
+
+ii. Fixed several redisplay bugs having to do with multibyte characters and
+ invisible characters in prompt strings.
+
+jj. Fixed a bug that caused mode strings to be displayed incorrectly if the
+ prompt was shorter than the mode string.
+
+2. New Features in Readline
+
+a. The history truncation code now uses the same error recovery mechansim as
+ the history writing code, and restores the old version of the history file
+ on error. The error recovery mechanism handles symlinked history files.
+
+b. There is a new bindable variable, `enable-bracketed-paste', which enables
+ support for a terminal's bracketed paste mode.
+
+c. The editing mode indicators can now be strings and are user-settable
+ (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string'
+ variables). Mode strings can contain invisible character sequences.
+ Setting mode strings to null strings restores the defaults.
+
+d. Prompt expansion adds the mode string to the last line of a multi-line
+ prompt (one with embedded newlines).
+
+e. There is a new bindable variable, `colored-completion-prefix', which, if
+ set, causes the common prefix of a set of possible completions to be
+ displayed in color.
+
+f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
+ mode yank-pop.
+
+g. The redisplay code underwent several efficiency improvements for multibyte
+ locales.
+
+h. The insert-char function attempts to batch-insert all pending typeahead
+ that maps to self-insert, as long as it is coming from the terminal.
+
+i. rl_callback_sigcleanup: a new application function that can clean up and
+ unset any state set by readline's callback mode. Intended to be used
+ after a signal.
+
+j. If an incremental search string has its last character removed with DEL, the
+ resulting empty search string no longer matches the previous line.
+
+k. If readline reads a history file that begins with `#' (or the value of
+ the history comment character) and has enabled history timestamps, the history
+ entries are assumed to be delimited by timestamps. This allows multi-line
+ history entries.
+
+l. Readline now throws an error if it parses a key binding without a terminating
+ `:' or whitespace.
+
+m. The default binding for ^W in vi mode now uses word boundaries specified
+ by Posix (vi-unix-word-rubout is bindable command name).
+
+n. rl_clear_visible_line: new application-callable function; clears all
+ screen lines occupied by the current visible readline line.
+
+o. rl_tty_set_echoing: application-callable function that controls whether
+ or not readline thinks it is echoing terminal output.
+
+p. Handle >| and strings of digits preceding and following redirection
+ specifications as single tokens when tokenizing the line for history
+ expansion.
+
+q. Fixed a bug with displaying completions when the prefix display length
+ is greater than the length of the completions to be displayed.
+
+r. The :p history modifier now applies to the entire line, so any expansion
+ specifying :p causes the line to be printed instead of expanded.
+
+s. New application-callable function: rl_pending_signal(): returns the signal
+ number of any signal readline has caught but not yet handled.
+
+t. New application-settable variable: rl_persistent_signal_handlers: if set
+ to a non-zero value, readline will enable the readline-6.2 signal handler
+ behavior in callback mode: handlers are installed when
+ rl_callback_handler_install is called and removed removed when a complete
+ line has been read.
+
+-------------------------------------------------------------------------------
This document details the changes between this version, readline-6.3, and the
previous version, readline-6.2.
diff --git a/INSTALL b/INSTALL
index 7e67623..e1a92d3 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,7 @@
Basic Installation
==================
-These are installation instructions for Readline-6.3.
+These are installation instructions for Readline-7.0.
The simplest way to compile readline is:
diff --git a/MANIFEST b/MANIFEST
index ec98f19..bfd0547 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -20,6 +20,7 @@ config.h.in f
configure f
configure.ac f
Makefile.in f
+readline.pc.in f
ansi_stdlib.h f
chardefs.h f
colors.h f
@@ -114,6 +115,7 @@ examples/fileman.c f
examples/manexamp.c f
examples/readlinebuf.h f
examples/rl-fgets.c f
+examples/rlbasic.c f
examples/rlcat.c f
examples/rlevent.c f
examples/rltest.c f
diff --git a/Makefile.in b/Makefile.in
index c0a0f1c..6522573 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -45,8 +45,6 @@ RM = rm -f
CP = cp
MV = mv
-PURIFY = @PURIFY@
-
@SET_MAKE@
SHELL = @MAKE_SHELL@
@@ -87,7 +85,7 @@ TERMCAP_LIB = @TERMCAP_LIB@
# For libraries which include headers from other libraries.
INCLUDES = -I. -I$(srcdir)
-XCCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES)
+XCCFLAGS = $(DEFS) $(LOCAL_DEFS) $(INCLUDES) $(CPPFLAGS)
CCFLAGS = $(XCCFLAGS) $(LOCAL_CFLAGS) $(CFLAGS)
# could add -Werror here
@@ -116,7 +114,7 @@ CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
$(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \
$(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c \
$(srcdir)/text.c $(srcdir)/misc.c $(srcdir)/compat.c \
- $(srcdir)/mbutil.c $(srcdir)/xfree.c
+ $(srcdir)/mbutil.c
# The header files for this library.
HSOURCES = $(srcdir)/readline.h $(srcdir)/rldefs.h $(srcdir)/chardefs.h \
@@ -145,7 +143,7 @@ DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
CREATED_MAKEFILES = Makefile doc/Makefile examples/Makefile shlib/Makefile
CREATED_CONFIGURE = config.status config.h config.cache config.log \
- stamp-config stamp-h
+ stamp-config stamp-h readline.pc
CREATED_TAGS = TAGS tags
INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \
@@ -304,6 +302,9 @@ distclean maintainer-clean: clean
$(RM) $(CREATED_CONFIGURE)
$(RM) $(CREATED_TAGS)
+readline.pc: config.status $(srcdir)/readline.pc.in
+ $(SHELL) config.status
+
info dvi html pdf ps:
-( cd doc && $(MAKE) $(MFLAGS) $@ )
@@ -334,7 +335,8 @@ bind.o: history.h
callback.o: rlconf.h
callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
callback.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
-compat.o: rlstdc.h
+compat.o: ${BUILD_DIR}/config.h
+compat.o: rlstdc.h rltypedefs.h
complete.o: ansi_stdlib.h posixdir.h posixstat.h
complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
complete.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
@@ -395,6 +397,7 @@ readline.o: posixstat.h ansi_stdlib.h posixjmp.h
rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
rltty.o: rltty.h
rltty.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
+savestring.o: ${BUILD_DIR}/config.h
search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
search.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
search.o: ansi_stdlib.h history.h rlstdc.h
diff --git a/NEWS b/NEWS
index ba5b581..cf7107e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,52 @@
+This is a terse description of the new features added to readline-7.0 since
+the release of readline-6.3.
+
+New Features in Readline
+
+a. The history truncation code now uses the same error recovery mechansim as
+ the history writing code, and restores the old version of the history file
+ on error. The error recovery mechanism handles symlinked history files.
+
+b. There is a new bindable variable, `enable-bracketed-paste', which enables
+ support for a terminal's bracketed paste mode.
+
+c. The editing mode indicators can now be strings and are user-settable
+ (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string'
+ variables). Mode strings can contain invisible character sequences.
+ Setting mode strings to null strings restores the defaults.
+
+d. Prompt expansion adds the mode string to the last line of a multi-line
+ prompt (one with embedded newlines).
+
+e. There is a new bindable variable, `colored-completion-prefix', which, if
+ set, causes the common prefix of a set of possible completions to be
+ displayed in color.
+
+f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
+ mode yank-pop.
+
+g. The redisplay code underwent several efficiency improvements for multibyte
+ locales.
+
+h. The insert-char function attempts to batch-insert all pending typeahead
+ that maps to self-insert, as long as it is coming from the terminal.
+
+i. rl_callback_sigcleanup: a new application function that can clean up and
+ unset any state set by readline's callback mode. Intended to be used
+ after a signal.
+
+j. If an incremental search string has its last character removed with DEL, the
+ resulting empty search string no longer matches the previous line.
+
+k. If readline reads a history file that begins with `#' (or the value of
+ the history comment character) and has enabled history timestamps, the history
+ entries are assumed to be delimited by timestamps. This allows multi-line
+ history entries.
+
+l. Readline now throws an error if it parses a key binding without a terminating
+ `:' or whitespace.
+
+-------------------------------------------------------------------------------
This is a terse description of the new features added to readline-6.3 since
the release of readline-6.2.
@@ -55,3 +104,190 @@ m. If the user-settable variable `history-size' is set to a value less than
n. New application-settable variable: rl_signal_event_hook; function that is
called when readline is reading terminal input and read(2) is interrupted
by a signal. Currently not called for SIGHUP or SIGTERM.
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to readline-6.1 since
+the release of readline-6.0.
+
+New Features in Readline
+
+a. New bindable function: menu-complete-backward.
+
+b. In the vi insertion keymap, C-n is now bound to menu-complete by default,
+ and C-p to menu-complete-backward.
+
+c. When in vi command mode, repeatedly hitting ESC now does nothing, even
+ when ESC introduces a bound key sequence. This is closer to how
+ historical vi behaves.
+
+d. New bindable function: skip-csi-sequence. Can be used as a default to
+ consume key sequences generated by keys like Home and End without having
+ to bind all keys.
+
+e. New application-settable function: rl_filename_rewrite_hook. Can be used
+ to rewite or modify filenames read from the file system before they are
+ compared to the word to be completed.
+
+f. New bindable variable: skip-completed-text, active when completing in the
+ middle of a word. If enabled, it means that characters in the completion
+ that match characters in the remainder of the word are "skipped" rather
+ than inserted into the line.
+
+g. The pre-readline-6.0 version of menu completion is available as
+ "old-menu-complete" for users who do not like the readline-6.0 version.
+
+h. New bindable variable: echo-control-characters. If enabled, and the
+ tty ECHOCTL bit is set, controls the echoing of characters corresponding
+ to keyboard-generated signals.
+
+i. New bindable variable: enable-meta-key. Controls whether or not readline
+ sends the smm/rmm sequences if the terminal indicates it has a meta key
+ that enables eight-bit characters.
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to readline-6.0 since
+the release of readline-5.2.
+
+New Features in Readline
+
+a. A new variable, rl_sort_completion_matches; allows applications to inhibit
+ match list sorting (but beware: some things don't work right if
+ applications do this).
+
+b. A new variable, rl_completion_invoking_key; allows applications to discover
+ the key that invoked rl_complete or rl_menu_complete.
+
+c. The functions rl_block_sigint and rl_release_sigint are now public and
+ available to calling applications who want to protect critical sections
+ (like redisplay).
+
+d. The functions rl_save_state and rl_restore_state are now public and
+ available to calling applications; documented rest of readline's state
+ flag values.
+
+e. A new user-settable variable, `history-size', allows setting the maximum
+ number of entries in the history list.
+
+f. There is a new implementation of menu completion, with several improvements
+ over the old; the most notable improvement is a better `completions
+ browsing' mode.
+
+g. The menu completion code now uses the rl_menu_completion_entry_function
+ variable, allowing applications to provide their own menu completion
+ generators.
+
+h. There is support for replacing a prefix of a pathname with a `...' when
+ displaying possible completions. This is controllable by setting the
+ `completion-prefix-display-length' variable. Matches with a common prefix
+ longer than this value have the common prefix replaced with `...'.
+
+i. There is a new `revert-all-at-newline' variable. If enabled, readline will
+ undo all outstanding changes to all history lines when `accept-line' is
+ executed.
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to readline-5.2 since
+the release of readline-5.1.
+
+New Features in Readline
+
+a. Calling applications can now set the keyboard timeout to 0, allowing
+ poll-like behavior.
+
+b. The value of SYS_INPUTRC (configurable at compilation time) is now used as
+ the default last-ditch startup file.
+
+c. The history file reading functions now allow windows-like \r\n line
+ terminators.
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to readline-5.1 since
+the release of readline-5.0.
+
+New Features in Readline
+
+a. The key sequence sent by the keypad `delete' key is now automatically
+ bound to delete-char.
+
+b. A negative argument to menu-complete now cycles backward through the
+ completion list.
+
+c. A new bindable readline variable: bind-tty-special-chars. If non-zero,
+ readline will bind the terminal special characters to their readline
+ equivalents when it's called (on by default).
+
+d. New bindable command: vi-rubout. Saves deleted text for possible
+ reinsertion, as with any vi-mode `text modification' command; `X' is bound
+ to this in vi command mode.
+
+e. If the rl_completion_query_items is set to a value < 0, readline never
+ asks the user whether or not to view the possible completions.
+
+f. New application-callable auxiliary function, rl_variable_value, returns
+ a string corresponding to a readline variable's value.
+
+g. When parsing inputrc files and variable binding commands, the parser
+ strips trailing whitespace from values assigned to boolean variables
+ before checking them.
+
+h. A new external application-controllable variable that allows the LINES
+ and COLUMNS environment variables to set the window size regardless of
+ what the kernel returns.
+
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to readline-5.0 since
+the release of readline-4.3.
+
+New Features in Readline
+
+a. History expansion has a new `a' modifier equivalent to the `g' modifier
+ for compatibility with the BSD csh.
+
+b. History expansion has a new `G' modifier equivalent to the BSD csh `g'
+ modifier, which performs a substitution once per word.
+
+c. All non-incremental search operations may now undo the operation of
+ replacing the current line with the history line.
+
+d. The text inserted by an `a' command in vi mode can be reinserted with
+ `.'.
+
+e. New bindable variable, `show-all-if-unmodified'. If set, the readline
+ completer will list possible completions immediately if there is more
+ than one completion and partial completion cannot be performed.
+
+f. There is a new application-callable `free_history_entry()' function.
+
+g. History list entries now contain timestamp information; the history file
+ functions know how to read and write timestamp information associated
+ with each entry.
+
+h. Four new key binding functions have been added:
+
+ rl_bind_key_if_unbound()
+ rl_bind_key_if_unbound_in_map()
+ rl_bind_keyseq_if_unbound()
+ rl_bind_keyseq_if_unbound_in_map()
+
+i. New application variable, rl_completion_quote_character, set to any
+ quote character readline finds before it calls the application completion
+ function.
+
+j. New application variable, rl_completion_suppress_quote, settable by an
+ application completion function. If set to non-zero, readline does not
+ attempt to append a closing quote to a completed word.
+
+k. New application variable, rl_completion_found_quote, set to a non-zero
+ value if readline determines that the word to be completed is quoted.
+ Set before readline calls any application completion function.
+
+l. New function hook, rl_completion_word_break_hook, called when readline
+ needs to break a line into words when completion is attempted. Allows
+ the word break characters to vary based on position in the line.
+
+m. New bindable command: unix-filename-rubout. Does the same thing as
+ unix-word-rubout, but adds `/' to the set of word delimiters.
+
+n. When listing completions, directories have a `/' appended if the
+ `mark-directories' option has been enabled.
diff --git a/README b/README
index 8395c34..6a9c2b9 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
Introduction
============
-This is the Gnu Readline library, version 6.3.
+This is the Gnu Readline library, version 7.0.
The Readline library provides a set of functions for use by applications
that allow users to edit command lines as they are typed in. Both
diff --git a/aclocal.m4 b/aclocal.m4
index a947272..d3bac07 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1692,6 +1692,8 @@ AC_CHECK_HEADERS(wctype.h)
AC_CHECK_HEADERS(wchar.h)
AC_CHECK_HEADERS(langinfo.h)
+AC_CHECK_HEADERS(mbstr.h)
+
AC_CHECK_FUNC(mbrlen, AC_DEFINE(HAVE_MBRLEN))
AC_CHECK_FUNC(mbscasecmp, AC_DEFINE(HAVE_MBSCMP))
AC_CHECK_FUNC(mbscmp, AC_DEFINE(HAVE_MBSCMP))
@@ -1784,14 +1786,14 @@ char **v;
exit (w == 0); /* exit 0 if wcwidth broken */
}
],
-bash_cv_wcwidth_broken=yes, bash_cv_wcwdith_broken=no, bash_cv_wcwidth_broken=no)])
+bash_cv_wcwidth_broken=yes, bash_cv_wcwidth_broken=no, bash_cv_wcwidth_broken=no)])
if test "$bash_cv_wcwidth_broken" = yes; then
AC_DEFINE(WCWIDTH_BROKEN, 1, [wcwidth is usually not broken])
fi
if test "$am_cv_func_iconv" = yes; then
OLDLIBS="$LIBS"
- LIBS="$LIBS $LIBICONV"
+ LIBS="$LIBS $LIBINTL $LIBICONV"
AC_CHECK_FUNCS(locale_charset)
LIBS="$OLDLIBS"
fi
@@ -1854,7 +1856,7 @@ main()
],
ac_cv_rl_version=`cat conftest.rlv`,
ac_cv_rl_version='0.0',
-ac_cv_rl_version='4.2')])
+ac_cv_rl_version='6.3')])
CFLAGS="$_save_CFLAGS"
LDFLAGS="$_save_LDFLAGS"
diff --git a/bind.c b/bind.c
index 8acf4ac..f1098c4 100644
--- a/bind.c
+++ b/bind.c
@@ -1,6 +1,6 @@
/* bind.c -- key binding and startup file support for the readline library. */
-/* Copyright (C) 1987-2012 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2016 Free Software Foundation, Inc.
This file is part of the GNU Readline Library (Readline), a library
for reading lines of text with interactive input and history editing.
@@ -74,8 +74,13 @@ Keymap rl_binding_keymap;
static int _rl_skip_to_delim PARAMS((char *, int, int));
+#if defined (USE_VARARGS) && defined (PREFER_STDARG)
+static void _rl_init_file_error (const char *, ...) __attribute__((__format__ (printf, 1, 2)));
+#else
+static void _rl_init_file_error ();
+#endif
+
static char *_rl_read_file PARAMS((char *, size_t *));
-static void _rl_init_file_error PARAMS((const char *));
static int _rl_read_init_file PARAMS((const char *, int));
static int glean_key_from_name PARAMS((char *));
@@ -117,6 +122,9 @@ rl_bind_key (key, function)
int key;
rl_command_func_t *function;
{
+ char keyseq[3];
+ int l;
+
if (key < 0)
return (key);
@@ -135,8 +143,24 @@ rl_bind_key (key, function)
return (key);
}
- _rl_keymap[key].type = ISFUNC;
- _rl_keymap[key].function = function;
+ /* If it's bound to a function or macro, just overwrite. Otherwise we have
+ to treat it as a key sequence so rl_generic_bind handles shadow keymaps
+ for us. If we are binding '\' make sure to escape it so it makes it
+ through the call to rl_translate_keyseq. */
+ if (_rl_keymap[key].type != ISKMAP)
+ {
+ _rl_keymap[key].type = ISFUNC;
+ _rl_keymap[key].function = function;
+ }
+ else
+ {
+ l = 0;
+ if (key == '\\')
+ keyseq[l++] = '\\';
+ keyseq[l++] = key;
+ keyseq[l] = '\0';
+ rl_bind_keyseq (keyseq, function);
+ }
rl_binding_keymap = _rl_keymap;
return (0);
}
@@ -542,7 +566,7 @@ rl_translate_keyseq (seq, array, len)
case '0': case '1': case '2': case '3':
case '4': case '5': case '6': case '7':
i++;
- for (temp = 2, c -= '0'; ISOCTAL (seq[i]) && temp--; i++)
+ for (temp = 2, c -= '0'; ISOCTAL ((unsigned char)seq[i]) && temp--; i++)
c = (c * 8) + OCTVALUE (seq[i]);
i--; /* auto-increment in for loop */
array[l++] = c & largest_char;
@@ -970,14 +994,35 @@ _rl_read_init_file (filename, include_level)
}
static void
-_rl_init_file_error (msg)
- const char *msg;
+#if defined (PREFER_STDARG)
+_rl_init_file_error (const char *format, ...)
+#else
+_rl_init_file_error (va_alist)
+ va_dcl
+#endif
{
+ va_list args;
+#if defined (PREFER_VARARGS)
+ char *format;
+#endif
+
+#if defined (PREFER_STDARG)
+ va_start (args, format);
+#else
+ va_start (args);
+ format = va_arg (args, char *);
+#endif
+
+ fprintf (stderr, "readline: ");
if (currently_reading_init_file)
- _rl_errmsg ("%s: line %d: %s\n", current_readline_init_file,
- current_readline_init_lineno, msg);
- else
- _rl_errmsg ("%s", msg);
+ fprintf (stderr, "%s: line %d: ", current_readline_init_file,
+ current_readline_init_lineno);
+
+ vfprintf (stderr, format, args);
+ fprintf (stderr, "\n");
+ fflush (stderr);
+
+ va_end (args);
}
/* **************************************************************** */
@@ -1197,7 +1242,7 @@ handle_parser_directive (statement)
}
/* display an error message about the unknown parser directive */
- _rl_init_file_error ("unknown parser directive");
+ _rl_init_file_error ("%s: unknown parser directive", directive);
return (1);
}
@@ -1243,7 +1288,7 @@ rl_parse_and_bind (string)
{
char *funname, *kname;
register int c, i;
- int key, equivalency;
+ int key, equivalency, foundmod, foundsep;
while (string && whitespace (*string))
string++;
@@ -1273,7 +1318,7 @@ rl_parse_and_bind (string)
/* If we didn't find a closing quote, abort the line. */
if (string[i] == '\0')
{
- _rl_init_file_error ("no closing `\"' in key binding");
+ _rl_init_file_error ("%s: no closing `\"' in key binding", string);
return 1;
}
else
@@ -1285,6 +1330,8 @@ rl_parse_and_bind (string)
equivalency = (c == ':' && string[i + 1] == '=');
+ foundsep = c != 0;
+
/* Mark the end of the command (or keyname). */
if (string[i])
string[i++] = '\0';
@@ -1374,6 +1421,12 @@ remove_trailing:
return 0;
}
+ if (foundsep == 0)
+ {
+ _rl_init_file_error ("%s: no key sequence terminator", string);
+ return 1;
+ }
+
/* If this is a new-style key-binding, then do the binding with
rl_bind_keyseq (). Otherwise, let the older code deal with it. */
if (*string == '"')
@@ -1430,11 +1483,24 @@ remove_trailing:
key = glean_key_from_name (kname);
/* Add in control and meta bits. */
+ foundmod = 0;
if (substring_member_of_array (string, _rl_possible_control_prefixes))
- key = CTRL (_rl_to_upper (key));
+ {
+ key = CTRL (_rl_to_upper (key));
+ foundmod = 1;
+ }
if (substring_member_of_array (string, _rl_possible_meta_prefixes))
- key = META (key);
+ {
+ key = META (key);
+ foundmod = 1;
+ }
+
+ if (foundmod == 0 && kname != string)
+ {
+ _rl_init_file_error ("%s: unknown key modifier", string);
+ return 1;
+ }
/* Temporary. Handle old-style keyname with macro-binding. */
if (*funname == '\'' || *funname == '"')
@@ -1461,6 +1527,7 @@ remove_trailing:
#endif /* PREFIX_META_HACK */
else
rl_bind_key (key, rl_named_function (funname));
+
return 0;
}
@@ -1479,6 +1546,7 @@ static const struct {
{ "blink-matching-paren", &rl_blink_matching_paren, V_SPECIAL },
{ "byte-oriented", &rl_byte_oriented, 0 },
#if defined (COLOR_SUPPORT)
+ { "colored-completion-prefix",&_rl_colored_completion_prefix, 0 },
{ "colored-stats", &_rl_colored_stats, 0 },
#endif
{ "completion-ignore-case", &_rl_completion_case_fold, 0 },
@@ -1486,6 +1554,7 @@ static const struct {
{ "convert-meta", &_rl_convert_meta_chars_to_ascii, 0 },
{ "disable-completion", &rl_inhibit_completion, 0 },
{ "echo-control-characters", &_rl_echo_control_chars, 0 },
+ { "enable-bracketed-paste", &_rl_enable_bracketed_paste, 0 },
{ "enable-keypad", &_rl_enable_keypad, 0 },
{ "enable-meta-key", &_rl_enable_meta, 0 },
{ "expand-tilde", &rl_complete_with_tilde_expansion, 0 },
@@ -1569,10 +1638,13 @@ static int sv_dispprefix PARAMS((const char *));
static int sv_compquery PARAMS((const char *));
static int sv_compwidth PARAMS((const char *));
static int sv_editmode PARAMS((const char *));
+static int sv_emacs_modestr PARAMS((const char *));
static int sv_histsize PARAMS((const char *));
static int sv_isrchterm PARAMS((const char *));
static int sv_keymap PARAMS((const char *));
static int sv_seqtimeout PARAMS((const char *));
+static int sv_viins_modestr PARAMS((const char *));
+static int sv_vicmd_modestr PARAMS((const char *));
static const struct {
const char * const name;
@@ -1585,10 +1657,13 @@ static const struct {
{ "completion-prefix-display-length", V_INT, sv_dispprefix },
{ "completion-query-items", V_INT, sv_compquery },
{ "editing-mode", V_STRING, sv_editmode },
+ { "emacs-mode-string", V_STRING, sv_emacs_modestr },
{ "history-size", V_INT, sv_histsize },
{ "isearch-terminators", V_STRING, sv_isrchterm },
{ "keymap", V_STRING, sv_keymap },
{ "keyseq-timeout", V_INT, sv_seqtimeout },
+ { "vi-cmd-mode-string", V_STRING, sv_vicmd_modestr },
+ { "vi-ins-mode-string", V_STRING, sv_viins_modestr },
{ (char *)NULL, 0, (_rl_sv_func_t *)0 }
};
@@ -1605,7 +1680,7 @@ find_string_var (name)
}
/* A boolean value that can appear in a `set variable' command is true if
- the value is null or empty, `on' (case-insenstive), or "1". Any other
+ the value is null or empty, `on' (case-insensitive), or "1". Any other
values result in 0 (false). */
static int
bool_to_int (value)
@@ -1654,10 +1729,14 @@ rl_variable_bind (name, value)
i = find_string_var (name);
- /* For the time being, unknown variable names or string names without a
- handler function are simply ignored. */
+ /* For the time being, string names without a handler function are simply
+ ignored. */
if (i < 0 || string_varlist[i].set_func == 0)
- return 0;
+ {
+ if (i < 0)
+ _rl_init_file_error ("%s: unknown variable name", name);
+ return 0;
+ }
v = (*string_varlist[i].set_func) (value);
return v;
@@ -1832,7 +1911,7 @@ sv_isrchterm (value)
}
else
{
- for (beg = end = 0; whitespace (v[end]) == 0; end++)
+ for (beg = end = 0; v[end] && whitespace (v[end]) == 0; end++)
;
}
@@ -1846,7 +1925,96 @@ sv_isrchterm (value)
xfree (v);
return 0;
}
-
+
+extern char *_rl_emacs_mode_str;
+
+static int
+sv_emacs_modestr (value)
+ const char *value;
+{
+ if (value && *value)
+ {
+ FREE (_rl_emacs_mode_str);
+ _rl_emacs_mode_str = (char *)xmalloc (2 * strlen (value) + 1);
+ rl_translate_keyseq (value, _rl_emacs_mode_str, &_rl_emacs_modestr_len);
+ _rl_emacs_mode_str[_rl_emacs_modestr_len] = '\0';
+ return 0;
+ }
+ else if (value)
+ {
+ FREE (_rl_emacs_mode_str);
+ _rl_emacs_mode_str = (char *)xmalloc (1);
+ _rl_emacs_mode_str[_rl_emacs_modestr_len = 0] = '\0';
+ return 0;
+ }
+ else if (value == 0)
+ {
+ FREE (_rl_emacs_mode_str);
+ _rl_emacs_mode_str = 0; /* prompt_modestr does the right thing */
+ _rl_emacs_modestr_len = 0;
+ return 0;
+ }
+ return 1;
+}
+
+static int
+sv_viins_modestr (value)
+ const char *value;
+{
+ if (value && *value)
+ {
+ FREE (_rl_vi_ins_mode_str);
+ _rl_vi_ins_mode_str = (char *)xmalloc (2 * strlen (value) + 1);
+ rl_translate_keyseq (value, _rl_vi_ins_mode_str, &_rl_vi_ins_modestr_len);
+ _rl_vi_ins_mode_str[_rl_vi_ins_modestr_len] = '\0';
+ return 0;
+ }
+ else if (value)
+ {
+ FREE (_rl_vi_ins_mode_str);
+ _rl_vi_ins_mode_str = (char *)xmalloc (1);
+ _rl_vi_ins_mode_str[_rl_vi_ins_modestr_len = 0] = '\0';
+ return 0;
+ }
+ else if (value == 0)
+ {
+ FREE (_rl_vi_ins_mode_str);
+ _rl_vi_ins_mode_str = 0; /* prompt_modestr does the right thing */
+ _rl_vi_ins_modestr_len = 0;
+ return 0;
+ }
+ return 1;
+}
+
+static int
+sv_vicmd_modestr (value)
+ const char *value;
+{
+ if (value && *value)
+ {
+ FREE (_rl_vi_cmd_mode_str);
+ _rl_vi_cmd_mode_str = (char *)xmalloc (2 * strlen (value) + 1);
+ rl_translate_keyseq (value, _rl_vi_cmd_mode_str, &_rl_vi_cmd_modestr_len);
+ _rl_vi_cmd_mode_str[_rl_vi_cmd_modestr_len] = '\0';
+ return 0;
+ }
+ else if (value)
+ {
+ FREE (_rl_vi_cmd_mode_str);
+ _rl_vi_cmd_mode_str = (char *)xmalloc (1);
+ _rl_vi_cmd_mode_str[_rl_vi_cmd_modestr_len = 0] = '\0';
+ return 0;
+ }
+ else if (value == 0)
+ {
+ FREE (_rl_vi_cmd_mode_str);
+ _rl_vi_cmd_mode_str = 0; /* prompt_modestr does the right thing */
+ _rl_vi_cmd_modestr_len = 0;
+ return 0;
+ }
+ return 1;
+}
+
/* Return the character which matches NAME.
For example, `Space' returns ' '. */
@@ -2420,6 +2588,12 @@ _rl_get_string_variable_value (name)
sprintf (numbuf, "%d", _rl_keyseq_timeout);
return (numbuf);
}
+ else if (_rl_stricmp (name, "emacs-mode-string") == 0)
+ return (_rl_emacs_mode_str ? _rl_emacs_mode_str : RL_EMACS_MODESTR_DEFAULT);
+ else if (_rl_stricmp (name, "vi-cmd-mode-string") == 0)
+ return (_rl_vi_cmd_mode_str ? _rl_vi_cmd_mode_str : RL_VI_CMD_MODESTR_DEFAULT);
+ else if (_rl_stricmp (name, "vi-ins-mode-string") == 0)
+ return (_rl_vi_ins_mode_str ? _rl_vi_ins_mode_str : RL_VI_INS_MODESTR_DEFAULT);
else
return (0);
}
diff --git a/callback.c b/callback.c
index 6bb2c3e..cc3ce11 100644
--- a/callback.c
+++ b/callback.c
@@ -1,6 +1,6 @@
/* callback.c -- functions to use readline as an X `callback' mechanism. */
-/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2015 Free Software Foundation, Inc.
This file is part of the GNU Readline Library (Readline), a library
for reading lines of text with interactive input and history editing.
@@ -50,6 +50,14 @@
_rl_callback_func_t *_rl_callback_func = 0;
_rl_callback_generic_arg *_rl_callback_data = 0;
+/* Applications can set this to non-zero to have readline's signal handlers
+ installed during the entire duration of reading a complete line, as in
+ readline-6.2. This should be used with care, because it can result in
+ readline receiving signals and not handling them until it's called again
+ via rl_callback_read_char, thereby stealing them from the application.
+ By default, signal handlers are only active while readline is active. */
+int rl_persistent_signal_handlers = 0;
+
/* **************************************************************** */
/* */
/* Callback Readline Functions */
@@ -82,6 +90,11 @@ _rl_callback_newline ()
if (rl_prep_term_function)
(*rl_prep_term_function) (_rl_meta_flag);
+
+#if defined (HANDLE_SIGNALS)
+ if (rl_persistent_signal_handlers)
+ rl_set_signals ();
+#endif
}
readline_internal_setup ();
@@ -103,7 +116,8 @@ rl_callback_handler_install (prompt, linefunc)
#if defined (HANDLE_SIGNALS)
#define CALLBACK_READ_RETURN() \
do { \
- rl_clear_signals (); \
+ if (rl_persistent_signal_handlers == 0) \
+ rl_clear_signals (); \
return; \
} while (0)
#else
@@ -140,7 +154,8 @@ rl_callback_read_char ()
#if defined (HANDLE_SIGNALS)
/* Install signal handlers only when readline has control. */
- rl_set_signals ();
+ if (rl_persistent_signal_handlers == 0)
+ rl_set_signals ();
#endif
do
@@ -161,6 +176,36 @@ rl_callback_read_char ()
CALLBACK_READ_RETURN ();
}
#if defined (VI_MODE)
+ /* States that can occur while in state VIMOTION have to be checked
+ before RL_STATE_VIMOTION */
+ else if (RL_ISSTATE (RL_STATE_CHARSEARCH))
+ {
+ int k;
+
+ k = _rl_callback_data->i2;
+
+ eof = (*_rl_callback_func) (_rl_callback_data);
+ /* If the function `deregisters' itself, make sure the data is
+ cleaned up. */
+ if (_rl_callback_func == 0) /* XXX - just sanity check */
+ {
+ if (_rl_callback_data)
+ {
+ _rl_callback_data_dispose (_rl_callback_data);
+ _rl_callback_data = 0;
+ }
+ }
+
+ /* Messy case where vi motion command can be char search */
+ if (RL_ISSTATE (RL_STATE_VIMOTION))
+ {
+ _rl_vi_domove_motion_cleanup (k, _rl_vimvcxt);
+ _rl_internal_char_cleanup ();
+ CALLBACK_READ_RETURN ();
+ }
+
+ _rl_internal_char_cleanup ();
+ }
else if (RL_ISSTATE (RL_STATE_VIMOTION))
{
eof = _rl_vi_domove_callback (_rl_vimvcxt);
@@ -284,10 +329,36 @@ _rl_callback_data_alloc (count)
return arg;
}
-void _rl_callback_data_dispose (arg)
+void
+_rl_callback_data_dispose (arg)
_rl_callback_generic_arg *arg;
{
xfree (arg);
}
+/* Make sure that this agrees with cases in rl_callback_read_char */
+void
+rl_callback_sigcleanup ()
+{
+ if (RL_ISSTATE (RL_STATE_CALLBACK) == 0)
+ return;
+
+ if (RL_ISSTATE (RL_STATE_ISEARCH))
+ _rl_isearch_cleanup (_rl_iscxt, 0);
+ else if (RL_ISSTATE (RL_STATE_NSEARCH))
+ _rl_nsearch_cleanup (_rl_nscxt, 0);
+ else if (RL_ISSTATE (RL_STATE_VIMOTION))
+ RL_UNSETSTATE (RL_STATE_VIMOTION);
+ else if (RL_ISSTATE (RL_STATE_NUMERICARG))
+ {
+ _rl_argcxt = 0;
+ RL_UNSETSTATE (RL_STATE_NUMERICARG);
+ }
+ else if (RL_ISSTATE (RL_STATE_MULTIKEY))
+ RL_UNSETSTATE (RL_STATE_MULTIKEY);
+ if (RL_ISSTATE (RL_STATE_CHARSEARCH))
+ RL_UNSETSTATE (RL_STATE_CHARSEARCH);
+
+ _rl_callback_func = 0;
+}
#endif
diff --git a/chardefs.h b/chardefs.h
index 1fa1b08..3cf1326 100644
--- a/chardefs.h
+++ b/chardefs.h
@@ -1,6 +1,6 @@
/* chardefs.h -- Character definitions for readline. */
-/* Copyright (C) 1994-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2015 Free Software Foundation, Inc.
This file is part of the GNU Readline Library (Readline), a library
for reading lines of text with interactive input and history editing.
@@ -73,7 +73,7 @@
#endif
#if !defined (isxdigit) && !defined (HAVE_ISXDIGIT) && !defined (__cplusplus)
-# define isxdigit(c) (isdigit((c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
+# define isxdigit(c) (isdigit((unsigned char)(c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
#endif
#if defined (CTYPE_NON_ASCII)
@@ -87,13 +87,13 @@
/* Beware: these only work with single-byte ASCII characters. */
-#define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (c))
-#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c))
-#define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit (c))
-#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c))
-#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c))
-#define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c))
-#define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit (c))
+#define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum ((unsigned char)c))
+#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha ((unsigned char)c))
+#define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit ((unsigned char)c))
+#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower ((unsigned char)c))
+#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint ((unsigned char)c))
+#define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper ((unsigned char)c))
+#define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit ((unsigned char)c))
#define _rl_lowercase_p(c) (NON_NEGATIVE(c) && ISLOWER(c))
#define _rl_uppercase_p(c) (NON_NEGATIVE(c) && ISUPPER(c))
diff --git a/colors.c b/colors.c
index 89d9035..7859f5d 100644
--- a/colors.c
+++ b/colors.c
@@ -2,8 +2,8 @@
Modified by Chet Ramey for Readline.
- Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012 Free Software Foundation,
- Inc.
+ Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012, 2015
+ Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -98,9 +98,29 @@ _rl_set_normal_color (void)
}
}
+bool
+_rl_print_prefix_color (void)
+{
+ struct bin_str *s;
+
+ /* What do we want to use for the prefix? Let's try cyan first, see colors.h */
+ s = &_rl_color_indicator[C_PREFIX];
+ if (s->string != NULL)
+ {
+ if (is_colored (C_NORM))
+ restore_default_color ();
+ _rl_put_indicator (&_rl_color_indicator[C_LEFT]);
+ _rl_put_indicator (s);
+ _rl_put_indicator (&_rl_color_indicator[C_RIGHT]);
+ return 0;
+ }
+ else
+ return 1;
+}
+
/* Returns whether any color sequence was printed. */
bool
-_rl_print_color_indicator (char *f)
+_rl_print_color_indicator (const char *f)
{
enum indicator_no colored_filetype;
COLOR_EXT_TYPE *ext; /* Color extension */
@@ -108,10 +128,9 @@ _rl_print_color_indicator (char *f)
const char* name;
char *filename;
- struct stat astat;
+ struct stat astat, linkstat;
mode_t mode;
- int linkok;
-
+ int linkok; /* 1 == ok, 0 == dangling symlink, -1 == missing */
int stat_ok;
name = f;
@@ -130,10 +149,20 @@ _rl_print_color_indicator (char *f)
#else
stat_ok = stat(name, &astat);
#endif
- if( stat_ok == 0 ) {
- mode = astat.st_mode;
- linkok = 1; //f->linkok;
- }
+ if (stat_ok == 0)
+ {
+ mode = astat.st_mode;
+#if defined (HAVE_LSTAT)
+ if (S_ISLNK (mode))
+ {
+ linkok = stat (name, &linkstat) == 0;
+ if (linkok && strncmp (_rl_color_indicator[C_LINK].string, "target", 6) == 0)
+ mode = linkstat.st_mode;
+ }
+ else
+#endif
+ linkok = 1;
+ }
else
linkok = -1;
@@ -141,6 +170,8 @@ _rl_print_color_indicator (char *f)
if (linkok == -1 && _rl_color_indicator[C_MISSING].string != NULL)
colored_filetype = C_MISSING;
+ else if (linkok == 0 && S_ISLNK(mode) && _rl_color_indicator[C_ORPHAN].string != NULL)
+ colored_filetype = C_ORPHAN; /* dangling symlink */
else if(stat_ok != 0)
{
static enum indicator_no filetype_indicator[] = FILETYPE_INDICATORS;
@@ -181,10 +212,7 @@ _rl_print_color_indicator (char *f)
#endif
}
else if (S_ISLNK (mode))
- colored_filetype = ((linkok == 0
- && (!strncmp (_rl_color_indicator[C_LINK].string, "target", 6)
- || _rl_color_indicator[C_ORPHAN].string))
- ? C_ORPHAN : C_LINK);
+ colored_filetype = C_LINK;
else if (S_ISFIFO (mode))
colored_filetype = C_FIFO;
else if (S_ISSOCK (mode))
diff --git a/colors.h b/colors.h
index fc926e5..6561ad9 100644
--- a/colors.h
+++ b/colors.h
@@ -2,8 +2,8 @@
Modified by Chet Ramey for Readline.
- Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012 Free Software Foundation,
- Inc.
+ Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012, 2015
+ Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -114,9 +114,13 @@ enum filetype
arg_directory
};
+/* Prefix color, currently same as socket */
+#define C_PREFIX C_SOCK
+
extern void _rl_put_indicator (const struct bin_str *ind);
extern void _rl_set_normal_color (void);
-extern bool _rl_print_color_indicator (char *f);
+extern bool _rl_print_prefix_color (void);
+extern bool _rl_print_color_indicator (const char *f);
extern void _rl_prep_non_filename_text (void);
#endif /* !_COLORS_H_ */
diff --git a/complete.c b/complete.c
index cd9aebe..0a81129 100644
--- a/complete.c
+++ b/complete.c
@@ -1,6 +1,6 @@
/* complete.c -- filename completion for readline. */
-/* Copyright (C) 1987-2012 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2015 Free Software Foundation, Inc.
This file is part of the GNU Readline Library (Readline), a library
for reading lines of text with interactive input and history editing.
@@ -111,8 +111,10 @@ static int stat_char PARAMS((char *));
#endif
#if defined (COLOR_SUPPORT)
-static int colored_stat_start PARAMS((char *));
+static int colored_stat_start PARAMS((const char *));
static void colored_stat_end PARAMS((void));
+static int colored_prefix_start PARAMS((void));
+static void colored_prefix_end PARAMS((void));
#endif
static int path_isdir PARAMS((const char *));
@@ -126,7 +128,7 @@ static int get_y_or_n PARAMS((int));
static int _rl_internal_pager PARAMS((int));
static char *printable_part PARAMS((char *));
static int fnwidth PARAMS((const char *));
-static int fnprint PARAMS((const char *, int));
+static int fnprint PARAMS((const char *, int, const char *));
static int print_filename PARAMS((char *, char *, int));
static char **gen_completion_matches PARAMS((char *, int, int, rl_compentry_func_t *, int, int));
@@ -172,7 +174,7 @@ int _rl_complete_mark_symlink_dirs = 0;
int _rl_print_completions_horizontally;
/* Non-zero means that case is not significant in filename completion. */
-#if defined (__MSDOS__) && !defined (__DJGPP__)
+#if (defined (__MSDOS__) && !defined (__DJGPP__)) || (defined (_WIN32) && !defined (__CYGWIN__))
int _rl_completion_case_fold = 1;
#else
int _rl_completion_case_fold = 0;
@@ -209,6 +211,10 @@ int rl_visible_stats = 0;
/* Non-zero means to use colors to indicate file type when listing possible
completions. The colors used are taken from $LS_COLORS, if set. */
int _rl_colored_stats = 0;
+
+/* Non-zero means to use a color (currently magenta) to indicate the common
+ prefix of a set of possible word completions. */
+int _rl_colored_completion_prefix = 0;
#endif
/* If non-zero, when completing in the middle of a word, don't insert
@@ -404,6 +410,8 @@ static int completion_changed_buffer;
/* The result of the query to the user about displaying completion matches */
static int completion_y_or_n;
+static int _rl_complete_display_matches_interrupt = 0;
+
/*************************************/
/* */
/* Bindable completion functions */
@@ -487,7 +495,10 @@ _rl_complete_sigcleanup (sig, ptr)
void *ptr;
{
if (sig == SIGINT) /* XXX - for now */
- _rl_free_match_list ((char **)ptr);
+ {
+ _rl_free_match_list ((char **)ptr);
+ _rl_complete_display_matches_interrupt = 1;
+ }
}
/* Set default values for readline word completion. These are the variables
@@ -505,6 +516,9 @@ set_completion_defaults (what_to_do)
/* The completion entry function may optionally change this. */
rl_completion_mark_symlink_dirs = _rl_complete_mark_symlink_dirs;
+
+ /* Reset private state. */
+ _rl_complete_display_matches_interrupt = 0;
}
/* The user must press "y" or "n". Non-zero return means "y" pressed. */
@@ -638,11 +652,23 @@ stat_char (filename)
#endif
else if (S_ISREG (finfo.st_mode))
{
+#if defined (_WIN32) && !defined (__CYGWIN__)
+ char *ext;
+
+ /* Windows doesn't do access and X_OK; check file extension instead */
+ ext = strrchr (fn, '.');
+ if (ext && (_rl_stricmp (ext, ".exe") == 0 ||
+ _rl_stricmp (ext, ".cmd") == 0 ||
+ _rl_stricmp (ext, ".bat") == 0 ||
+ _rl_stricmp (ext, ".com") == 0))
+ character = '*';
+#else
if (access (filename, X_OK) == 0)
character = '*';
+#endif
}
- free (f);
+ xfree (f);
return (character);
}
#endif /* VISIBLE_STATS */
@@ -650,7 +676,7 @@ stat_char (filename)
#if defined (COLOR_SUPPORT)
static int
colored_stat_start (filename)
- char *filename;
+ const char *filename;
{
_rl_set_normal_color ();
return (_rl_print_color_indicator (filename));
@@ -662,6 +688,19 @@ colored_stat_end ()
_rl_prep_non_filename_text ();
_rl_put_indicator (&_rl_color_indicator[C_CLR_TO_EOL]);
}
+
+static int
+colored_prefix_start ()
+{
+ _rl_set_normal_color ();
+ return (_rl_print_prefix_color ());
+}
+
+static void
+colored_prefix_end ()
+{
+ colored_stat_end (); /* for now */
+}
#endif
/* Return the portion of PATHNAME that should be output when listing
@@ -682,13 +721,15 @@ printable_part (pathname)
return (pathname);
temp = strrchr (pathname, '/');
-#if defined (__MSDOS__)
+#if defined (__MSDOS__) || defined (_WIN32)
if (temp == 0 && ISALPHA ((unsigned char)pathname[0]) && pathname[1] == ':')
temp = pathname + 1;
#endif
if (temp == 0 || *temp == '\0')
return (pathname);
+ else if (temp[1] == 0 && temp == pathname)
+ return (pathname);
/* If the basename is NULL, we might have a pathname like '/usr/src/'.
Look for a previous slash and, if one is found, return the portion
following that slash. If there's no previous slash, just return the
@@ -759,12 +800,14 @@ fnwidth (string)
#define ELLIPSIS_LEN 3
static int
-fnprint (to_print, prefix_bytes)
+fnprint (to_print, prefix_bytes, real_pathname)
const char *to_print;
int prefix_bytes;
+ const char *real_pathname;
{
int printed_len, w;
const char *s;
+ int common_prefix_len, print_len;
#if defined (HANDLE_MULTIBYTE)
mbstate_t ps;
const char *end;
@@ -772,18 +815,26 @@ fnprint (to_print, prefix_bytes)
int width;
wchar_t wc;
- end = to_print + strlen (to_print) + 1;
+ print_len = strlen (to_print);
+ end = to_print + print_len + 1;
memset (&ps, 0, sizeof (mbstate_t));
#endif
- printed_len = 0;
+ printed_len = common_prefix_len = 0;
/* Don't print only the ellipsis if the common prefix is one of the
- possible completions */
- if (to_print[prefix_bytes] == '\0')
+ possible completions. Only cut off prefix_bytes if we're going to be
+ printing the ellipsis, which takes precedence over coloring the
+ completion prefix (see print_filename() below). */
+ if (_rl_completion_prefix_display_length > 0 && prefix_bytes >= print_len)
prefix_bytes = 0;
- if (prefix_bytes)
+#if defined (COLOR_SUPPORT)
+ if (_rl_colored_stats && (prefix_bytes == 0 || _rl_colored_completion_prefix <= 0))
+ colored_stat_start (real_pathname);
+#endif
+
+ if (prefix_bytes && _rl_completion_prefix_display_length > 0)
{
char ellipsis;
@@ -792,6 +843,15 @@ fnprint (to_print, prefix_bytes)
putc (ellipsis, rl_outstream);
printed_len = ELLIPSIS_LEN;
}
+#if defined (COLOR_SUPPORT)
+ else if (prefix_bytes && _rl_colored_completion_prefix > 0)
+ {
+ common_prefix_len = prefix_bytes;
+ prefix_bytes = 0;
+ /* XXX - print color indicator start here */
+ colored_prefix_start ();
+ }
+#endif
s = to_print + prefix_bytes;
while (*s)
@@ -842,8 +902,25 @@ fnprint (to_print, prefix_bytes)
printed_len++;
#endif
}
+ if (common_prefix_len > 0 && (s - to_print) >= common_prefix_len)
+ {
+#if defined (COLOR_SUPPORT)
+ /* printed bytes = s - to_print */
+ /* printed bytes should never be > but check for paranoia's sake */
+ colored_prefix_end ();
+ if (_rl_colored_stats)
+ colored_stat_start (real_pathname); /* XXX - experiment */
+#endif
+ common_prefix_len = 0;
+ }
}
+#if defined (COLOR_SUPPORT)
+ /* XXX - unconditional for now */
+ if (_rl_colored_stats)
+ colored_stat_end ();
+#endif
+
return printed_len;
}
@@ -864,7 +941,7 @@ print_filename (to_print, full_pathname, prefix_bytes)
/* Defer printing if we want to prefix with a color indicator */
if (_rl_colored_stats == 0 || rl_filename_completion_desired == 0)
#endif
- printed_len = fnprint (to_print, prefix_bytes);
+ printed_len = fnprint (to_print, prefix_bytes, to_print);
if (rl_filename_completion_desired && (
#if defined (VISIBLE_STATS)
@@ -926,20 +1003,17 @@ print_filename (to_print, full_pathname, prefix_bytes)
{
dn = savestring (new_full_pathname);
(*rl_filename_stat_hook) (&dn);
- free (new_full_pathname);
+ xfree (new_full_pathname);
new_full_pathname = dn;
}
if (path_isdir (new_full_pathname))
extension_char = '/';
}
+ /* Move colored-stats code inside fnprint() */
#if defined (COLOR_SUPPORT)
if (_rl_colored_stats)
- {
- colored_stat_start (new_full_pathname);
- printed_len = fnprint (to_print, prefix_bytes);
- colored_stat_end ();
- }
+ printed_len = fnprint (to_print, prefix_bytes, new_full_pathname);
#endif
xfree (new_full_pathname);
@@ -956,15 +1030,11 @@ print_filename (to_print, full_pathname, prefix_bytes)
if (_rl_complete_mark_directories && path_isdir (s))
extension_char = '/';
+ /* Move colored-stats code inside fnprint() */
#if defined (COLOR_SUPPORT)
if (_rl_colored_stats)
- {
- colored_stat_start (s);
- printed_len = fnprint (to_print, prefix_bytes);
- colored_stat_end ();
- }
+ printed_len = fnprint (to_print, prefix_bytes, s);
#endif
-
}
xfree (s);
@@ -1502,15 +1572,29 @@ rl_display_match_list (matches, len, max)
if (_rl_completion_prefix_display_length > 0)
{
t = printable_part (matches[0]);
- temp = strrchr (t, '/');
+ /* check again in case of /usr/src/ */
+ temp = rl_filename_completion_desired ? strrchr (t, '/') : 0;
common_length = temp ? fnwidth (temp) : fnwidth (t);
sind = temp ? strlen (temp) : strlen (t);
+ if (common_length > max || sind > max)
+ common_length = sind = 0;
if (common_length > _rl_completion_prefix_display_length && common_length > ELLIPSIS_LEN)
max -= common_length - ELLIPSIS_LEN;
else
common_length = sind = 0;
}
+#if defined (COLOR_SUPPORT)
+ else if (_rl_colored_completion_prefix > 0)
+ {
+ t = printable_part (matches[0]);
+ temp = rl_filename_completion_desired ? strrchr (t, '/') : 0;
+ common_length = temp ? fnwidth (temp) : fnwidth (t);
+ sind = temp ? RL_STRLEN (temp+1) : RL_STRLEN (t); /* want portion after final slash */
+ if (common_length > max || sind > max)
+ common_length = sind = 0;
+ }
+#endif
/* How many items of MAX length can we fit in the screen window? */
cols = complete_get_screenwidth ();
@@ -1557,12 +1641,23 @@ rl_display_match_list (matches, len, max)
printed_len = print_filename (temp, matches[l], sind);
if (j + 1 < limit)
- for (k = 0; k < max - printed_len; k++)
- putc (' ', rl_outstream);
+ {
+ if (max <= printed_len)
+ putc (' ', rl_outstream);
+ else
+ for (k = 0; k < max - printed_len; k++)
+ putc (' ', rl_outstream);
+ }
}
l += count;
}
rl_crlf ();
+#if defined (SIGWINCH)
+ if (RL_SIG_RECEIVED () && RL_SIGWINCH_RECEIVED() == 0)
+#else
+ if (RL_SIG_RECEIVED ())
+#endif
+ return;
lines++;
if (_rl_page_completions && lines >= (_rl_screenheight - 1) && i < count)
{
@@ -1580,6 +1675,12 @@ rl_display_match_list (matches, len, max)
temp = printable_part (matches[i]);
printed_len = print_filename (temp, matches[i], sind);
/* Have we reached the end of this line? */
+#if defined (SIGWINCH)
+ if (RL_SIG_RECEIVED () && RL_SIGWINCH_RECEIVED() == 0)
+#else
+ if (RL_SIG_RECEIVED ())
+#endif
+ return;
if (matches[i+1])
{
if (limit == 1 || (i && (limit > 1) && (i % limit) == 0))
@@ -1593,6 +1694,8 @@ rl_display_match_list (matches, len, max)
return;
}
}
+ else if (max <= printed_len)
+ putc (' ', rl_outstream);
else
for (k = 0; k < max - printed_len; k++)
putc (' ', rl_outstream);
@@ -2044,8 +2147,16 @@ rl_complete_internal (what_to_do)
{
_rl_sigcleanup = _rl_complete_sigcleanup;
_rl_sigcleanarg = matches;
+ _rl_complete_display_matches_interrupt = 0;
}
display_matches (matches);
+ if (_rl_complete_display_matches_interrupt)
+ {
+ matches = 0; /* already freed by rl_complete_sigcleanup */
+ _rl_complete_display_matches_interrupt = 0;
+ if (rl_signal_event_hook)
+ (*rl_signal_event_hook) (); /* XXX */
+ }
_rl_sigcleanup = 0;
_rl_sigcleanarg = 0;
break;
@@ -2071,6 +2182,8 @@ rl_complete_internal (what_to_do)
RL_UNSETSTATE(RL_STATE_COMPLETING);
_rl_reset_completion_state ();
+
+ RL_CHECK_SIGNALS ();
return 0;
}
@@ -2370,6 +2483,7 @@ rl_filename_completion_function (text, state)
static int filename_len;
char *temp, *dentry, *convfn;
int dirlen, dentlen, convlen;
+ int tilde_dirname;
struct dirent *entry;
/* If we don't have any state, then do some initialization. */
@@ -2393,7 +2507,7 @@ rl_filename_completion_function (text, state)
temp = strrchr (dirname, '/');
-#if defined (__MSDOS__)
+#if defined (__MSDOS__) || defined (_WIN32)
/* special hack for //X/... */
if (dirname[0] == '/' && dirname[1] == '/' && ISALPHA ((unsigned char)dirname[2]) && dirname[3] == '/')
temp = strrchr (dirname + 3, '/');
@@ -2404,7 +2518,7 @@ rl_filename_completion_function (text, state)
strcpy (filename, ++temp);
*temp = '\0';
}
-#if defined (__MSDOS__)
+#if defined (__MSDOS__) || (defined (_WIN32) && !defined (__CYGWIN__))
/* searches from current directory on the drive */
else if (ISALPHA ((unsigned char)dirname[0]) && dirname[1] == ':')
{
@@ -2427,11 +2541,13 @@ rl_filename_completion_function (text, state)
else
users_dirname = savestring (dirname);
+ tilde_dirname = 0;
if (*dirname == '~')
{
temp = tilde_expand (dirname);
xfree (dirname);
dirname = temp;
+ tilde_dirname = 1;
}
/* We have saved the possibly-dequoted version of the directory name
@@ -2450,7 +2566,7 @@ rl_filename_completion_function (text, state)
xfree (users_dirname);
users_dirname = savestring (dirname);
}
- else if (rl_completion_found_quote && rl_filename_dequoting_function)
+ else if (tilde_dirname == 0 && rl_completion_found_quote && rl_filename_dequoting_function)
{
/* delete single and double quotes */
xfree (dirname);
diff --git a/config.h.in b/config.h.in
index a67e43e..d03ebe0 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,14 +1,21 @@
/* config.h.in. Maintained by hand. */
+/* Template definitions for autoconf */
+#undef __EXTENSIONS__
+#undef _ALL_SOURCE
+#undef _GNU_SOURCE
+#undef _POSIX_SOURCE
+#undef _POSIX_1_SOURCE
+#undef _POSIX_PTHREAD_SEMANTICS
+#undef _TANDEM_SOURCE
+#undef _MINIX
+
/* Define NO_MULTIBYTE_SUPPORT to not compile in support for multibyte
characters, even if the OS supports them. */
#undef NO_MULTIBYTE_SUPPORT
#undef _FILE_OFFSET_BITS
-/* Define if on MINIX. */
-#undef _MINIX
-
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
@@ -26,12 +33,16 @@
#undef volatile
#undef PROTOTYPES
+#undef __PROTOTYPES
#undef __CHAR_UNSIGNED__
/* Define if the `S_IS*' macros in do not work properly. */
#undef STAT_MACROS_BROKEN
+/* Define if you have the chown function. */
+#undef HAVE_CHOWN
+
/* Define if you have the fcntl function. */
#undef HAVE_FCNTL
@@ -77,9 +88,15 @@
/* Define if you have the memmove function. */
#undef HAVE_MEMMOVE
+/* Define if you have the pselect function. */
+#undef HAVE_PSELECT
+
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
+/* Define if you have the readlink function. */
+#undef HAVE_READLINK
+
/* Define if you have the select function. */
#undef HAVE_SELECT
@@ -138,6 +155,9 @@
/* Define if you have the header file. */
#undef HAVE_LANGINFO_H
+/* Define if you have the header file. */
+#undef HAVE_LIBAUDIT_H
+
/* Define if you have the header file. */
#undef HAVE_LIMITS_H
@@ -150,6 +170,9 @@
/* Define if you have the header file. */
#undef HAVE_NDIR_H
+/* Define if you have the header file. */
+#undef HAVE_NCURSES_TERMCAP_H
+
/* Define if you have the header file. */
#undef HAVE_PWD_H
@@ -174,6 +197,9 @@
/* Define if you have the header file. */
#undef HAVE_SYS_FILE_H
+/* Define if you have the header file. */
+#undef HAVE_SYS_IOCTL_H
+
/* Define if you have the header file. */
#undef HAVE_SYS_NDIR_H
@@ -244,9 +270,11 @@
#undef HAVE_GETPW_DECLS
-#undef STRUCT_DIRENT_HAS_D_INO
+#undef HAVE_STRUCT_DIRENT_D_INO
+
+#undef HAVE_STRUCT_DIRENT_D_FILENO
-#undef STRUCT_DIRENT_HAS_D_FILENO
+#undef HAVE_STRUCT_DIRENT_D_NAMLEN
#undef HAVE_BSD_SIGNALS
diff --git a/configure b/configure
index f11ee25..aa98bce 100755
--- a/configure
+++ b/configure
@@ -1,14 +1,12 @@
#! /bin/sh
-# From configure.ac for Readline 6.3, version 2.73.
+# From configure.ac for Readline 7.0, version 2.81.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for readline 6.3.
+# Generated by GNU Autoconf 2.69 for readline 7.0.
#
# Report bugs to .
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -137,6 +135,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -170,7 +193,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -215,21 +239,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -332,6 +360,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -453,6 +489,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -487,16 +527,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -508,28 +548,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -561,8 +581,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='readline'
PACKAGE_TARNAME='readline'
-PACKAGE_VERSION='6.3'
-PACKAGE_STRING='readline 6.3'
+PACKAGE_VERSION='7.0'
+PACKAGE_STRING='readline 7.0'
PACKAGE_BUGREPORT='bug-readline@gnu.org'
PACKAGE_URL=''
@@ -611,7 +631,6 @@ LOCAL_DEFS
LOCAL_LDFLAGS
LOCAL_CFLAGS
BUILD_DIR
-PURIFY
SHARED_INSTALL_TARGET
STATIC_INSTALL_TARGET
SHARED_TARGET
@@ -702,7 +721,6 @@ ac_subst_files=''
ac_user_opts='
enable_option_checking
with_curses
-with_purify
enable_multibyte
enable_shared
enable_static
@@ -1172,8 +1190,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1259,7 +1275,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures readline 6.3 to adapt to many kinds of systems.
+\`configure' configures readline 7.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1324,7 +1340,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of readline 6.3:";;
+ short | recursive ) echo "Configuration of readline 7.0:";;
esac
cat <<\_ACEOF
@@ -1342,7 +1358,6 @@ Optional Packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-curses use the curses library instead of the termcap
library
- --with-purify configure to postprocess with purify
Some influential environment variables:
CC C compiler command
@@ -1420,10 +1435,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-readline configure 6.3
-generated by GNU Autoconf 2.68
+readline configure 7.0
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1754,7 +1769,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -1889,8 +1904,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by readline $as_me 6.3, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+It was created by readline $as_me 7.0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2273,7 +2288,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
ac_config_headers="$ac_config_headers config.h"
-LIBVERSION=6.3
+LIBVERSION=7.0
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
@@ -2349,7 +2364,6 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
opt_curses=no
-opt_purify=no
# Check whether --with-curses was given.
@@ -2358,22 +2372,10 @@ if test "${with_curses+set}" = set; then :
fi
-# Check whether --with-purify was given.
-if test "${with_purify+set}" = set; then :
- withval=$with_purify; opt_purify=$withval
-fi
-
-
if test "$opt_curses" = "yes"; then
prefer_curses=yes
fi
-if test "$opt_purify" = yes; then
- PURIFY="purify"
-else
- PURIFY=
-fi
-
opt_multibyte=yes
opt_static_libs=yes
opt_shared_libs=yes
@@ -2485,7 +2487,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2525,7 +2527,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2578,7 +2580,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2619,7 +2621,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -2677,7 +2679,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2721,7 +2723,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3167,8 +3169,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include
-#include
-#include
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -3408,7 +3409,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -3474,7 +3475,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -3681,8 +3682,8 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-# define __EXTENSIONS__ 1
- $ac_includes_default
+# define __EXTENSIONS__ 1
+ $ac_includes_default
int
main ()
{
@@ -3796,7 +3797,7 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -3869,7 +3870,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3909,7 +3910,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3962,7 +3963,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4002,7 +4003,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4052,11 +4053,11 @@ else
int
main ()
{
-/* FIXME: Include the comments suggested by Paul. */
+
#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
+ /* Ultrix mips cc rejects this sort of thing. */
typedef int charset[2];
- const charset cs;
+ const charset cs = { 0, 0 };
/* SunOS 4.1.1 cc rejects this. */
char const *const *pcpcc;
char **ppc;
@@ -4073,8 +4074,9 @@ main ()
++pcpcc;
ppc = (char**) pcpcc;
pcpcc = (char const *const *) ppc;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
+ { /* SCO 3.2v4 cc rejects this sort of thing. */
+ char tx;
+ char *t = &tx;
char const *s = 0 ? (char *) 0 : (char const *) 0;
*t++ = 0;
@@ -4090,10 +4092,10 @@ main ()
iptr p = 0;
++p;
}
- { /* AIX XL C 1.02.0.0 rejects this saying
+ { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
+ struct s { int j; const int *ap[3]; } bx;
+ struct s *b = &bx; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
const int foo = 10;
@@ -4149,7 +4151,8 @@ int
main ()
{
static int test_array [1 - 2 * !(((char) -1) < 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -4575,7 +4578,7 @@ fi
fi
-for ac_func in fcntl kill lstat
+for ac_func in fcntl kill lstat readlink
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -4587,7 +4590,7 @@ _ACEOF
fi
done
-for ac_func in memmove putenv select setenv setlocale \
+for ac_func in memmove pselect putenv select setenv setlocale \
strcasecmp strpbrk tcgetattr vsnprintf
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -4625,6 +4628,101 @@ fi
done
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if ${ac_cv_type_uid_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "uid_t" >/dev/null 2>&1; then :
+ ac_cv_type_uid_t=yes
+else
+ ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
+
+$as_echo "#define uid_t int" >>confdefs.h
+
+
+$as_echo "#define gid_t int" >>confdefs.h
+
+fi
+
+for ac_header in unistd.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_UNISTD_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
+$as_echo_n "checking for working chown... " >&6; }
+if ${ac_cv_func_chown_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_chown_works=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+#include
+
+int
+main ()
+{
+ char *f = "conftest.chown";
+ struct stat before, after;
+
+ if (creat (f, 0600) < 0)
+ return 1;
+ if (stat (f, &before) < 0)
+ return 1;
+ if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
+ return 1;
+ if (stat (f, &after) < 0)
+ return 1;
+ return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_chown_works=yes
+else
+ ac_cv_func_chown_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+rm -f conftest.chown
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
+$as_echo "$ac_cv_func_chown_works" >&6; }
+if test $ac_cv_func_chown_works = yes; then
+
+$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
+
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strcoll" >&5
$as_echo_n "checking for working strcoll... " >&6; }
if ${ac_cv_func_strcoll_works+:} false; then :
@@ -4680,7 +4778,7 @@ fi
done
-for ac_header in sys/pte.h sys/stream.h sys/select.h sys/file.h
+for ac_header in sys/ioctl.h sys/pte.h sys/stream.h sys/select.h sys/file.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -4908,6 +5006,8 @@ _ACEOF
esac
rm -rf conftest*
fi
+
+
fi
@@ -5762,6 +5862,18 @@ $as_echo "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h
fi
+for ac_header in libaudit.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default"
+if test "x$ac_cv_header_libaudit_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBAUDIT_H 1
+_ACEOF
+
+fi
+
+done
+
ac_fn_c_check_decl "$LINENO" "AUDIT_USER_TTY" "ac_cv_have_decl_AUDIT_USER_TTY" "#include
"
if test "x$ac_cv_have_decl_AUDIT_USER_TTY" = xyes; then :
@@ -5996,6 +6108,21 @@ if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then
TERMCAP_LIB=-ltermcap #default
fi
fi
+# Windows ncurses installation
+if test "$TERMCAP_LIB" = "-lncurses"; then
+ for ac_header in ncurses/termcap.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "ncurses/termcap.h" "ac_cv_header_ncurses_termcap_h" "$ac_includes_default"
+if test "x$ac_cv_header_ncurses_termcap_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_NCURSES_TERMCAP_H 1
+_ACEOF
+
+fi
+
+done
+
+fi
for ac_header in wctype.h
@@ -6035,6 +6162,19 @@ fi
done
+for ac_header in mbstr.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "mbstr.h" "ac_cv_header_mbstr_h" "$ac_includes_default"
+if test "x$ac_cv_header_mbstr_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_MBSTR_H 1
+_ACEOF
+
+fi
+
+done
+
+
ac_fn_c_check_func "$LINENO" "mbrlen" "ac_cv_func_mbrlen"
if test "x$ac_cv_func_mbrlen" = xyes; then :
$as_echo "#define HAVE_MBRLEN 1" >>confdefs.h
@@ -6322,10 +6462,7 @@ if ${bash_cv_wcwidth_broken+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
+ bash_cv_wcwidth_broken=no
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6352,7 +6489,7 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"; then :
bash_cv_wcwidth_broken=yes
else
- bash_cv_wcwdith_broken=no
+ bash_cv_wcwidth_broken=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -6369,7 +6506,7 @@ fi
if test "$am_cv_func_iconv" = yes; then
OLDLIBS="$LIBS"
- LIBS="$LIBS $LIBICONV"
+ LIBS="$LIBS $LIBINTL $LIBICONV"
for ac_func in locale_charset
do :
ac_fn_c_check_func "$LINENO" "locale_charset" "ac_cv_func_locale_charset"
@@ -6483,8 +6620,7 @@ esac
-
-ac_config_files="$ac_config_files Makefile doc/Makefile examples/Makefile shlib/Makefile"
+ac_config_files="$ac_config_files Makefile doc/Makefile examples/Makefile shlib/Makefile readline.pc"
ac_config_commands="$ac_config_commands default"
@@ -6895,16 +7031,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -6964,28 +7100,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -7006,8 +7130,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by readline $as_me 6.3, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+This file was extended by readline $as_me 7.0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -7072,11 +7196,11 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-readline config.status 6.3
-configured by $0, generated by GNU Autoconf 2.68,
+readline config.status 7.0
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -7165,7 +7289,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
@@ -7199,6 +7323,7 @@ do
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
"shlib/Makefile") CONFIG_FILES="$CONFIG_FILES shlib/Makefile" ;;
+ "readline.pc") CONFIG_FILES="$CONFIG_FILES readline.pc" ;;
"default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
diff --git a/configure.ac b/configure.ac
index cea8f91..f81809b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ dnl report bugs to chet@po.cwru.edu
dnl
dnl Process this file with autoconf to produce a configure script.
-# Copyright (C) 1987-2014 Free Software Foundation, Inc.
+# Copyright (C) 1987-2016 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,9 +20,9 @@ dnl Process this file with autoconf to produce a configure script.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
-AC_REVISION([for Readline 6.3, version 2.73])
+AC_REVISION([for Readline 7.0, version 2.81])
-AC_INIT(readline, 6.3, bug-readline@gnu.org)
+AC_INIT(readline, 7.0, bug-readline@gnu.org)
dnl make sure we are using a recent autoconf version
AC_PREREQ(2.50)
@@ -32,29 +32,21 @@ AC_CONFIG_AUX_DIR(./support)
AC_CONFIG_HEADERS(config.h)
dnl update the value of RL_READLINE_VERSION in readline.h when this changes
-LIBVERSION=6.3
+LIBVERSION=7.0
AC_CANONICAL_HOST
AC_CANONICAL_BUILD
dnl configure defaults
opt_curses=no
-opt_purify=no
dnl arguments to configure
AC_ARG_WITH(curses, AC_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval)
-AC_ARG_WITH(purify, AC_HELP_STRING([--with-purify], [configure to postprocess with purify]), opt_purify=$withval)
if test "$opt_curses" = "yes"; then
prefer_curses=yes
fi
-if test "$opt_purify" = yes; then
- PURIFY="purify"
-else
- PURIFY=
-fi
-
dnl option parsing for optional features
opt_multibyte=yes
opt_static_libs=yes
@@ -139,18 +131,19 @@ AC_HEADER_STDC
AC_HEADER_STAT
AC_HEADER_DIRENT
-AC_CHECK_FUNCS(fcntl kill lstat)
-AC_CHECK_FUNCS(memmove putenv select setenv setlocale \
+AC_CHECK_FUNCS(fcntl kill lstat readlink)
+AC_CHECK_FUNCS(memmove pselect putenv select setenv setlocale \
strcasecmp strpbrk tcgetattr vsnprintf)
AC_CHECK_FUNCS(isascii isxdigit)
AC_CHECK_FUNCS(getpwent getpwnam getpwuid)
+AC_FUNC_CHOWN
AC_FUNC_STRCOLL
AC_CHECK_HEADERS(fcntl.h unistd.h stdlib.h varargs.h stdarg.h stdbool.h \
string.h strings.h \
limits.h locale.h pwd.h memory.h termcap.h termios.h termio.h)
-AC_CHECK_HEADERS(sys/pte.h sys/stream.h sys/select.h sys/file.h)
+AC_CHECK_HEADERS(sys/ioctl.h sys/pte.h sys/stream.h sys/select.h sys/file.h)
AC_CHECK_HEADERS(sys/ptem.h,,,
[[
@@ -183,6 +176,7 @@ BASH_STRUCT_WINSIZE
BASH_STRUCT_DIRENT_D_INO
BASH_STRUCT_DIRENT_D_FILENO
+AC_CHECK_HEADERS(libaudit.h)
AC_CHECK_DECLS([AUDIT_USER_TTY],,, [[#include ]])
dnl yuck
@@ -197,6 +191,10 @@ if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then
TERMCAP_LIB=-ltermcap #default
fi
fi
+# Windows ncurses installation
+if test "$TERMCAP_LIB" = "-lncurses"; then
+ AC_CHECK_HEADERS(ncurses/termcap.h)
+fi
BASH_CHECK_MULTIBYTE
@@ -278,7 +276,6 @@ case "$BUILD_DIR" in
*) ;;
esac
-AC_SUBST(PURIFY)
AC_SUBST(BUILD_DIR)
AC_SUBST(CFLAGS)
@@ -296,7 +293,7 @@ AC_SUBST(LIBVERSION)
AC_SUBST(TERMCAP_LIB)
-AC_OUTPUT([Makefile doc/Makefile examples/Makefile shlib/Makefile],
+AC_OUTPUT([Makefile doc/Makefile examples/Makefile shlib/Makefile readline.pc],
[
# Makefile uses this timestamp file to record whether config.h is up to date.
echo > stamp-h
diff --git a/display.c b/display.c
index 4df1f73..41fb053 100644
--- a/display.c
+++ b/display.c
@@ -1,6 +1,6 @@
/* display.c -- readline redisplay facility. */
-/* Copyright (C) 1987-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2015 Free Software Foundation, Inc.
This file is part of the GNU Readline Library (Readline), a library
for reading lines of text with interactive input and history editing.
@@ -69,6 +69,12 @@ static void delete_chars PARAMS((int));
static void insert_some_chars PARAMS((char *, int, int));
static void open_some_spaces PARAMS((int));
static void cr PARAMS((void));
+static void redraw_prompt PARAMS((char *));
+
+/* Values for FLAGS */
+#define PMT_MULTILINE 0x01
+
+static char *expand_prompt PARAMS((char *, int, int *, int *, int *, int *));
/* State of visible and invisible lines. */
struct line_state
@@ -77,8 +83,8 @@ struct line_state
int *lbreaks;
int lbsize;
#if defined (HANDLE_MULTIBYTE)
- int *wrapped_line;
int wbsize;
+ int *wrapped_line;
#endif
};
@@ -113,6 +119,8 @@ static int _rl_col_width PARAMS((const char *, int, int, int));
buffer index in others. This macro is used when deciding whether the
current cursor position is in the middle of a prompt string containing
invisible characters. XXX - might need to take `modmark' into account. */
+/* XXX - only valid when tested against _rl_last_c_pos; buffer indices need
+ to use prompt_last_invisible directly. */
#define PROMPT_ENDING_INDEX \
((MB_CUR_MAX > 1 && rl_byte_oriented == 0) ? prompt_physical_chars : prompt_last_invisible+1)
@@ -158,6 +166,16 @@ int _rl_want_redisplay = 0;
This is usually pointing to rl_prompt. */
char *rl_display_prompt = (char *)NULL;
+/* Variables used to include the editing mode in the prompt. */
+char *_rl_emacs_mode_str;
+int _rl_emacs_modestr_len;
+
+char *_rl_vi_ins_mode_str;
+int _rl_vi_ins_modestr_len;
+
+char *_rl_vi_cmd_mode_str;
+int _rl_vi_cmd_modestr_len;
+
/* Pseudo-global variables declared here. */
/* The visible cursor position. If you print some text, adjust this. */
@@ -176,6 +194,8 @@ static int prompt_multibyte_chars;
/* Number of lines currently on screen minus 1. */
int _rl_vis_botlin = 0;
+static int _rl_inv_botlin = 0;
+
/* Variables used only in this file. */
/* The last left edge of text that was displayed. This is used when
doing horizontal scrolling. It shifts in thirds of a screenwidth. */
@@ -239,16 +259,30 @@ static int saved_local_length;
static int saved_invis_chars_first_line;
static int saved_physical_chars;
-/* Return a character indicating the editing mode, for use in the prompt. */
-static int
-prompt_modechar ()
+/* Return a string indicating the editing mode, for use in the prompt. */
+
+static char *
+prompt_modestr (lenp)
+ int *lenp;
{
if (rl_editing_mode == emacs_mode)
- return '@';
+ {
+ if (lenp)
+ *lenp = _rl_emacs_mode_str ? _rl_emacs_modestr_len : RL_EMACS_MODESTR_DEFLEN;
+ return _rl_emacs_mode_str ? _rl_emacs_mode_str : RL_EMACS_MODESTR_DEFAULT;
+ }
else if (_rl_keymap == vi_insertion_keymap)
- return '+'; /* vi insert mode */
+ {
+ if (lenp)
+ *lenp = _rl_vi_ins_mode_str ? _rl_vi_ins_modestr_len : RL_VI_INS_MODESTR_DEFLEN;
+ return _rl_vi_ins_mode_str ? _rl_vi_ins_mode_str : RL_VI_INS_MODESTR_DEFAULT; /* vi insert mode */
+ }
else
- return ':'; /* vi command mode */
+ {
+ if (lenp)
+ *lenp = _rl_vi_cmd_mode_str ? _rl_vi_cmd_modestr_len : RL_VI_CMD_MODESTR_DEFLEN;
+ return _rl_vi_cmd_mode_str ? _rl_vi_cmd_mode_str : RL_VI_CMD_MODESTR_DEFAULT; /* vi command mode */
+ }
}
/* Expand the prompt string S and return the number of visible
@@ -266,26 +300,37 @@ prompt_modechar ()
the returned string; all characters except those between \001 and
\002 are assumed to be `visible'. */
+/* Possible values for FLAGS:
+ PMT_MULTILINE caller indicates that this is part of a multiline prompt
+*/
+
static char *
-expand_prompt (pmt, lp, lip, niflp, vlp)
+expand_prompt (pmt, flags, lp, lip, niflp, vlp)
char *pmt;
+ int flags;
int *lp, *lip, *niflp, *vlp;
{
- char *r, *ret, *p, *igstart;
+ char *r, *ret, *p, *igstart, *nprompt, *ms;
int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars;
+ int mlen;
+
+ /* We only expand the mode string for the last line of a multiline prompt
+ (a prompt with embedded newlines). */
+ ms = (((pmt == rl_prompt) ^ (flags & PMT_MULTILINE)) && _rl_show_mode_in_prompt) ? prompt_modestr (&mlen) : 0;
+ if (ms)
+ {
+ l = strlen (pmt);
+ nprompt = (char *)xmalloc (l + mlen + 1);
+ memcpy (nprompt, ms, mlen);
+ strcpy (nprompt + mlen, pmt);
+ }
+ else
+ nprompt = pmt;
/* Short-circuit if we can. */
- if ((MB_CUR_MAX <= 1 || rl_byte_oriented) && strchr (pmt, RL_PROMPT_START_IGNORE) == 0)
- {
- if (pmt == rl_prompt && _rl_show_mode_in_prompt)
- {
- l = strlen (pmt);
- r = (char *)xmalloc (l + 2);
- r[0] = prompt_modechar ();
- strcpy (r + 1, pmt);
- }
- else
- r = savestring (pmt);
+ if ((MB_CUR_MAX <= 1 || rl_byte_oriented) && strchr (nprompt, RL_PROMPT_START_IGNORE) == 0)
+ {
+ r = (nprompt == pmt) ? savestring (pmt) : nprompt;
if (lp)
*lp = strlen (r);
@@ -298,21 +343,15 @@ expand_prompt (pmt, lp, lip, niflp, vlp)
return r;
}
- l = strlen (pmt);
- r = ret = (char *)xmalloc (l + 2);
-
- rl = physchars = 0; /* move up here so mode show can set them */
- if (pmt == rl_prompt && _rl_show_mode_in_prompt)
- {
- *r++ = prompt_modechar ();
- rl = physchars = 1;
- }
+ l = strlen (nprompt); /* XXX */
+ r = ret = (char *)xmalloc (l + 1);
+ rl = physchars = 0; /* mode string now part of nprompt */
invfl = 0; /* invisible chars in first line of prompt */
invflset = 0; /* we only want to set invfl once */
-
igstart = 0;
- for (ignoring = last = ninvis = 0, p = pmt; p && *p; p++)
+
+ for (ignoring = last = ninvis = 0, p = nprompt; p && *p; p++)
{
/* This code strips the invisible character string markers
RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE */
@@ -334,8 +373,8 @@ expand_prompt (pmt, lp, lip, niflp, vlp)
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
{
- pind = p - pmt;
- ind = _rl_find_next_mbchar (pmt, pind, 1, MB_FIND_NONZERO);
+ pind = p - nprompt;
+ ind = _rl_find_next_mbchar (nprompt, pind, 1, MB_FIND_NONZERO);
l = ind - pind;
while (l--)
*r++ = *p++;
@@ -347,7 +386,7 @@ expand_prompt (pmt, lp, lip, niflp, vlp)
not be the same as the number of physical characters
on the screen in the presence of multibyte characters */
rl += ind - pind;
- physchars += _rl_col_width (pmt, pind, ind, 0);
+ physchars += _rl_col_width (nprompt, pind, ind, 0);
}
else
ninvis += ind - pind;
@@ -386,6 +425,10 @@ expand_prompt (pmt, lp, lip, niflp, vlp)
*niflp = invfl;
if (vlp)
*vlp = physchars;
+
+ if (nprompt != pmt)
+ free (nprompt);
+
return ret;
}
@@ -397,7 +440,7 @@ _rl_strip_prompt (pmt)
{
char *ret;
- ret = expand_prompt (pmt, (int *)NULL, (int *)NULL, (int *)NULL, (int *)NULL);
+ ret = expand_prompt (pmt, 0, (int *)NULL, (int *)NULL, (int *)NULL, (int *)NULL);
return ret;
}
@@ -444,13 +487,13 @@ rl_expand_prompt (prompt)
return (0);
p = strrchr (prompt, '\n');
- if (!p)
+ if (p == 0)
{
/* The prompt is only one logical line, though it might wrap. */
- local_prompt = expand_prompt (prompt, &prompt_visible_length,
- &prompt_last_invisible,
- &prompt_invis_chars_first_line,
- &prompt_physical_chars);
+ local_prompt = expand_prompt (prompt, 0, &prompt_visible_length,
+ &prompt_last_invisible,
+ &prompt_invis_chars_first_line,
+ &prompt_physical_chars);
local_prompt_prefix = (char *)0;
local_prompt_len = local_prompt ? strlen (local_prompt) : 0;
return (prompt_visible_length);
@@ -459,14 +502,16 @@ rl_expand_prompt (prompt)
{
/* The prompt spans multiple lines. */
t = ++p;
- local_prompt = expand_prompt (p, &prompt_visible_length,
+ local_prompt = expand_prompt (p, PMT_MULTILINE,
+ &prompt_visible_length,
&prompt_last_invisible,
&prompt_invis_chars_first_line,
&prompt_physical_chars);
c = *t; *t = '\0';
/* The portion of the prompt string up to and including the
final newline is now null-terminated. */
- local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length,
+ local_prompt_prefix = expand_prompt (prompt, PMT_MULTILINE,
+ &prompt_prefix_length,
(int *)NULL,
(int *)NULL,
(int *)NULL);
@@ -539,6 +584,7 @@ rl_redisplay ()
int inv_botlin, lb_botlin, lb_linenum, o_cpos;
int newlines, lpos, temp, n0, num, prompt_lines_estimate;
char *prompt_this_line;
+ int mb_cur_max = MB_CUR_MAX;
#if defined (HANDLE_MULTIBYTE)
wchar_t wc;
size_t wc_bytes;
@@ -695,6 +741,8 @@ rl_redisplay ()
/* inv_lbreaks[i] is where line i starts in the buffer. */
inv_lbreaks[newlines = 0] = 0;
+ /* lpos is a physical cursor position, so it needs to be adjusted by the
+ number of invisible characters in the prompt, per line */
lpos = prompt_physical_chars + modmark;
#if defined (HANDLE_MULTIBYTE)
@@ -714,7 +762,17 @@ rl_redisplay ()
contents of the command line? */
while (lpos >= _rl_screenwidth)
{
- int z;
+ int z, p;
+ int nocorrect, wadjust;
+
+ nocorrect = 0;
+ /* Adjust depending on the invisible characters in the line. We use a
+ heuristic based on experience: invisible characters nearly always
+ appear in the first and last lines of the prompt */
+ wadjust = (newlines == 0)
+ ? prompt_invis_chars_first_line
+ : ((newlines == prompt_lines_estimate) ? wrap_offset : prompt_invis_chars_first_line);
+
/* fix from Darin Johnson for prompt string with
invisible characters that is longer than the screen width. The
prompt_invis_chars_first_line variable could be made into an array
@@ -723,20 +781,31 @@ rl_redisplay ()
prompts that exceed two physical lines?
Additional logic fix from Edward Catmur */
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0 && prompt_multibyte_chars > 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0 && prompt_multibyte_chars > 0)
{
+ nocorrect = 1;
n0 = num;
temp = local_prompt_len;
while (num < temp)
{
- z = _rl_col_width (local_prompt, n0, num, 1);
+ /* This has to take invisible characters in the prompt into
+ account. */
+ z = _rl_col_width (local_prompt, n0, num, 1) - wadjust;
if (z > _rl_screenwidth)
{
num = _rl_find_prev_mbchar (local_prompt, num, MB_FIND_ANY);
break;
}
else if (z == _rl_screenwidth)
- break;
+ {
+ /* If we are in the middle or at the end of a multibyte
+ character, we want to move to the start, then find out
+ where it ends so we know where to insert the newline.
+ If this isn't a multibyte character, its the same as num++ */
+ p = _rl_find_prev_mbchar (local_prompt, num, MB_FIND_ANY);
+ num = _rl_find_next_mbchar (local_prompt, p, 1, MB_FIND_ANY);
+ break;
+ }
num++;
}
temp = num;
@@ -748,16 +817,18 @@ rl_redisplay ()
/* Now account for invisible characters in the current line. */
/* XXX - this assumes that the invisible characters may be split, but only
between the first and the last lines. */
- temp += (newlines == 0) ? prompt_invis_chars_first_line
- : ((newlines == prompt_lines_estimate) ? wrap_offset : prompt_invis_chars_first_line);
+ if (nocorrect == 0)
+ temp += wadjust;
inv_lbreaks[++newlines] = temp;
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0 && prompt_multibyte_chars > 0)
- lpos -= _rl_col_width (local_prompt, n0, num, 1);
+ /* lpos is a physical cursor position, so it needs to take the invisible
+ characters into account. */
+ if (mb_cur_max > 1 && rl_byte_oriented == 0 && prompt_multibyte_chars > 0)
+ lpos -= _rl_col_width (local_prompt, n0, num, 1) - wadjust;
else
#endif
- lpos -= _rl_screenwidth;
+ lpos -= _rl_screenwidth; /* all physical cursor positions */
}
prompt_last_screen_line = newlines;
@@ -770,7 +841,7 @@ rl_redisplay ()
lb_linenum = 0;
#if defined (HANDLE_MULTIBYTE)
in = 0;
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
{
memset (&ps, 0, sizeof (mbstate_t));
/* XXX - what if wc_bytes ends up <= 0? check for MB_INVALIDCH */
@@ -786,7 +857,7 @@ rl_redisplay ()
c = (unsigned char)rl_line_buffer[in];
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
{
if (MB_INVALIDCH (wc_bytes))
{
@@ -895,7 +966,7 @@ rl_redisplay ()
else
{
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
{
register int i;
@@ -931,7 +1002,7 @@ rl_redisplay ()
}
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
{
in += wc_bytes;
/* XXX - what if wc_bytes ends up <= 0? check for MB_INVALIDCH */
@@ -949,7 +1020,7 @@ rl_redisplay ()
lb_linenum = newlines;
}
- inv_botlin = lb_botlin = newlines;
+ inv_botlin = lb_botlin = _rl_inv_botlin = newlines;
CHECK_INV_LBREAKS ();
inv_lbreaks[newlines+1] = out;
cursor_linenum = lb_linenum;
@@ -979,9 +1050,11 @@ rl_redisplay ()
not the first. */
if (out >= _rl_screenchars)
{
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+#if defined (HANDLE_MULTIBYTE)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
out = _rl_find_prev_mbchar (line, _rl_screenchars, MB_FIND_ANY);
else
+#endif
out = _rl_screenchars - 1;
}
@@ -1027,15 +1100,15 @@ rl_redisplay ()
time update_line is called, then we can assume in our
calculations that o_cpos does not need to be adjusted by
wrap_offset. */
- if (linenum == 0 && (MB_CUR_MAX > 1 && rl_byte_oriented == 0) && OLD_CPOS_IN_PROMPT())
+ if (linenum == 0 && (mb_cur_max > 1 && rl_byte_oriented == 0) && OLD_CPOS_IN_PROMPT())
_rl_last_c_pos -= prompt_invis_chars_first_line; /* XXX - was wrap_offset */
else if (linenum == prompt_last_screen_line && prompt_physical_chars > _rl_screenwidth &&
- (MB_CUR_MAX > 1 && rl_byte_oriented == 0) &&
+ (mb_cur_max > 1 && rl_byte_oriented == 0) &&
cpos_adjusted == 0 &&
_rl_last_c_pos != o_cpos &&
_rl_last_c_pos > (prompt_last_invisible - _rl_screenwidth - prompt_invis_chars_first_line))
_rl_last_c_pos -= (wrap_offset-prompt_invis_chars_first_line);
-
+
/* If this is the line with the prompt, we might need to
compensate for invisible characters in the new line. Do
this only if there is not more than one new line (which
@@ -1047,7 +1120,7 @@ rl_redisplay ()
(wrap_offset > visible_wrap_offset) &&
(_rl_last_c_pos < visible_first_line_len))
{
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
nleft = _rl_screenwidth - _rl_last_c_pos;
else
nleft = _rl_screenwidth + wrap_offset - _rl_last_c_pos;
@@ -1099,7 +1172,7 @@ rl_redisplay ()
the physical cursor position on the screen stays the same,
but the buffer position needs to be adjusted to account
for invisible characters. */
- if ((MB_CUR_MAX == 1 || rl_byte_oriented) && cursor_linenum == 0 && wrap_offset)
+ if ((mb_cur_max == 1 || rl_byte_oriented) && cursor_linenum == 0 && wrap_offset)
_rl_last_c_pos += wrap_offset;
}
@@ -1126,7 +1199,7 @@ rl_redisplay ()
_rl_output_some_chars ("*", 1);
_rl_output_some_chars (local_prompt, nleft);
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
_rl_last_c_pos = _rl_col_width (local_prompt, 0, nleft, 1) - wrap_offset + modmark;
else
_rl_last_c_pos = nleft + modmark;
@@ -1150,7 +1223,7 @@ rl_redisplay ()
if (wrap_offset && cursor_linenum == 0 && nleft < _rl_last_c_pos)
{
/* TX == new physical cursor position in multibyte locale. */
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
tx = _rl_col_width (&visible_line[pos], 0, nleft, 1) - visible_wrap_offset;
else
tx = nleft;
@@ -1165,7 +1238,7 @@ rl_redisplay ()
_rl_last_c_pos as an absolute cursor position, but moving to a
point specified by a buffer position (NLEFT) that doesn't take
invisible characters into account. */
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
_rl_move_cursor_relative (nleft, &invisible_line[pos]);
else if (nleft != _rl_last_c_pos)
_rl_move_cursor_relative (nleft, &invisible_line[pos]);
@@ -1246,7 +1319,7 @@ rl_redisplay ()
_rl_screenwidth + (lmargin ? 0 : wrap_offset),
0);
- if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) &&
+ if ((mb_cur_max > 1 && rl_byte_oriented == 0) &&
displaying_prompt_first_line && OLD_CPOS_IN_PROMPT())
_rl_last_c_pos -= prompt_invis_chars_first_line; /* XXX - was wrap_offset */
@@ -1318,6 +1391,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
int current_invis_chars;
int col_lendiff, col_temp;
int bytes_to_insert;
+ int mb_cur_max = MB_CUR_MAX;
#if defined (HANDLE_MULTIBYTE)
mbstate_t ps_new, ps_old;
int new_offset, old_offset;
@@ -1328,7 +1402,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
the exact cursor position and cut-and-paste with certain terminal
emulators. In this calculation, TEMP is the physical screen
position of the cursor. */
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
temp = _rl_last_c_pos;
else
temp = _rl_last_c_pos - WRAP_OFFSET (_rl_last_v_pos, visible_wrap_offset);
@@ -1336,7 +1410,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
&& _rl_last_v_pos == current_line - 1)
{
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
{
wchar_t wc;
mbstate_t ps;
@@ -1350,7 +1424,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
_rl_clear_to_eol (line_state_visible->wrapped_line[current_line]);
memset (&ps, 0, sizeof (mbstate_t));
- ret = mbrtowc (&wc, new, MB_CUR_MAX, &ps);
+ ret = mbrtowc (&wc, new, mb_cur_max, &ps);
if (MB_INVALIDCH (ret))
{
tempwidth = 1;
@@ -1370,7 +1444,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
_rl_last_c_pos = tempwidth;
_rl_last_v_pos++;
memset (&ps, 0, sizeof (mbstate_t));
- ret = mbrtowc (&wc, old, MB_CUR_MAX, &ps);
+ ret = mbrtowc (&wc, old, mb_cur_max, &ps);
if (ret != 0 && bytes != 0)
{
if (MB_INVALIDCH (ret))
@@ -1409,7 +1483,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
/* Find first difference. */
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
{
/* See if the old line is a subset of the new line, so that the
only change is adding characters. */
@@ -1466,7 +1540,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
return;
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0 && _rl_utf8locale)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0 && _rl_utf8locale)
{
wchar_t wc;
mbstate_t ps = { 0 };
@@ -1475,7 +1549,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
/* If the first character in the difference is a zero-width character,
assume it's a combining character and back one up so the two base
characters no longer compare equivalently. */
- t = mbrtowc (&wc, ofd, MB_CUR_MAX, &ps);
+ t = mbrtowc (&wc, ofd, mb_cur_max, &ps);
if (t > 0 && UNICODE_COMBINING_CHAR (wc) && WCWIDTH (wc) == 0)
{
old_offset = _rl_find_prev_mbchar (old, ofd - old, MB_FIND_ANY);
@@ -1489,7 +1563,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
wsatend = 1; /* flag for trailing whitespace */
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
{
ols = old + _rl_find_prev_mbchar (old, oe - old, MB_FIND_ANY);
nls = new + _rl_find_prev_mbchar (new, ne - new, MB_FIND_ANY);
@@ -1547,14 +1621,14 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
{
if (*ols) /* don't step past the NUL */
{
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
ols = old + _rl_find_next_mbchar (old, ols - old, 1, MB_FIND_ANY);
else
ols++;
}
if (*nls)
{
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
nls = new + _rl_find_next_mbchar (new, nls - new, 1, MB_FIND_ANY);
else
nls++;
@@ -1566,7 +1640,12 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
if (_rl_last_v_pos != current_line)
{
_rl_move_vert (current_line);
- if ((MB_CUR_MAX == 1 || rl_byte_oriented) && current_line == 0 && visible_wrap_offset)
+ /* We have moved up to a new screen line. This line may or may not have
+ invisible characters on it, but we do our best to recalculate
+ visible_wrap_offset based on what we know. */
+ if (current_line == 0)
+ visible_wrap_offset = prompt_invis_chars_first_line; /* XXX */
+ if ((mb_cur_max == 1 || rl_byte_oriented) && current_line == 0 && visible_wrap_offset)
_rl_last_c_pos += visible_wrap_offset;
}
@@ -1577,16 +1656,31 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
string, then redraw the entire prompt string. We can only do this
reliably if the terminal supports a `cr' capability.
+ This can also happen if the prompt string has changed, and the first
+ difference in the line is in the middle of the prompt string, after a
+ sequence of invisible characters (worst case) and before the end of
+ the prompt. In this case, we have to redraw the entire prompt string
+ so that the entire sequence of invisible characters is drawn. We need
+ to handle the worst case, when the difference is after (or in the middle
+ of) a sequence of invisible characters that changes the text color and
+ before the sequence that restores the text color to normal. Then we have
+ to make sure that the lines still differ -- if they don't, we can
+ return immediately.
+
This is not an efficiency hack -- there is a problem with redrawing
portions of the prompt string if they contain terminal escape
sequences (like drawing the `unbold' sequence without a corresponding
`bold') that manifests itself on certain terminals. */
lendiff = local_prompt_len;
+ if (lendiff > nmax)
+ lendiff = nmax;
od = ofd - old; /* index of first difference in visible line */
+ nd = nfd - new; /* nd, od are buffer indexes */
if (current_line == 0 && !_rl_horizontal_scroll_mode &&
_rl_term_cr && lendiff > prompt_visible_length && _rl_last_c_pos > 0 &&
- od >= lendiff && _rl_last_c_pos < PROMPT_ENDING_INDEX)
+ (((od > 0 || nd > 0) && (od <= prompt_last_invisible || nd <= prompt_last_invisible)) ||
+ ((od >= lendiff) && _rl_last_c_pos < PROMPT_ENDING_INDEX)))
{
#if defined (__MSDOS__)
putc ('\r', rl_outstream);
@@ -1596,7 +1690,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
if (modmark)
_rl_output_some_chars ("*", 1);
_rl_output_some_chars (local_prompt, lendiff);
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
{
/* We take wrap_offset into account here so we can pass correct
information to _rl_move_cursor_relative. */
@@ -1605,6 +1699,43 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
}
else
_rl_last_c_pos = lendiff + modmark;
+
+ /* Now if we have printed the prompt string because the first difference
+ was within the prompt, see if we need to recompute where the lines
+ differ. Check whether where we are now is past the last place where
+ the old and new lines are the same and short-circuit now if we are. */
+ if ((od <= prompt_last_invisible || nd <= prompt_last_invisible) &&
+ omax == nmax &&
+ lendiff > (ols-old) && lendiff > (nls-new))
+ return;
+
+ /* XXX - we need to fix up our calculations if we are now past the
+ old ofd/nfd and the prompt length (or line length) has changed.
+ We punt on the problem and do a dumb update. We'd like to be able
+ to just output the prompt from the beginning of the line up to the
+ first difference, but you don't know the number of invisible
+ characters in that case.
+ This needs a lot of work to be efficient. */
+ if ((od <= prompt_last_invisible || nd <= prompt_last_invisible))
+ {
+ nfd = new + lendiff; /* number of characters we output above */
+ nd = lendiff;
+
+ /* Do a dumb update and return */
+ temp = ne - nfd;
+ if (temp > 0)
+ {
+ _rl_output_some_chars (nfd, temp);
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
+ _rl_last_c_pos += _rl_col_width (new, nd, ne - new, 1);
+ else
+ _rl_last_c_pos += temp;
+ }
+ if (nmax < omax)
+ goto clear_rest_of_line; /* XXX */
+ else
+ return;
+ }
}
o_cpos = _rl_last_c_pos;
@@ -1618,7 +1749,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
/* We need to indicate that the cursor position is correct in the presence of
invisible characters in the prompt string. Let's see if setting this when
we make sure we're at the end of the drawn prompt string works. */
- if (current_line == 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0 &&
+ if (current_line == 0 && mb_cur_max > 1 && rl_byte_oriented == 0 &&
(_rl_last_c_pos > 0 || o_cpos > 0) &&
_rl_last_c_pos == prompt_physical_chars)
cpos_adjusted = 1;
@@ -1629,7 +1760,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
col_lendiff == difference on screen (columns)
When not using multibyte characters, these are equal */
lendiff = (nls - nfd) - (ols - ofd);
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
col_lendiff = _rl_col_width (new, nfd - new, nls - new, 1) - _rl_col_width (old, ofd - old, ols - old, 1);
else
col_lendiff = lendiff;
@@ -1640,7 +1771,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
if (current_line == 0 && /* !_rl_horizontal_scroll_mode && */
current_invis_chars != visible_wrap_offset)
{
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
{
lendiff += visible_wrap_offset - current_invis_chars;
col_lendiff += visible_wrap_offset - current_invis_chars;
@@ -1658,7 +1789,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
and writes TEMP bytes. */
/* Insert (diff (len (old), len (new)) ch. */
temp = ne - nfd;
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
col_temp = _rl_col_width (new, nfd - new, ne - new, 1);
else
col_temp = temp;
@@ -1709,7 +1840,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
_rl_last_c_pos == 0 &&
lendiff > prompt_visible_length &&
current_invis_chars > 0) == 0) &&
- (((MB_CUR_MAX > 1 && rl_byte_oriented == 0) &&
+ (((mb_cur_max > 1 && rl_byte_oriented == 0) &&
current_line == 0 && wrap_offset &&
((nfd - new) <= prompt_last_invisible) &&
(col_lendiff < prompt_visible_length)) == 0) &&
@@ -1717,12 +1848,12 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
{
open_some_spaces (col_lendiff);
_rl_output_some_chars (nfd, bytes_to_insert);
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
_rl_last_c_pos += _rl_col_width (nfd, 0, bytes_to_insert, 1);
else
_rl_last_c_pos += bytes_to_insert;
}
- else if ((MB_CUR_MAX == 1 || rl_byte_oriented != 0) && *ols == 0 && lendiff > 0)
+ else if ((mb_cur_max == 1 || rl_byte_oriented != 0) && *ols == 0 && lendiff > 0)
{
/* At the end of a line the characters do not have to
be "inserted". They can just be placed on the screen. */
@@ -1737,7 +1868,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
/* If nfd begins before the last invisible character in the
prompt, adjust _rl_last_c_pos to account for wrap_offset
and set cpos_adjusted to let the caller know. */
- if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) && current_line == 0 && displaying_prompt_first_line && wrap_offset && ((nfd - new) <= prompt_last_invisible))
+ if ((mb_cur_max > 1 && rl_byte_oriented == 0) && current_line == 0 && displaying_prompt_first_line && wrap_offset && ((nfd - new) <= prompt_last_invisible))
{
_rl_last_c_pos -= wrap_offset;
cpos_adjusted = 1;
@@ -1750,7 +1881,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
/* If nfd begins before the last invisible character in the
prompt, adjust _rl_last_c_pos to account for wrap_offset
and set cpos_adjusted to let the caller know. */
- if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) && current_line == 0 && displaying_prompt_first_line && wrap_offset && ((nfd - new) <= prompt_last_invisible))
+ if ((mb_cur_max > 1 && rl_byte_oriented == 0) && current_line == 0 && displaying_prompt_first_line && wrap_offset && ((nfd - new) <= prompt_last_invisible))
{
_rl_last_c_pos -= wrap_offset;
cpos_adjusted = 1;
@@ -1766,11 +1897,15 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
char in the current line (which implies we just output some invisible
characters) we need to adjust _rl_last_c_pos, since it represents
a physical character position. */
- if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) &&
+ /* The current_line*rl_screenwidth+prompt_invis_chars_first_line is a
+ crude attempt to compute how far into the new line buffer we are.
+ It doesn't work well in the face of multibyte characters and needs
+ to be rethought. XXX */
+ if ((mb_cur_max > 1 && rl_byte_oriented == 0) &&
current_line == prompt_last_screen_line && wrap_offset &&
displaying_prompt_first_line &&
wrap_offset != prompt_invis_chars_first_line &&
- ((nfd-new) < (prompt_last_invisible-(current_line*_rl_screenwidth))))
+ ((nfd-new) < (prompt_last_invisible-(current_line*_rl_screenwidth+prompt_invis_chars_first_line))))
{
_rl_last_c_pos -= wrap_offset - prompt_invis_chars_first_line;
cpos_adjusted = 1;
@@ -1810,7 +1945,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
in a multibyte locale to account for the wrap offset and
set cpos_adjusted accordingly. */
_rl_output_some_chars (nfd, bytes_to_insert);
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
{
_rl_last_c_pos += _rl_col_width (nfd, 0, bytes_to_insert, 1);
if (current_line == 0 && wrap_offset &&
@@ -1845,7 +1980,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
set cpos_adjusted accordingly. */
_rl_output_some_chars (nfd, temp);
_rl_last_c_pos += col_temp; /* XXX */
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
{
if (current_line == 0 && wrap_offset &&
displaying_prompt_first_line &&
@@ -1859,7 +1994,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
}
clear_rest_of_line:
lendiff = (oe - old) - (ne - new);
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
col_lendiff = _rl_col_width (old, 0, oe - old, 1) - _rl_col_width (new, 0, ne - new, 1);
else
col_lendiff = lendiff;
@@ -1869,7 +2004,7 @@ clear_rest_of_line:
space_to_eol will insert too many spaces. XXX - maybe we should
adjust col_lendiff based on the difference between _rl_last_c_pos
and _rl_screenwidth */
- if (col_lendiff && ((MB_CUR_MAX == 1 || rl_byte_oriented) || (_rl_last_c_pos < _rl_screenwidth)))
+ if (col_lendiff && ((mb_cur_max == 1 || rl_byte_oriented) || (_rl_last_c_pos < _rl_screenwidth)))
{
if (_rl_term_autowrap && current_line < inv_botlin)
space_to_eol (col_lendiff);
@@ -1895,6 +2030,34 @@ rl_on_new_line ()
return 0;
}
+/* Clear all screen lines occupied by the current readline line buffer
+ (visible line) */
+int
+rl_clear_visible_line ()
+{
+ int curr_line;
+
+ /* Make sure we move to column 0 so we clear the entire line */
+#if defined (__MSDOS__)
+ putc ('\r', rl_outstream);
+#else
+ tputs (_rl_term_cr, 1, _rl_output_character_function);
+#endif
+ _rl_last_c_pos = 0;
+
+ /* Move to the last screen line of the current visible line */
+ _rl_move_vert (_rl_vis_botlin);
+
+ /* And erase screen lines going up to line 0 (first visible line) */
+ for (curr_line = _rl_last_v_pos; curr_line >= 0; curr_line--)
+ {
+ _rl_move_vert (curr_line);
+ _rl_clear_to_eol (0);
+ }
+
+ return 0;
+}
+
/* Tell the update routines that we have moved onto a new line with the
prompt already displayed. Code originally from the version of readline
distributed with CLISP. rl_expand_prompt must have already been called
@@ -1972,11 +2135,25 @@ rl_forced_update_display ()
return 0;
}
+/* Redraw only the last line of a multi-line prompt. */
+void
+rl_redraw_prompt_last_line ()
+{
+ char *t;
+
+ t = strrchr (rl_display_prompt, '\n');
+ if (t)
+ redraw_prompt (++t);
+ else
+ rl_forced_update_display ();
+}
+
/* Move the cursor from _rl_last_c_pos to NEW, which are buffer indices.
(Well, when we don't have multibyte characters, _rl_last_c_pos is a
buffer index.)
DATA is the contents of the screen line of interest; i.e., where
- the movement is being done. */
+ the movement is being done.
+ DATA is always the visible line or the invisible line */
void
_rl_move_cursor_relative (new, data)
int new;
@@ -1986,6 +2163,8 @@ _rl_move_cursor_relative (new, data)
int woff; /* number of invisible chars on current line */
int cpos, dpos; /* current and desired cursor positions */
int adjust;
+ int in_invisline;
+ int mb_cur_max = MB_CUR_MAX;
woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset);
cpos = _rl_last_c_pos;
@@ -1999,7 +2178,7 @@ _rl_move_cursor_relative (new, data)
this case, NEW's display position is not obvious and must be
calculated. We need to account for invisible characters in this line,
as long as we are past them and they are counted by _rl_col_width. */
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
{
adjust = 1;
/* Try to short-circuit common cases and eliminate a bunch of multibyte
@@ -2024,14 +2203,28 @@ _rl_move_cursor_relative (new, data)
if (displaying_prompt_first_line == 0)
adjust = 0;
+ /* yet another special case: printing the last line of a prompt with
+ multibyte characters and invisible characters whose printable length
+ exceeds the screen width with the last invisible character
+ (prompt_last_invisible) in the last line. IN_INVISLINE is the
+ offset of DATA in invisible_line */
+ in_invisline = 0;
+ if (data > invisible_line && data < invisible_line+inv_lbreaks[_rl_inv_botlin+1])
+ in_invisline = data - invisible_line;
+
/* Use NEW when comparing against the last invisible character in the
prompt string, since they're both buffer indices and DPOS is a
desired display position. */
+ /* NEW is relative to the current displayed line, while
+ PROMPT_LAST_INVISIBLE is relative to the entire (wrapped) line.
+ Need a way to reconcile these two variables by turning NEW into a
+ buffer position relative to the start of the line */
if (adjust && ((new > prompt_last_invisible) || /* XXX - don't use woff here */
- (prompt_physical_chars >= _rl_screenwidth &&
+ (new+in_invisline > prompt_last_invisible) || /* invisible line */
+ (prompt_physical_chars >= _rl_screenwidth && /* visible line */
_rl_last_v_pos == prompt_last_screen_line &&
wrap_offset >= woff && dpos >= woff &&
- new > (prompt_last_invisible-(_rl_screenwidth*_rl_last_v_pos)-wrap_offset))))
+ new > (prompt_last_invisible-(vis_lbreaks[_rl_last_v_pos])-wrap_offset))))
/* XXX last comparison might need to be >= */
{
dpos -= woff;
@@ -2053,7 +2246,7 @@ _rl_move_cursor_relative (new, data)
of moving backwards. */
/* i == current physical cursor position. */
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
i = _rl_last_c_pos;
else
#endif
@@ -2088,7 +2281,7 @@ _rl_move_cursor_relative (new, data)
in the buffer and we have to go back to the beginning of the screen
line. In this case, we can use the terminal sequence to move forward
if it's available. */
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
{
if (_rl_term_forward_char)
{
@@ -2246,7 +2439,7 @@ rl_message (va_alist)
msg_buf = xmalloc (msg_bufsiz = 128);
#if defined (HAVE_VSNPRINTF)
- bneed = vsnprintf (msg_buf, msg_bufsiz - 1, format, args);
+ bneed = vsnprintf (msg_buf, msg_bufsiz, format, args);
if (bneed >= msg_bufsiz - 1)
{
msg_bufsiz = bneed + 1;
@@ -2279,10 +2472,10 @@ rl_message (va_alist)
local_prompt = (char *)NULL;
}
rl_display_prompt = msg_buf;
- local_prompt = expand_prompt (msg_buf, &prompt_visible_length,
- &prompt_last_invisible,
- &prompt_invis_chars_first_line,
- &prompt_physical_chars);
+ local_prompt = expand_prompt (msg_buf, 0, &prompt_visible_length,
+ &prompt_last_invisible,
+ &prompt_invis_chars_first_line,
+ &prompt_physical_chars);
local_prompt_prefix = (char *)NULL;
local_prompt_len = local_prompt ? strlen (local_prompt) : 0;
(*rl_redisplay_function) ();
@@ -2312,10 +2505,10 @@ rl_message (format, arg1, arg2)
FREE (local_prompt_prefix);
local_prompt = (char *)NULL;
}
- local_prompt = expand_prompt (msg_buf, &prompt_visible_length,
- &prompt_last_invisible,
- &prompt_invis_chars_first_line,
- &prompt_physical_chars);
+ local_prompt = expand_prompt (msg_buf, 0, &prompt_visible_length,
+ &prompt_last_invisible,
+ &prompt_invis_chars_first_line,
+ &prompt_physical_chars);
local_prompt_prefix = (char *)NULL;
local_prompt_len = local_prompt ? strlen (local_prompt) : 0;
(*rl_redisplay_function) ();
@@ -2502,7 +2695,7 @@ static void
open_some_spaces (col)
int col;
{
-#if !defined (__MSDOS__) && !defined (__MINGW32__)
+#if !defined (__MSDOS__) && (!defined (__MINGW32__) || defined (NCURSES_VERSION))
char *buffer;
register int i;
@@ -2531,7 +2724,7 @@ open_some_spaces (col)
for (i = col; i--; )
tputs (_rl_term_ic, 1, _rl_output_character_function);
}
-#endif /* !__MSDOS__ && !__MINGW32__ */
+#endif /* !__MSDOS__ && (!__MINGW32__ || NCURSES_VERSION)*/
}
/* Delete COUNT characters from the display line. */
@@ -2542,7 +2735,7 @@ delete_chars (count)
if (count > _rl_screenwidth) /* XXX */
return;
-#if !defined (__MSDOS__) && !defined (__MINGW32__)
+#if !defined (__MSDOS__) && (!defined (__MINGW32__) || defined (NCURSES_VERSION))
if (_rl_term_DC && *_rl_term_DC)
{
char *buffer;
@@ -2555,7 +2748,7 @@ delete_chars (count)
while (count--)
tputs (_rl_term_dc, 1, _rl_output_character_function);
}
-#endif /* !__MSDOS__ && !__MINGW32__ */
+#endif /* !__MSDOS__ && (!__MINGW32__ || NCURSES_VERSION)*/
}
void
@@ -2618,7 +2811,8 @@ redraw_prompt (t)
rl_save_prompt ();
rl_display_prompt = t;
- local_prompt = expand_prompt (t, &prompt_visible_length,
+ local_prompt = expand_prompt (t, PMT_MULTILINE,
+ &prompt_visible_length,
&prompt_last_invisible,
&prompt_invis_chars_first_line,
&prompt_physical_chars);
@@ -2699,6 +2893,12 @@ _rl_erase_entire_line ()
fflush (rl_outstream);
}
+void
+_rl_ttyflush ()
+{
+ fflush (rl_outstream);
+}
+
/* return the `current display line' of the cursor -- the number of lines to
move up to get to the first screen line of the current readline line. */
int
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 72b7985..a38bc9e 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -59,6 +59,8 @@ QUIETPS = #set this to -q to shut up dvips
PAPERSIZE = letter
PSDPI = 600
DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky
+# experimental; uses external texi2dvi for now; this needs pdftex to be present
+TEXI2PDF = texi2dvi --pdf
# These tools might not be available; they're not required
DVIPDF = dvipdfm -o $@ -p ${PAPERSIZE}
@@ -101,6 +103,10 @@ DIST_DOCS = $(DVIOBJ) $(PSOBJ) $(HTMLOBJ) $(INFOOBJ) $(TEXTOBJ) $(PDFOBJ)
$(RM) $@
-${DVIPDF} $<
+#.texi.pdf:
+# $(RM) $@
+# -${TEXI2PDF} $<
+
all: info dvi html ps text pdf
nodvi: info html text
@@ -170,9 +176,15 @@ history_3.ps: $(srcdir)/history.3
${RM} $@
${GROFF} -man < $(srcdir)/history.3 > $@
-readline.pdf: readline.dvi
-history.pdf: history.dvi
-rluserman.pdf: rluserman.dvi
+readline.pdf: $(RLSRC)
+ TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2PDF) $(srcdir)/rlman.texi
+ mv rlman.pdf $@
+
+history.pdf: $(HISTSRC)
+ TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2PDF) $(srcdir)/history.texi
+
+rluserman.pdf: $(RLSRC)
+ TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2PDF) $(srcdir)/rluserman.texi
clean:
$(RM) *.aux *.bak *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \
diff --git a/doc/history.0 b/doc/history.0
index 22c4f47..e3cba11 100644
--- a/doc/history.0
+++ b/doc/history.0
@@ -1,24 +1,23 @@
-HISTORY(3) HISTORY(3)
+HISTORY(3) Library Functions Manual HISTORY(3)
-NNAAMMEE
+[1mNAME[0m
history - GNU History Library
-CCOOPPYYRRIIGGHHTT
- The GNU History Library is Copyright (C) 1989-2011 by the Free Software
+[1mCOPYRIGHT[0m
+ The GNU History Library is Copyright (C) 1989-2014 by the Free Software
Foundation, Inc.
-DDEESSCCRRIIPPTTIIOONN
+[1mDESCRIPTION[0m
Many programs read input from the user a line at a time. The GNU His-
tory library is able to keep track of those lines, associate arbitrary
data with each line, and utilize information from previous lines in
composing new ones.
-
-HHIISSTTOORRYY EEXXPPAANNSSIIOONN
+[1mHISTORY EXPANSION[0m
The history library supports a history expansion feature that is iden-
- tical to the history expansion in bbaasshh.. This section describes what
+ tical to the history expansion in [1mbash. [22mThis section describes what
syntax features are available.
History expansions introduce words from the history list into the input
@@ -30,104 +29,104 @@ HHIISSTTOORRYY EEXXPPAANNSSIIOONN
line is read. It takes place in two parts. The first is to determine
which line from the history list to use during substitution. The sec-
ond is to select portions of that line for inclusion into the current
- one. The line selected from the history is the _e_v_e_n_t, and the portions
- of that line that are acted upon are _w_o_r_d_s. Various _m_o_d_i_f_i_e_r_s are
+ one. The line selected from the history is the [4mevent[24m, and the portions
+ of that line that are acted upon are [4mwords[24m. Various [4mmodifiers[24m are
available to manipulate the selected words. The line is broken into
- words in the same fashion as bbaasshh does when reading input, so that sev-
+ words in the same fashion as [1mbash [22mdoes when reading input, so that sev-
eral words that would otherwise be separated are considered one word
- when surrounded by quotes (see the description of hhiissttoorryy__ttookkeenniizzee(())
+ when surrounded by quotes (see the description of [1mhistory_tokenize()[0m
below). History expansions are introduced by the appearance of the
- history expansion character, which is !! by default. Only backslash (\\)
+ history expansion character, which is [1m! [22mby default. Only backslash ([1m\[22m)
and single quotes can quote the history expansion character.
- EEvveenntt DDeessiiggnnaattoorrss
+ [1mEvent Designators[0m
An event designator is a reference to a command line entry in the his-
tory list. Unless the reference is absolute, events are relative to
the current position in the history list.
- !! Start a history substitution, except when followed by a bbllaannkk,
+ [1m! [22mStart a history substitution, except when followed by a [1mblank[22m,
newline, = or (.
- !!_n Refer to command line _n.
- !!--_n Refer to the current command minus _n.
- !!!! Refer to the previous command. This is a synonym for `!-1'.
- !!_s_t_r_i_n_g
+ [1m![4m[22mn[24m Refer to command line [4mn[24m.
+ [1m!-[4m[22mn[24m Refer to the current command minus [4mn[24m.
+ [1m!! [22mRefer to the previous command. This is a synonym for `!-1'.
+ [1m![4m[22mstring[0m
Refer to the most recent command preceding the current position
- in the history list starting with _s_t_r_i_n_g.
- !!??_s_t_r_i_n_g[[??]]
+ in the history list starting with [4mstring[24m.
+ [1m!?[4m[22mstring[24m[1m[?][0m
Refer to the most recent command preceding the current position
- in the history list containing _s_t_r_i_n_g. The trailing ?? may be
- omitted if _s_t_r_i_n_g is followed immediately by a newline.
- ^^_s_t_r_i_n_g_1^^_s_t_r_i_n_g_2^^
- Quick substitution. Repeat the last command, replacing _s_t_r_i_n_g_1
- with _s_t_r_i_n_g_2. Equivalent to ``!!:s/_s_t_r_i_n_g_1/_s_t_r_i_n_g_2/'' (see MMoodd--
- iiffiieerrss below).
- !!## The entire command line typed so far.
-
- WWoorrdd DDeessiiggnnaattoorrss
- Word designators are used to select desired words from the event. A ::
+ in the history list containing [4mstring[24m. The trailing [1m? [22mmay be
+ omitted if [4mstring[24m is followed immediately by a newline.
+ [1m^[4m[22mstring1[24m[1m^[4m[22mstring2[24m[1m^[0m
+ Quick substitution. Repeat the last command, replacing [4mstring1[0m
+ with [4mstring2[24m. Equivalent to ``!!:s/[4mstring1[24m/[4mstring2[24m/'' (see [1mMod-[0m
+ [1mifiers [22mbelow).
+ [1m!# [22mThe entire command line typed so far.
+
+ [1mWord Designators[0m
+ Word designators are used to select desired words from the event. A [1m:[0m
separates the event specification from the word designator. It may be
- omitted if the word designator begins with a ^^, $$, **, --, or %%. Words
+ omitted if the word designator begins with a [1m^[22m, [1m$[22m, [1m*[22m, [1m-[22m, or [1m%[22m. Words
are numbered from the beginning of the line, with the first word being
denoted by 0 (zero). Words are inserted into the current line sepa-
rated by single spaces.
- 00 ((zzeerroo))
+ [1m0 (zero)[0m
The zeroth word. For the shell, this is the command word.
- _n The _nth word.
- ^^ The first argument. That is, word 1.
- $$ The last word. This is usually the last argument, but will
+ [4mn[24m The [4mn[24mth word.
+ [1m^ [22mThe first argument. That is, word 1.
+ [1m$ [22mThe last word. This is usually the last argument, but will
expand to the zeroth word if there is only one word in the line.
- %% The word matched by the most recent `?_s_t_r_i_n_g?' search.
- _x--_y A range of words; `-_y' abbreviates `0-_y'.
- ** All of the words but the zeroth. This is a synonym for `_1_-_$'.
- It is not an error to use ** if there is just one word in the
+ [1m% [22mThe word matched by the most recent `?[4mstring[24m?' search.
+ [4mx[24m[1m-[4m[22my[24m A range of words; `-[4my[24m' abbreviates `0-[4my[24m'.
+ [1m* [22mAll of the words but the zeroth. This is a synonym for `[4m1-$[24m'.
+ It is not an error to use [1m* [22mif there is just one word in the
event; the empty string is returned in that case.
- xx** Abbreviates _x_-_$.
- xx-- Abbreviates _x_-_$ like xx**, but omits the last word.
+ [1mx* [22mAbbreviates [4mx-$[24m.
+ [1mx- [22mAbbreviates [4mx-$[24m like [1mx*[22m, but omits the last word.
- If a word designator is supplied without an event specification, the
+ If a word designator is supplied without an event specification, the
previous command is used as the event.
- MMooddiiffiieerrss
- After the optional word designator, there may appear a sequence of one
+ [1mModifiers[0m
+ After the optional word designator, there may appear a sequence of one
or more of the following modifiers, each preceded by a `:'.
- hh Remove a trailing file name component, leaving only the head.
- tt Remove all leading file name components, leaving the tail.
- rr Remove a trailing suffix of the form _._x_x_x, leaving the basename.
- ee Remove all but the trailing suffix.
- pp Print the new command but do not execute it.
- qq Quote the substituted words, escaping further substitutions.
- xx Quote the substituted words as with qq, but break into words at
- bbllaannkkss and newlines.
- ss//_o_l_d//_n_e_w//
- Substitute _n_e_w for the first occurrence of _o_l_d in the event
+ [1mh [22mRemove a trailing file name component, leaving only the head.
+ [1mt [22mRemove all leading file name components, leaving the tail.
+ [1mr [22mRemove a trailing suffix of the form [4m.xxx[24m, leaving the basename.
+ [1me [22mRemove all but the trailing suffix.
+ [1mp [22mPrint the new command but do not execute it.
+ [1mq [22mQuote the substituted words, escaping further substitutions.
+ [1mx [22mQuote the substituted words as with [1mq[22m, but break into words at
+ [1mblanks [22mand newlines.
+ [1ms/[4m[22mold[24m[1m/[4m[22mnew[24m[1m/[0m
+ Substitute [4mnew[24m for the first occurrence of [4mold[24m in the event
line. Any delimiter can be used in place of /. The final
delimiter is optional if it is the last character of the event
- line. The delimiter may be quoted in _o_l_d and _n_e_w with a single
- backslash. If & appears in _n_e_w, it is replaced by _o_l_d. A sin-
- gle backslash will quote the &. If _o_l_d is null, it is set to
- the last _o_l_d substituted, or, if no previous history substitu-
- tions took place, the last _s_t_r_i_n_g in a !!??_s_t_r_i_n_g[[??]] search.
- && Repeat the previous substitution.
- gg Cause changes to be applied over the entire event line. This is
- used in conjunction with `::ss' (e.g., `::ggss//_o_l_d//_n_e_w//') or `::&&'.
- If used with `::ss', any delimiter can be used in place of /, and
+ line. The delimiter may be quoted in [4mold[24m and [4mnew[24m with a single
+ backslash. If & appears in [4mnew[24m, it is replaced by [4mold[24m. A sin-
+ gle backslash will quote the &. If [4mold[24m is null, it is set to
+ the last [4mold[24m substituted, or, if no previous history substitu-
+ tions took place, the last [4mstring[24m in a [1m!?[4m[22mstring[24m[1m[?] [22msearch.
+ [1m& [22mRepeat the previous substitution.
+ [1mg [22mCause changes to be applied over the entire event line. This is
+ used in conjunction with `[1m:s[22m' (e.g., `[1m:gs/[4m[22mold[24m[1m/[4m[22mnew[24m[1m/[22m') or `[1m:&[22m'.
+ If used with `[1m:s[22m', any delimiter can be used in place of /, and
the final delimiter is optional if it is the last character of
- the event line. An aa may be used as a synonym for gg.
- GG Apply the following `ss' modifier once to each word in the event
+ the event line. An [1ma [22mmay be used as a synonym for [1mg[22m.
+ [1mG [22mApply the following `[1ms[22m' modifier once to each word in the event
line.
-PPRROOGGRRAAMMMMIINNGG WWIITTHH HHIISSTTOORRYY FFUUNNCCTTIIOONNSS
+[1mPROGRAMMING WITH HISTORY FUNCTIONS[0m
This section describes how to use the History library in other pro-
grams.
- IInnttrroodduuccttiioonn ttoo HHiissttoorryy
+ [1mIntroduction to History[0m
The programmer using the History library has available functions for
remembering lines on a history list, associating arbitrary data with a
line, removing lines from the list, searching through the list for a
line containing an arbitrary text string, and referencing any line in
- the list directly. In addition, a history _e_x_p_a_n_s_i_o_n function is avail-
+ the list directly. In addition, a history [4mexpansion[24m function is avail-
able which provides for a consistent user interface across different
programs.
@@ -135,7 +134,7 @@ PPRROOGGRRAAMMMMIINNGG WWIITTHH HHIISSTTOORRYY FFUUNNC
fit of a consistent user interface with a set of well-known commands
for manipulating the text of previous lines and using that text in new
commands. The basic history manipulation commands are identical to the
- history substitution provided by bbaasshh.
+ history substitution provided by [1mbash[22m.
If the programmer desires, he can use the Readline library, which
includes some history manipulation by default, and has the added advan-
@@ -143,17 +142,17 @@ PPRROOGGRRAAMMMMIINNGG WWIITTHH HHIISSTTOORRYY FFUUNNC
Before declaring any functions using any functionality the History
library provides in other code, an application writer should include
- the file _<_r_e_a_d_l_i_n_e_/_h_i_s_t_o_r_y_._h_> in any file that uses the History
+ the file [4m[24m in any file that uses the History
library's features. It supplies extern declarations for all of the
library's public functions and variables, and declares all of the pub-
lic data structures.
- HHiissttoorryy SSttoorraaggee
+ [1mHistory Storage[0m
The history list is an array of history entries. A history entry is
declared as follows:
- _t_y_p_e_d_e_f _v_o_i_d _* hhiissttddaattaa__tt;;
+ [4mtypedef[24m [4mvoid[24m [4m*[24m [1mhistdata_t;[0m
typedef struct _hist_entry {
char *line;
@@ -163,7 +162,7 @@ PPRROOGGRRAAMMMMIINNGG WWIITTHH HHIISSTTOORRYY FFUUNNC
The history list itself might therefore be declared as
- _H_I_S_T___E_N_T_R_Y _*_* tthhee__hhiissttoorryy__lliisstt;;
+ [4mHIST_ENTRY[24m [4m**[24m [1mthe_history_list;[0m
The state of the History library is encapsulated into a single struc-
ture:
@@ -179,192 +178,193 @@ PPRROOGGRRAAMMMMIINNGG WWIITTHH HHIISSTTOORRYY FFUUNNC
int flags;
} HISTORY_STATE;
- If the flags member includes HHSS__SSTTIIFFLLEEDD, the history has been stifled.
+ If the flags member includes [1mHS_STIFLED[22m, the history has been stifled.
-HHiissttoorryy FFuunnccttiioonnss
- This section describes the calling sequence for the various functions
+[1mHistory Functions[0m
+ This section describes the calling sequence for the various functions
exported by the GNU History library.
- IInniittiiaalliizziinngg HHiissttoorryy aanndd SSttaattee MMaannaaggeemmeenntt
- This section describes functions used to initialize and manage the
+ [1mInitializing History and State Management[0m
+ This section describes functions used to initialize and manage the
state of the History library when you want to use the history functions
in your program.
- _v_o_i_d uussiinngg__hhiissttoorryy (_v_o_i_d)
- Begin a session in which the history functions might be used. This
+ [4mvoid[24m [1musing_history [22m([4mvoid[24m)
+ Begin a session in which the history functions might be used. This
initializes the interactive variables.
- _H_I_S_T_O_R_Y___S_T_A_T_E _* hhiissttoorryy__ggeett__hhiissttoorryy__ssttaattee (_v_o_i_d)
+ [4mHISTORY_STATE[24m [4m*[24m [1mhistory_get_history_state [22m([4mvoid[24m)
Return a structure describing the current state of the input history.
- _v_o_i_d hhiissttoorryy__sseett__hhiissttoorryy__ssttaattee (_H_I_S_T_O_R_Y___S_T_A_T_E _*_s_t_a_t_e)
- Set the state of the history list according to _s_t_a_t_e.
+ [4mvoid[24m [1mhistory_set_history_state [22m([4mHISTORY_STATE[24m [4m*state[24m)
+ Set the state of the history list according to [4mstate[24m.
- HHiissttoorryy LLiisstt MMaannaaggeemmeenntt
- These functions manage individual entries on the history list, or set
+ [1mHistory List Management[0m
+ These functions manage individual entries on the history list, or set
parameters managing the list itself.
- _v_o_i_d aadddd__hhiissttoorryy (_c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g)
- Place _s_t_r_i_n_g at the end of the history list. The associated data field
- (if any) is set to NNUULLLL.
+ [4mvoid[24m [1madd_history [22m([4mconst[24m [4mchar[24m [4m*string[24m)
+ Place [4mstring[24m at the end of the history list. The associated data field
+ (if any) is set to [1mNULL[22m.
- _v_o_i_d aadddd__hhiissttoorryy__ttiimmee (_c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g)
- Change the time stamp associated with the most recent history entry to
- _s_t_r_i_n_g.
+ [4mvoid[24m [1madd_history_time [22m([4mconst[24m [4mchar[24m [4m*string[24m)
+ Change the time stamp associated with the most recent history entry to
+ [4mstring[24m.
- _H_I_S_T___E_N_T_R_Y _* rreemmoovvee__hhiissttoorryy (_i_n_t _w_h_i_c_h)
- Remove history entry at offset _w_h_i_c_h from the history. The removed
- element is returned so you can free the line, data, and containing
+ [4mHIST_ENTRY[24m [4m*[24m [1mremove_history [22m([4mint[24m [4mwhich[24m)
+ Remove history entry at offset [4mwhich[24m from the history. The removed
+ element is returned so you can free the line, data, and containing
structure.
- _h_i_s_t_d_a_t_a___t ffrreeee__hhiissttoorryy__eennttrryy (_H_I_S_T___E_N_T_R_Y _*_h_i_s_t_e_n_t)
- Free the history entry _h_i_s_t_e_n_t and any history library private data
- associated with it. Returns the application-specific data so the
- caller can dispose of it.
+ [4mhistdata_t[24m [1mfree_history_entry [22m([4mHIST_ENTRY[24m [4m*histent[24m)
+ Free the history entry [4mhistent[24m and any history library private data
+ associated with it. Returns the application-specific data so the call-
+ er can dispose of it.
- _H_I_S_T___E_N_T_R_Y _* rreeppllaaccee__hhiissttoorryy__eennttrryy (_i_n_t _w_h_i_c_h_, _c_o_n_s_t _c_h_a_r _*_l_i_n_e_, _h_i_s_t_-
- _d_a_t_a___t _d_a_t_a)
- Make the history entry at offset _w_h_i_c_h have _l_i_n_e and _d_a_t_a. This
+ [4mHIST_ENTRY[24m [4m*[24m [1mreplace_history_entry [22m([4mint[24m [4mwhich,[24m [4mconst[24m [4mchar[24m [4m*line,[24m [4mhist-[0m
+ [4mdata_t[24m [4mdata[24m)
+ Make the history entry at offset [4mwhich[24m have [4mline[24m and [4mdata[24m. This
returns the old entry so the caller can dispose of any application-spe-
- cific data. In the case of an invalid _w_h_i_c_h, a NNUULLLL pointer is
+ cific data. In the case of an invalid [4mwhich[24m, a [1mNULL [22mpointer is
returned.
- _v_o_i_d cclleeaarr__hhiissttoorryy (_v_o_i_d)
+ [4mvoid[24m [1mclear_history [22m([4mvoid[24m)
Clear the history list by deleting all the entries.
- _v_o_i_d ssttiiffllee__hhiissttoorryy (_i_n_t _m_a_x)
- Stifle the history list, remembering only the last _m_a_x entries.
+ [4mvoid[24m [1mstifle_history [22m([4mint[24m [4mmax[24m)
+ Stifle the history list, remembering only the last [4mmax[24m entries.
- _i_n_t uunnssttiiffllee__hhiissttoorryy (_v_o_i_d)
- Stop stifling the history. This returns the previously-set maximum
- number of history entries (as set by ssttiiffllee__hhiissttoorryy(())). history was
+ [4mint[24m [1munstifle_history [22m([4mvoid[24m)
+ Stop stifling the history. This returns the previously-set maximum
+ number of history entries (as set by [1mstifle_history()[22m). history was
stifled. The value is positive if the history was stifled, negative if
it wasn't.
- _i_n_t hhiissttoorryy__iiss__ssttiifflleedd (_v_o_i_d)
+ [4mint[24m [1mhistory_is_stifled [22m([4mvoid[24m)
Returns non-zero if the history is stifled, zero if it is not.
- IInnffoorrmmaattiioonn AAbboouutt tthhee HHiissttoorryy LLiisstt
- These functions return information about the entire history list or
+ [1mInformation About the History List[0m
+ These functions return information about the entire history list or
individual list entries.
- _H_I_S_T___E_N_T_R_Y _*_* hhiissttoorryy__lliisstt (_v_o_i_d)
- Return a NNUULLLL terminated array of _H_I_S_T___E_N_T_R_Y _* which is the current
- input history. Element 0 of this list is the beginning of time. If
- there is no history, return NNUULLLL.
+ [4mHIST_ENTRY[24m [4m**[24m [1mhistory_list [22m([4mvoid[24m)
+ Return a [1mNULL [22mterminated array of [4mHIST_ENTRY[24m [4m*[24m which is the current
+ input history. Element 0 of this list is the beginning of time. If
+ there is no history, return [1mNULL[22m.
- _i_n_t wwhheerree__hhiissttoorryy (_v_o_i_d)
+ [4mint[24m [1mwhere_history [22m([4mvoid[24m)
Returns the offset of the current history element.
- _H_I_S_T___E_N_T_R_Y _* ccuurrrreenntt__hhiissttoorryy (_v_o_i_d)
- Return the history entry at the current position, as determined by
- wwhheerree__hhiissttoorryy(()). If there is no entry there, return a NNUULLLL pointer.
+ [4mHIST_ENTRY[24m [4m*[24m [1mcurrent_history [22m([4mvoid[24m)
+ Return the history entry at the current position, as determined by
+ [1mwhere_history()[22m. If there is no entry there, return a [1mNULL [22mpointer.
- _H_I_S_T___E_N_T_R_Y _* hhiissttoorryy__ggeett (_i_n_t _o_f_f_s_e_t)
- Return the history entry at position _o_f_f_s_e_t, starting from hhiiss--
- ttoorryy__bbaassee. If there is no entry there, or if _o_f_f_s_e_t is greater than
- the history length, return a NNUULLLL pointer.
+ [4mHIST_ENTRY[24m [4m*[24m [1mhistory_get [22m([4mint[24m [4moffset[24m)
+ Return the history entry at position [4moffset[24m, starting from [1mhis-[0m
+ [1mtory_base[22m. If there is no entry there, or if [4moffset[24m is greater than
+ the history length, return a [1mNULL [22mpointer.
- _t_i_m_e___t hhiissttoorryy__ggeett__ttiimmee (_H_I_S_T___E_N_T_R_Y _*)
- Return the time stamp associated with the history entry passed as the
+ [4mtime_t[24m [1mhistory_get_time [22m([4mHIST_ENTRY[24m [4m*[24m)
+ Return the time stamp associated with the history entry passed as the
argument.
- _i_n_t hhiissttoorryy__ttoottaall__bbyytteess (_v_o_i_d)
- Return the number of bytes that the primary history entries are using.
- This function returns the sum of the lengths of all the lines in the
+ [4mint[24m [1mhistory_total_bytes [22m([4mvoid[24m)
+ Return the number of bytes that the primary history entries are using.
+ This function returns the sum of the lengths of all the lines in the
history.
- MMoovviinngg AArroouunndd tthhee HHiissttoorryy LLiisstt
+ [1mMoving Around the History List[0m
These functions allow the current index into the history list to be set
or changed.
- _i_n_t hhiissttoorryy__sseett__ppooss (_i_n_t _p_o_s)
- Set the current history offset to _p_o_s, an absolute index into the list.
- Returns 1 on success, 0 if _p_o_s is less than zero or greater than the
+ [4mint[24m [1mhistory_set_pos [22m([4mint[24m [4mpos[24m)
+ Set the current history offset to [4mpos[24m, an absolute index into the list.
+ Returns 1 on success, 0 if [4mpos[24m is less than zero or greater than the
number of history entries.
- _H_I_S_T___E_N_T_R_Y _* pprreevviioouuss__hhiissttoorryy (_v_o_i_d)
- Back up the current history offset to the previous history entry, and
- return a pointer to that entry. If there is no previous entry, return
- a NNUULLLL pointer.
+ [4mHIST_ENTRY[24m [4m*[24m [1mprevious_history [22m([4mvoid[24m)
+ Back up the current history offset to the previous history entry, and
+ return a pointer to that entry. If there is no previous entry, return
+ a [1mNULL [22mpointer.
- _H_I_S_T___E_N_T_R_Y _* nneexxtt__hhiissttoorryy (_v_o_i_d)
- Move the current history offset forward to the next history entry, and
- return the a pointer to that entry. If there is no next entry, return
- a NNUULLLL pointer.
+ [4mHIST_ENTRY[24m [4m*[24m [1mnext_history [22m([4mvoid[24m)
+ If the current history offset refers to a valid history entry, incre-
+ ment the current history offset. If the possibly-incremented history
+ offset refers to a valid history entry, return a pointer to that entry;
+ otherwise, return a [1mNULL [22mpointer.
- SSeeaarrcchhiinngg tthhee HHiissttoorryy LLiisstt
+ [1mSearching the History List[0m
These functions allow searching of the history list for entries con-
taining a specific string. Searching may be performed both forward and
backward from the current history position. The search may be
- _a_n_c_h_o_r_e_d, meaning that the string must match at the beginning of the
+ [4manchored[24m, meaning that the string must match at the beginning of the
history entry.
- _i_n_t hhiissttoorryy__sseeaarrcchh (_c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g_, _i_n_t _d_i_r_e_c_t_i_o_n)
- Search the history for _s_t_r_i_n_g, starting at the current history offset.
- If _d_i_r_e_c_t_i_o_n is less than 0, then the search is through previous
- entries, otherwise through subsequent entries. If _s_t_r_i_n_g is found,
+ [4mint[24m [1mhistory_search [22m([4mconst[24m [4mchar[24m [4m*string,[24m [4mint[24m [4mdirection[24m)
+ Search the history for [4mstring[24m, starting at the current history offset.
+ If [4mdirection[24m is less than 0, then the search is through previous
+ entries, otherwise through subsequent entries. If [4mstring[24m is found,
then the current history index is set to that history entry, and the
- value returned is the offset in the line of the entry where _s_t_r_i_n_g was
+ value returned is the offset in the line of the entry where [4mstring[24m was
found. Otherwise, nothing is changed, and a -1 is returned.
- _i_n_t hhiissttoorryy__sseeaarrcchh__pprreeffiixx (_c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g_, _i_n_t _d_i_r_e_c_t_i_o_n)
- Search the history for _s_t_r_i_n_g, starting at the current history offset.
- The search is anchored: matching lines must begin with _s_t_r_i_n_g. If
- _d_i_r_e_c_t_i_o_n is less than 0, then the search is through previous entries,
- otherwise through subsequent entries. If _s_t_r_i_n_g is found, then the
+ [4mint[24m [1mhistory_search_prefix [22m([4mconst[24m [4mchar[24m [4m*string,[24m [4mint[24m [4mdirection[24m)
+ Search the history for [4mstring[24m, starting at the current history offset.
+ The search is anchored: matching lines must begin with [4mstring[24m. If
+ [4mdirection[24m is less than 0, then the search is through previous entries,
+ otherwise through subsequent entries. If [4mstring[24m is found, then the
current history index is set to that entry, and the return value is 0.
Otherwise, nothing is changed, and a -1 is returned.
- _i_n_t hhiissttoorryy__sseeaarrcchh__ppooss (_c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g_, _i_n_t _d_i_r_e_c_t_i_o_n_, _i_n_t _p_o_s)
- Search for _s_t_r_i_n_g in the history list, starting at _p_o_s, an absolute
- index into the list. If _d_i_r_e_c_t_i_o_n is negative, the search proceeds
- backward from _p_o_s, otherwise forward. Returns the absolute index of
- the history element where _s_t_r_i_n_g was found, or -1 otherwise.
+ [4mint[24m [1mhistory_search_pos [22m([4mconst[24m [4mchar[24m [4m*string,[24m [4mint[24m [4mdirection,[24m [4mint[24m [4mpos[24m)
+ Search for [4mstring[24m in the history list, starting at [4mpos[24m, an absolute
+ index into the list. If [4mdirection[24m is negative, the search proceeds
+ backward from [4mpos[24m, otherwise forward. Returns the absolute index of
+ the history element where [4mstring[24m was found, or -1 otherwise.
- MMaannaaggiinngg tthhee HHiissttoorryy FFiillee
+ [1mManaging the History File[0m
The History library can read the history from and write it to a file.
This section documents the functions for managing a history file.
- _i_n_t rreeaadd__hhiissttoorryy (_c_o_n_s_t _c_h_a_r _*_f_i_l_e_n_a_m_e)
- Add the contents of _f_i_l_e_n_a_m_e to the history list, a line at a time. If
- _f_i_l_e_n_a_m_e is NNUULLLL, then read from _~_/_._h_i_s_t_o_r_y. Returns 0 if successful,
- or eerrrrnnoo if not.
+ [4mint[24m [1mread_history [22m([4mconst[24m [4mchar[24m [4m*filename[24m)
+ Add the contents of [4mfilename[24m to the history list, a line at a time. If
+ [4mfilename[24m is [1mNULL[22m, then read from [4m~/.history[24m. Returns 0 if successful,
+ or [1merrno [22mif not.
- _i_n_t rreeaadd__hhiissttoorryy__rraannggee (_c_o_n_s_t _c_h_a_r _*_f_i_l_e_n_a_m_e_, _i_n_t _f_r_o_m_, _i_n_t _t_o)
- Read a range of lines from _f_i_l_e_n_a_m_e, adding them to the history list.
- Start reading at line _f_r_o_m and end at _t_o. If _f_r_o_m is zero, start at
- the beginning. If _t_o is less than _f_r_o_m, then read until the end of the
- file. If _f_i_l_e_n_a_m_e is NNUULLLL, then read from _~_/_._h_i_s_t_o_r_y. Returns 0 if
- successful, or eerrrrnnoo if not.
+ [4mint[24m [1mread_history_range [22m([4mconst[24m [4mchar[24m [4m*filename,[24m [4mint[24m [4mfrom,[24m [4mint[24m [4mto[24m)
+ Read a range of lines from [4mfilename[24m, adding them to the history list.
+ Start reading at line [4mfrom[24m and end at [4mto[24m. If [4mfrom[24m is zero, start at
+ the beginning. If [4mto[24m is less than [4mfrom[24m, then read until the end of the
+ file. If [4mfilename[24m is [1mNULL[22m, then read from [4m~/.history[24m. Returns 0 if
+ successful, or [1merrno [22mif not.
- _i_n_t wwrriittee__hhiissttoorryy (_c_o_n_s_t _c_h_a_r _*_f_i_l_e_n_a_m_e)
- Write the current history to _f_i_l_e_n_a_m_e, overwriting _f_i_l_e_n_a_m_e if neces-
- sary. If _f_i_l_e_n_a_m_e is NNUULLLL, then write the history list to _~_/_._h_i_s_t_o_r_y.
- Returns 0 on success, or eerrrrnnoo on a read or write error.
+ [4mint[24m [1mwrite_history [22m([4mconst[24m [4mchar[24m [4m*filename[24m)
+ Write the current history to [4mfilename[24m, overwriting [4mfilename[24m if neces-
+ sary. If [4mfilename[24m is [1mNULL[22m, then write the history list to [4m~/.history[24m.
+ Returns 0 on success, or [1merrno [22mon a read or write error.
- _i_n_t aappppeenndd__hhiissttoorryy (_i_n_t _n_e_l_e_m_e_n_t_s_, _c_o_n_s_t _c_h_a_r _*_f_i_l_e_n_a_m_e)
- Append the last _n_e_l_e_m_e_n_t_s of the history list to _f_i_l_e_n_a_m_e. If _f_i_l_e_n_a_m_e
- is NNUULLLL, then append to _~_/_._h_i_s_t_o_r_y. Returns 0 on success, or eerrrrnnoo on
+ [4mint[24m [1mappend_history [22m([4mint[24m [4mnelements,[24m [4mconst[24m [4mchar[24m [4m*filename[24m)
+ Append the last [4mnelements[24m of the history list to [4mfilename[24m. If [4mfilename[0m
+ is [1mNULL[22m, then append to [4m~/.history[24m. Returns 0 on success, or [1merrno [22mon
a read or write error.
- _i_n_t hhiissttoorryy__ttrruunnccaattee__ffiillee (_c_o_n_s_t _c_h_a_r _*_f_i_l_e_n_a_m_e_, _i_n_t _n_l_i_n_e_s)
- Truncate the history file _f_i_l_e_n_a_m_e, leaving only the last _n_l_i_n_e_s lines.
- If _f_i_l_e_n_a_m_e is NNUULLLL, then _~_/_._h_i_s_t_o_r_y is truncated. Returns 0 on suc-
- cess, or eerrrrnnoo on failure.
+ [4mint[24m [1mhistory_truncate_file [22m([4mconst[24m [4mchar[24m [4m*filename,[24m [4mint[24m [4mnlines[24m)
+ Truncate the history file [4mfilename[24m, leaving only the last [4mnlines[24m lines.
+ If [4mfilename[24m is [1mNULL[22m, then [4m~/.history[24m is truncated. Returns 0 on suc-
+ cess, or [1merrno [22mon failure.
- HHiissttoorryy EExxppaannssiioonn
+ [1mHistory Expansion[0m
These functions implement history expansion.
- _i_n_t hhiissttoorryy__eexxppaanndd (_c_h_a_r _*_s_t_r_i_n_g_, _c_h_a_r _*_*_o_u_t_p_u_t)
- Expand _s_t_r_i_n_g, placing the result into _o_u_t_p_u_t, a pointer to a string.
+ [4mint[24m [1mhistory_expand [22m([4mchar[24m [4m*string,[24m [4mchar[24m [4m**output[24m)
+ Expand [4mstring[24m, placing the result into [4moutput[24m, a pointer to a string.
Returns:
0 If no expansions took place (or, if the only change in
the text was the removal of escape characters preceding
@@ -372,123 +372,124 @@ HHiissttoorryy FFuunnccttiioonnss
1 if expansions did take place;
-1 if there was an error in expansion;
2 if the returned line should be displayed, but not exe-
- cuted, as with the ::pp modifier.
- If an error ocurred in expansion, then _o_u_t_p_u_t contains a descriptive
+ cuted, as with the [1m:p [22mmodifier.
+ If an error ocurred in expansion, then [4moutput[24m contains a descriptive
error message.
- _c_h_a_r _* ggeett__hhiissttoorryy__eevveenntt (_c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g_, _i_n_t _*_c_i_n_d_e_x_, _i_n_t _q_c_h_a_r)
- Returns the text of the history event beginning at _s_t_r_i_n_g + _*_c_i_n_d_e_x.
- _*_c_i_n_d_e_x is modified to point to after the event specifier. At function
- entry, _c_i_n_d_e_x points to the index into _s_t_r_i_n_g where the history event
- specification begins. _q_c_h_a_r is a character that is allowed to end the
+ [4mchar[24m [4m*[24m [1mget_history_event [22m([4mconst[24m [4mchar[24m [4m*string,[24m [4mint[24m [4m*cindex,[24m [4mint[24m [4mqchar[24m)
+ Returns the text of the history event beginning at [4mstring[24m + [4m*cindex[24m.
+ [4m*cindex[24m is modified to point to after the event specifier. At function
+ entry, [4mcindex[24m points to the index into [4mstring[24m where the history event
+ specification begins. [4mqchar[24m is a character that is allowed to end the
event specification in addition to the ``normal'' terminating charac-
ters.
- _c_h_a_r _*_* hhiissttoorryy__ttookkeenniizzee (_c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g)
- Return an array of tokens parsed out of _s_t_r_i_n_g, much as the shell
- might. The tokens are split on the characters in the hhiiss--
- ttoorryy__wwoorrdd__ddeelliimmiitteerrss variable, and shell quoting conventions are
+ [4mchar[24m [4m**[24m [1mhistory_tokenize [22m([4mconst[24m [4mchar[24m [4m*string[24m)
+ Return an array of tokens parsed out of [4mstring[24m, much as the shell
+ might. The tokens are split on the characters in the [1mhis-[0m
+ [1mtory_word_delimiters [22mvariable, and shell quoting conventions are
obeyed.
- _c_h_a_r _* hhiissttoorryy__aarrgg__eexxttrraacctt (_i_n_t _f_i_r_s_t_, _i_n_t _l_a_s_t_, _c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g)
- Extract a string segment consisting of the _f_i_r_s_t through _l_a_s_t arguments
- present in _s_t_r_i_n_g. Arguments are split using hhiissttoorryy__ttookkeenniizzee(()).
+ [4mchar[24m [4m*[24m [1mhistory_arg_extract [22m([4mint[24m [4mfirst,[24m [4mint[24m [4mlast,[24m [4mconst[24m [4mchar[24m [4m*string[24m)
+ Extract a string segment consisting of the [4mfirst[24m through [4mlast[24m arguments
+ present in [4mstring[24m. Arguments are split using [1mhistory_tokenize()[22m.
- HHiissttoorryy VVaarriiaabblleess
+ [1mHistory Variables[0m
This section describes the externally-visible variables exported by the
GNU History Library.
- _i_n_t hhiissttoorryy__bbaassee
+ [4mint[24m [1mhistory_base[0m
The logical offset of the first entry in the history list.
- _i_n_t hhiissttoorryy__lleennggtthh
+ [4mint[24m [1mhistory_length[0m
The number of entries currently stored in the history list.
- _i_n_t hhiissttoorryy__mmaaxx__eennttrriieess
- The maximum number of history entries. This must be changed using ssttii--
- ffllee__hhiissttoorryy(()).
+ [4mint[24m [1mhistory_max_entries[0m
+ The maximum number of history entries. This must be changed using [1msti-[0m
+ [1mfle_history()[22m.
- _i_n_t hhiissttoorryy__wwiittee__ttiimmeessttaammppss
+ [4mint[24m [1mhistory_wite_timestamps[0m
If non-zero, timestamps are written to the history file, so they can be
preserved between sessions. The default value is 0, meaning that time-
stamps are not saved. The current timestamp format uses the value of
- _h_i_s_t_o_r_y___c_o_m_m_e_n_t___c_h_a_r to delimit timestamp entries in the history file.
+ [4mhistory_comment_char[24m to delimit timestamp entries in the history file.
If that variable does not have a value (the default), timestamps will
not be written.
- _c_h_a_r hhiissttoorryy__eexxppaannssiioonn__cchhaarr
- The character that introduces a history event. The default is !!. Set-
+ [4mchar[24m [1mhistory_expansion_char[0m
+ The character that introduces a history event. The default is [1m![22m. Set-
ting this to 0 inhibits history expansion.
- _c_h_a_r hhiissttoorryy__ssuubbsstt__cchhaarr
+ [4mchar[24m [1mhistory_subst_char[0m
The character that invokes word substitution if found at the start of a
- line. The default is ^^.
+ line. The default is [1m^[22m.
- _c_h_a_r hhiissttoorryy__ccoommmmeenntt__cchhaarr
+ [4mchar[24m [1mhistory_comment_char[0m
During tokenization, if this character is seen as the first character
of a word, then it and all subsequent characters up to a newline are
ignored, suppressing history expansion for the remainder of the line.
This is disabled by default.
- _c_h_a_r _* hhiissttoorryy__wwoorrdd__ddeelliimmiitteerrss
- The characters that separate tokens for hhiissttoorryy__ttookkeenniizzee(()). The
- default value is "" \\tt\\nn(())<<>>;;&&||"".
+ [4mchar[24m [4m*[24m [1mhistory_word_delimiters[0m
+ The characters that separate tokens for [1mhistory_tokenize()[22m. The
+ default value is [1m" \t\n()<>;&|"[22m.
- _c_h_a_r _* hhiissttoorryy__nnoo__eexxppaanndd__cchhaarrss
+ [4mchar[24m [4m*[24m [1mhistory_no_expand_chars[0m
The list of characters which inhibit history expansion if found immedi-
- ately following hhiissttoorryy__eexxppaannssiioonn__cchhaarr. The default is space, tab,
- newline, \\rr, and ==.
+ ately following [1mhistory_expansion_char[22m. The default is space, tab,
+ newline, [1m\r[22m, and [1m=[22m.
- _c_h_a_r _* hhiissttoorryy__sseeaarrcchh__ddeelliimmiitteerr__cchhaarrss
+ [4mchar[24m [4m*[24m [1mhistory_search_delimiter_chars[0m
The list of additional characters which can delimit a history search
- string, in addition to space, tab, _: and _? in the case of a substring
+ string, in addition to space, tab, [4m:[24m and [4m?[24m in the case of a substring
search. The default is empty.
- _i_n_t hhiissttoorryy__qquuootteess__iinnhhiibbiitt__eexxppaannssiioonn
- If non-zero, single-quoted words are not scanned for the history expan-
- sion character. The default value is 0.
-
- _r_l___l_i_n_e_b_u_f___f_u_n_c___t _* hhiissttoorryy__iinnhhiibbiitt__eexxppaannssiioonn__ffuunnccttiioonn
- This should be set to the address of a function that takes two argu-
- ments: a cchhaarr ** (_s_t_r_i_n_g) and an iinntt index into that string (_i). It
- should return a non-zero value if the history expansion starting at
- _s_t_r_i_n_g_[_i_] should not be performed; zero if the expansion should be
- done. It is intended for use by applications like bbaasshh that use the
- history expansion character for additional purposes. By default, this
- variable is set to NNUULLLL.
-
-FFIILLEESS
- _~_/_._h_i_s_t_o_r_y
+ [4mint[24m [1mhistory_quotes_inhibit_expansion[0m
+ If non-zero, double-quoted words are not scanned for the history expan-
+ sion character or the history comment character. The default value is
+ 0.
+
+ [4mrl_linebuf_func_t[24m [4m*[24m [1mhistory_inhibit_expansion_function[0m
+ This should be set to the address of a function that takes two argu-
+ ments: a [1mchar * [22m([4mstring[24m) and an [1mint [22mindex into that string ([4mi[24m). It
+ should return a non-zero value if the history expansion starting at
+ [4mstring[i][24m should not be performed; zero if the expansion should be
+ done. It is intended for use by applications like [1mbash [22mthat use the
+ history expansion character for additional purposes. By default, this
+ variable is set to [1mNULL[22m.
+
+[1mFILES[0m
+ [4m~/.history[0m
Default filename for reading and writing saved history
-SSEEEE AALLSSOO
- _T_h_e _G_n_u _R_e_a_d_l_i_n_e _L_i_b_r_a_r_y, Brian Fox and Chet Ramey
- _T_h_e _G_n_u _H_i_s_t_o_r_y _L_i_b_r_a_r_y, Brian Fox and Chet Ramey
- _b_a_s_h(1)
- _r_e_a_d_l_i_n_e(3)
+[1mSEE ALSO[0m
+ [4mThe[24m [4mGnu[24m [4mReadline[24m [4mLibrary[24m, Brian Fox and Chet Ramey
+ [4mThe[24m [4mGnu[24m [4mHistory[24m [4mLibrary[24m, Brian Fox and Chet Ramey
+ [4mbash[24m(1)
+ [4mreadline[24m(3)
-AAUUTTHHOORRSS
+[1mAUTHORS[0m
Brian Fox, Free Software Foundation
bfox@gnu.org
Chet Ramey, Case Western Reserve University
chet.ramey@case.edu
-BBUUGG RREEPPOORRTTSS
- If you find a bug in the hhiissttoorryy library, you should report it. But
- first, you should make sure that it really is a bug, and that it
- appears in the latest version of the hhiissttoorryy library that you have.
+[1mBUG REPORTS[0m
+ If you find a bug in the [1mhistory [22mlibrary, you should report it. But
+ first, you should make sure that it really is a bug, and that it
+ appears in the latest version of the [1mhistory [22mlibrary that you have.
- Once you have determined that a bug actually exists, mail a bug report
- to _b_u_g_-_r_e_a_d_l_i_n_e@_g_n_u_._o_r_g. If you have a fix, you are welcome to mail
- that as well! Suggestions and `philosophical' bug reports may be
- mailed to _b_u_g_-_r_e_a_d_l_i_n_e@_g_n_u_._o_r_g or posted to the Usenet newsgroup
- ggnnuu..bbaasshh..bbuugg.
+ Once you have determined that a bug actually exists, mail a bug report
+ to [4mbug-readline[24m@[4mgnu.org[24m. If you have a fix, you are welcome to mail
+ that as well! Suggestions and `philosophical' bug reports may be
+ mailed to [4mbug-readline[24m@[4mgnu.org[24m or posted to the Usenet newsgroup
+ [1mgnu.bash.bug[22m.
Comments and bug reports concerning this manual page should be directed
- to _c_h_e_t_._r_a_m_e_y_@_c_a_s_e_._e_d_u.
+ to [4mchet.ramey@case.edu[24m.
-GNU History 6.3 2013 June 27 HISTORY(3)
+GNU History 6.3 2015 May 24 HISTORY(3)
diff --git a/doc/history.3 b/doc/history.3
index ada9a38..7ddc26a 100644
--- a/doc/history.3
+++ b/doc/history.3
@@ -6,9 +6,9 @@
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
-.\" Last Change: Thu Thu Jun 27 10:34:44 EDT 2013
+.\" Last Change: Sun May 24 18:01:17 EDT 2015
.\"
-.TH HISTORY 3 "2013 June 27" "GNU History 6.3"
+.TH HISTORY 3 "2015 May 24" "GNU History 6.3"
.\"
.\" File Name macro. This used to be `.PN', for Path Name,
.\" but Sun doesn't seem to like that very much.
@@ -40,8 +40,8 @@
.SH NAME
history \- GNU History Library
.SH COPYRIGHT
-.if t The GNU History Library is Copyright \(co 1989-2011 by the Free Software Foundation, Inc.
-.if n The GNU History Library is Copyright (C) 1989-2011 by the Free Software Foundation, Inc.
+.if t The GNU History Library is Copyright \(co 1989-2014 by the Free Software Foundation, Inc.
+.if n The GNU History Library is Copyright (C) 1989-2014 by the Free Software Foundation, Inc.
.SH DESCRIPTION
Many programs read input from the user a line at a time. The GNU
History library is able to keep track of those lines, associate arbitrary
@@ -134,7 +134,7 @@ The entire command line typed so far.
.SS Word Designators
.PP
Word designators are used to select desired words from the event.
-A
+A
.B :
separates the event specification from the word designator.
It may be omitted if the word designator begins with a
@@ -441,9 +441,11 @@ return a pointer to that entry. If there is no previous entry, return
a \fBNULL\fP pointer.
.Fn1 "HIST_ENTRY *" next_history "void"
-Move the current history offset forward to the next history entry, and
-return the a pointer to that entry. If there is no next entry, return
-a \fBNULL\fP pointer.
+If the current history offset refers to a valid history entry,
+increment the current history offset.
+If the possibly-incremented history offset refers to a valid history
+entry, return a pointer to that entry;
+otherwise, return a \fBNULL\fP pointer.
.SS Searching the History List
@@ -613,8 +615,8 @@ string, in addition to space, tab, \fI:\fP and \fI?\fP in the case of
a substring search. The default is empty.
.Vb int history_quotes_inhibit_expansion
-If non-zero, single-quoted words are not scanned for the history expansion
-character. The default value is 0.
+If non-zero, double-quoted words are not scanned for the history expansion
+character or the history comment character. The default value is 0.
.Vb "rl_linebuf_func_t *" history_inhibit_expansion_function
This should be set to the address of a function that takes two arguments:
diff --git a/doc/history.dvi b/doc/history.dvi
index 2316eae77699b6ee52c063304055a9f42ab95c8f..cc7924c6062a55a0952a875879bfd040bec5604e 100644
GIT binary patch
delta 3538
zc-oCueNaYts
z?)jbbJLlYc?tPDXy}#`Dvd@yH$`$EyMOsF3T5{@J1VI2e3SzmkC{V~5X!N&3MWx9V
z+^vjQG|0OL0tmvk2W;DUufW`D<*36=ixkPJ-TQ&z^SRL
z&5ioL;@cW?8>6!i$CzLv!)lD$hF*s4r>-`cS{SG-Dd(uGHF;Xrq&Hf7TeS^Fwb2Ua
zcOZSn$ZGXEhz8%S^!-uIrHrMmEG$$mnrJWlwd
zcto1E221jyag~aDrdFyOTA3bEC$DdU%k{dR=jID0Mh8u7cX#(Lcl7fl-luE>-=a8C
zpyyJV(PSu1qJauNh>-y~KXc9w;P>PEHX9ctRgTy4gL7#BZt~}2^l4p8?5xIW{f^?#m5_e^;u&VHlTJ
z4-UYcc^|<&`H5uA+lWXttjbUKJrt0VV&gI_4`E2bQlwH*z*2!<%i-mMD!=w0+-6}?
z;qS#^?cclR&2Xad2}Q4ugCjLjP+XiJHIZ#Nt|$-^=jTiw+nTHx&+f1f4#KM9K4`9-
z4e63aBA2MB
zL|+c?t_krU&(`Yp4i1_GUtXn`1ltcv=P8^Vry;kpL{-XR;uw<9f=&ZEF@uAAPFW=I
znCr*pT2wOnMYQ0EKdM>{$i!2q7E57zMV>o1J1UAOy37ZWn*}E-q6BMpH@TUWn0na^
zc(OhY_E(0wK>X>-5FoIYXanKXwGy{6N!2QG*sC^A;$E#fgi|jkLwewIqK5Wi}`&S3|ym5uPRof_oM!^A8K&dK5$dRm0>JBWY?$VSTh1B;^&J<@z
zCI@V=msjxrtzYO)6ra!_0c1w8P{2;js?AQZUfYNQa~>=lTYggyX(>Xi`$lkccE~x6_oAka
zO*;iHoGUeg2RY|;PJ*~lN&;ulU@yL{M;U8qwI;fa;e<1dZemb?ag-8xxWP%>U`!*u
znW_$PX4d6Njnglf);g^jG0N1UHbG|8Z4&7d1
zTUG9wERv_l7jr(1^UD~uQDg5JZNa7X;%_we1B&h#MzuBn7$K-Rr8*G
ze8s%Z(-P`C`~#3aQfpBgF#=jTE>S_YF_^RAZ|H)cEeiCXYe_@@uUmBJCU|H$LSb+C
zY%4bU!VA`yB7ygdokxkl1e4
z@iZ{KxX3;|i<-(0@zDv8SBPlNc``-%PKe?q--
z;LUp{Y@D?3&UkG$YIZ+}oobF{MIgkXp+T4zM_fF3W)lr!K$_@{uA#KMJIjZ)6qBd?uFRssq{ao#uip=1P)PRMk@^W1R9!!Qtv
zT%G>_D~o}{5CJ3!oM=lAMjZ0%BAj}zI$|H5x^rMhmjj`mCU8E=TCDFfn)j2kv)`Oc
z$Nh!_@ec(38Jy_;UvWT=_DGOK5l=pK9E=33rzGoHB*=^*97i7ET6oCSJst!HVET0$v<*41eJxh`
zgCFO!aCn=i4v5Xpx}T=GCU2qnKd>rCrB&ga-(?C-z})Y{aRI!0$QY8lq9
zzK)ID@Z&^tPP>fMB!g%#4lMpNUf}~d(f98{m+^1cV*(H#IZhM+I?{&-pZ?7+d>Ms=PfYu5GJ!s|LSz#^bF8L&2Rn)iL6U<+fakK
zmd8R-T1#hNGQ(TU9E-5(3`oXzmup(3<$+w|zAFba-aM?!~ewPLNYTFxW9chQw
z!|_I6_`$Q_65zk&
z`2SerwG)3BQZTn)>jl4#z`vZcFF#>4hvCLx-}w5aAb!o}-;Xj{uYe+``gZ`1oMVc+
z(`relUBPp8yj73;h_m5tGz;~l`MWwlq)tC6^{nsLQNQ14_3n)09*G^S&bIAohomcN
zodtFYS=I==lxNL&4ZyKG@KhH#mzj3$!tbAUKiA)H&VQ(SrnNttOmrLtt+UE{Eln!%
zg}#n~;Dr6Z!2M_ZFI)YAA+<-n;-&M6S21aj&8#$Ya9eDv92K=|W&L%{_g@%%@uB`4
zxqad&$;Hjengz4I!F&fP!Z=#4U5}nMqDnz8Flf1+#nY{kk;=`P#)AF7V`
zk8;YpSP*xX;Y%M6sx96g{Jj41VEO*+Jl?I~D%7@&*RCwv56dhu~1j
z=y?N%qTVWF;g<&>e$JJE<(iqdFxbKM=Xv3nE9Da@Nn=1*Y;ItnqA%_{A^a)q8$1x^
zt{4Sj9t^RLeOzVF*>+_n|TCX1T(rEog4{tg$Sgp;%MPMxV7D?_Ecj4TXx8x+5$!2f$
zPPvRDr^nQ(!f#93NYA0!Z}wt^8k8TH2@as9357s|h5{y1gO$h@m;r7P4+P#1LZbiR
znpI+%DjI-KMSbveGCUAsp_BGcb3Pqrq&IcpDQ}H>Q^$yt#{~mWic%xC1%J9)B0ZJd
zF%kyi(D8_wSjxX67E^dA96uXS$@SQZHGmOcns7J>4-dt&6s3NYm?jn^ZlS5U8TdLD
zO)<>`*)CHDl4sJB&sT^M(<(t|{5}70TicjY2Iz>hyTk*jsg%+Yan>QeKV!LkrJl8K
zH1+B9JfQ5skI>W%4s@e!8Mi9QI~z2VaU>Ae<^0wml%rmV#M!f{>xW%tpd@tyx=)>l
zn$?l$Wpy1L*)|R7GH(v4KjV^&c4Y1kjVt`AZSzpmH&qblb3lb2oSrRbNf|up!
zElsD=5%XLmzMY8dTCIHhCGGC?fzlAXD!6&;c{M
z9q+s)(OYtldPLopHzQLrYYcme%BxnA#l_8pExjIhF=_uU9?FXcE{R=4;)ioGqJ5bq
zU1HkY6#y(j{j(RKKjxRpPy`k%qhm~UvMVa|i-L(noZV$$SHU{;bn#R)v?vHoy*|dt
zB^F#i5n#JbCd@Y-T{NoDUGpMki6aZ*(7t(jp>dNsJ&4Wg!BW)d`S}xN3GdFI0^AJ6
zE?J4__j4kVurOMFv~A&6-qwh}F3bdIgLWz!xFPAfOM^;+327EZqmwylh+Pyk9x-eu
zIl^v30}Q(pkNxP_qC#0?%;KY?EdOY6C++2Df`t)knm7v#XzM(a=4D!wefbITSkZN|
zQ+*|ofLissJEK>W-e{E`aAxC~S@L^J^;eJdFXwRNS`f2CS)?I5A44~Y~dP7{#fXar`xQr1po)MaP774R4xt=VBuv%g*
zXO`43ynKEy)awP02()cMv{I73za%}(5$7tPxcI1+_5nI}MT
zq-ATUG47+JWfR4x%R?!YTb>)^hSHZVRf$cspziW$ae2ipAk^D}XI2IQ-x)TvItHDp
zd(M#)&(i4n*=;7*P%AN^TT2#9}3)e@q
zJ`ewYbv^5>lKHnhMibS*kcPr*Vl|`HVp%BNBJg#?UG(OgHj;ejjTWTmai(&@PK!a$vW$@=@=nwn
zJ}p8m=VMhpLo5*arhbaLdy5>6RAjeI2G!y|%i#d3{c*3mO7ZcwSeimFqGSJBik_Mf
z11iPAJ6A$u}h
zQPgL(()ICyFT-e{AcAhi%Cm+`!K9*-pIqOn2*y2_eC(kzG+G)2L6bFDB*L?YC{Tn}
zo-4)wyUyi+BJquLnG_Ae4cmu6JW4!24P6KbCOx(6{LEN~A+Ef=-SOumZ@U)NxE5U8
zkG7uAqU~YX;-T}&U}Dg`&wKN1j)cjPGEtGO8=bq5sDxm{E>v;xLOxXOUfZj&*_@Id
zRt)zK4OW-h9Fq>-=KR%L?>Y^Lu3}oYADl}*iLlsJWn#s}1dtY#AAs3=BIloQl6zCT
zKXp;O9z~RmgFz#&^^zC;5-Hj>5=+~;P2^D^4C+1ZXV017g|
zf%WIw+jo84xJl!2cU<73(vO$*Mq`bv*dFl;HY^^Xq4TQgFsSgp-W=QBkO#W_2x|m$
zBi^NLPr>SkQ((}GCorWWwG4Z(M`kE>F}R5Jd|eH$
z*5tD+2%dcu^ZX6_@bP-g)8huxMO>@5Fc2K$u&Wb*3I>C8OxE3Ti~^H!j+rAc_p2#T
z)%i;AToQ)P(cDso7~SBiWN^DXUZ%kmTJh?~nEgNk47%8Z*?r8!{&~mxIw{tY~qIC-T-jtq!e0wfQY8|PG(>VO|T&zSJ03QWEevmA+ns%3eYr6=T`nR4AI
z)5X(1VeIx36J(`&jsz5K|UYb}C=kjugp$-=pQlmd4B})c)U}@DOqD8XVbE~5t6$exyasti=;DpnjBTtSf
z0u^z?OvjC3AbQc5AJ>lkE%ES}ANUSSA1y~mkGYoVcq0sCP8j2x){cu|;Dl=FKI$a-
F`wx}(8~OkM
diff --git a/doc/history.html b/doc/history.html
index 0753504..6af5600 100644
--- a/doc/history.html
+++ b/doc/history.html
@@ -1,6 +1,6 @@
-
+
+
-
+
beginning-of-line (C-a)
--
+
-
Move to the start of the current line.
-
+
end-of-line (C-e)
--
+
-
Move to the end of the line.
-
+
forward-char (C-f)
--
+
-
Move forward a character.
-
+
backward-char (C-b)
--
+
-
Move back a character.
-
+
forward-word (M-f)
--
+
-
Move forward to the end of the next word.
Words are composed of letters and digits.
-
+
backward-word (M-b)
--
+
-
Move back to the start of the current or previous word.
Words are composed of letters and digits.
-
+
clear-screen (C-l)
--
+
-
Clear the screen and redraw the current line,
leaving the current line at the top of the screen.
-
+
redraw-current-line ()
--
+
-
Refresh the current line. By default, this is unbound.
@@ -1385,9 +1457,9 @@ Refresh the current line. By default, this is unbound.
-
+
accept-line (Newline or Return)
--
+
-
Accept the line regardless of where the cursor is.
If this line is
non-empty, it may be added to the history list for future recall with
@@ -1396,64 +1468,66 @@ If this line is a modified history line, the history line is restored
to its original state.
-
+
previous-history (C-p)
--
+
-
Move `back' through the history list, fetching the previous command.
-
+
next-history (C-n)
--
+
-
Move `forward' through the history list, fetching the next command.
-
+
beginning-of-history (M-<)
--
+
-
Move to the first line in the history.
-
+
end-of-history (M->)
--
+
-
Move to the end of the input history, i.e., the line currently
being entered.
-
+
reverse-search-history (C-r)
--
+
-
Search backward starting at the current line and moving `up' through
the history as necessary. This is an incremental search.
-
+
forward-search-history (C-s)
--
+
-
Search forward starting at the current line and moving `down' through
-the the history as necessary. This is an incremental search.
+the history as necessary. This is an incremental search.
-
+
non-incremental-reverse-search-history (M-p)
--
+
-
Search backward starting at the current line and moving `up'
through the history as necessary using a non-incremental search
for a string supplied by the user.
+The search string may match anywhere in a history line.
-
+
non-incremental-forward-search-history (M-n)
--
+
-
Search forward starting at the current line and moving `down'
-through the the history as necessary using a non-incremental search
+through the history as necessary using a non-incremental search
for a string supplied by the user.
+The search string may match anywhere in a history line.
-
+
history-search-forward ()
--
+
-
Search forward through the history for the string of characters
between the start of the current line and the point.
The search string must match at the beginning of a history line.
@@ -1461,9 +1535,9 @@ This is a non-incremental search.
By default, this command is unbound.
-
+
history-search-backward ()
--
+
-
Search backward through the history for the string of characters
between the start of the current line and the point.
The search string must match at the beginning of a history line.
@@ -1471,9 +1545,9 @@ This is a non-incremental search.
By default, this command is unbound.
-
+
history-substr-search-forward ()
--
+
-
Search forward through the history for the string of characters
between the start of the current line and the point.
The search string may match anywhere in a history line.
@@ -1481,9 +1555,9 @@ This is a non-incremental search.
By default, this command is unbound.
-
+
history-substr-search-backward ()
--
+
-
Search backward through the history for the string of characters
between the start of the current line and the point.
The search string may match anywhere in a history line.
@@ -1491,9 +1565,9 @@ This is a non-incremental search.
By default, this command is unbound.
-
+
yank-nth-arg (M-C-y)
--
+
-
Insert the first argument to the previous command (usually
the second word on the previous line) at point.
With an argument n,
@@ -1504,9 +1578,9 @@ Once the argument n is computed, the argument is extracted
as if the `!n' history expansion had been specified.
-
+
yank-last-arg (M-. or M-_)
--
+
-
Insert last argument to the previous command (the last word of the
previous history entry).
With a numeric argument, behave exactly like
yank-nth-arg.
@@ -1543,60 +1617,71 @@ as if the `!$' history expansion had been specified.
-
+
end-of-file (usually C-d)
--
+
-
The character indicating end-of-file as set, for example, by
stty. If this character is read when there are no characters
on the line, and point is at the beginning of the line, Readline
interprets it as the end of input and returns EOF.
-
+
delete-char (C-d)
--
+
-
Delete the character at point. If this function is bound to the
same character as the tty EOF character, as C-d
commonly is, see above for the effects.
-
+
backward-delete-char (Rubout)
--
+
-
Delete the character behind the cursor. A numeric argument means
to kill the characters instead of deleting them.
-
+
forward-backward-delete-char ()
--
+
-
Delete the character under the cursor, unless the cursor is at the
end of the line, in which case the character behind the cursor is
deleted. By default, this is not bound to a key.
-
+
quoted-insert (C-q or C-v)
--
+
-
Add the next character typed to the line verbatim. This is
how to insert key sequences like C-q, for example.
-
+
tab-insert (M-TAB)
--
+
-
Insert a tab character.
-
+
self-insert (a, b, A, 1, !, ...)
--
+
-
Insert yourself.
-
+
+
bracketed-paste-begin ()
+-
+This function is intended to be bound to the "bracketed paste" escape
+sequence sent by some terminals, and such a binding is assigned by default.
+It allows Readline to insert the pasted text as a single unit without treating
+each character as if it had been read from the keyboard. The characters
+are inserted as if each one was bound to
self-insert) instead of
+executing any editing commands.
+
+
+
transpose-chars (C-t)
--
+
-
Drag the character before the cursor forward over
the character at the cursor, moving the
cursor forward as well. If the insertion point
@@ -1605,39 +1690,39 @@ transposes the last two characters of the line.
Negative arguments have no effect.
-
+
transpose-words (M-t)
--
+
-
Drag the word before point past the word after point,
moving point past that word as well.
If the insertion point is at the end of the line, this transposes
the last two words on the line.
-
+
upcase-word (M-u)
--
+
-
Uppercase the current (or following) word. With a negative argument,
uppercase the previous word, but do not move the cursor.
-
+
downcase-word (M-l)
--
+
-
Lowercase the current (or following) word. With a negative argument,
lowercase the previous word, but do not move the cursor.
-
+
capitalize-word (M-c)
--
+
-
Capitalize the current (or following) word. With a negative argument,
capitalize the previous word, but do not move the cursor.
-
+
overwrite-mode ()
--
+
-
Toggle overwrite mode. With an explicit positive numeric argument,
switches to overwrite mode. With an explicit non-positive numeric
argument, switches to insert mode. This command affects only
@@ -1677,106 +1762,106 @@ By default, this command is unbound.
-
+
kill-line (C-k)
--
+
-
Kill the text from point to the end of the line.
-
+
backward-kill-line (C-x Rubout)
--
-Kill backward to the beginning of the line.
+
-
+Kill backward from the cursor to the beginning of the current line.
-
+
unix-line-discard (C-u)
--
+
-
Kill backward from the cursor to the beginning of the current line.
-
+
kill-whole-line ()
--
+
-
Kill all characters on the current line, no matter where point is.
By default, this is unbound.
-
+
kill-word (M-d)
--
+
-
Kill from point to the end of the current word, or if between
words, to the end of the next word.
Word boundaries are the same as
forward-word.
-
+
backward-kill-word (M-DEL)
--
+
-
Kill the word behind point.
Word boundaries are the same as
backward-word.
-
+
unix-word-rubout (C-w)
--
+
-
Kill the word behind point, using white space as a word boundary.
The killed text is saved on the kill-ring.
-
+
unix-filename-rubout ()
--
+
-
Kill the word behind point, using white space and the slash character
as the word boundaries.
The killed text is saved on the kill-ring.
-
+
delete-horizontal-space ()
--
+
-
Delete all spaces and tabs around point. By default, this is unbound.
-
+
kill-region ()
--
+
-
Kill the text in the current region.
By default, this command is unbound.
-
+
copy-region-as-kill ()
--
+
-
Copy the text in the region to the kill buffer, so it can be yanked
right away. By default, this command is unbound.
-
+
copy-backward-word ()
--
+
-
Copy the word before point to the kill buffer.
The word boundaries are the same as
backward-word.
By default, this command is unbound.
-
+
copy-forward-word ()
--
+
-
Copy the word following point to the kill buffer.
The word boundaries are the same as
forward-word.
By default, this command is unbound.
-
+
yank (C-y)
--
+
-
Yank the top of the kill ring into the buffer at point.
-
+
yank-pop (M-y)
--
+
-
Rotate the kill-ring, and yank the new top. You can only do this if
the prior command is
yank or yank-pop.
@@ -1800,23 +1885,23 @@ the prior command is yank or yank-pop.
-
+
digit-argument (M-0, M-1, ... M--)
--
+
-
Add this digit to the argument already accumulating, or start a new
argument. M-- starts a negative argument.
-
+
universal-argument ()
--
+
-
This is another way to specify an argument.
If this command is followed by one or more digits, optionally with a
leading minus sign, those digits define the argument.
If the command is followed by digits, executing
universal-argument
again ends the numeric argument, but is otherwise ignored.
As a special case, if this command is immediately followed by a
-character that is neither a digit or minus sign, the argument count
+character that is neither a digit nor minus sign, the argument count
for the next command is multiplied by four.
The argument count is initially one, so executing this function the
first time makes the argument count four, a second time makes the
@@ -1844,33 +1929,33 @@ By default, this is not bound to a key.
-
+
complete (TAB)
--
+
-
Attempt to perform completion on the text before point.
The actual completion performed is application-specific.
The default is filename completion.
-
+
possible-completions (M-?)
--
+
-
List the possible completions of the text before point.
When displaying completions, Readline sets the number of columns used
for display to the value of
completion-display-width, the value of
the environment variable COLUMNS, or the screen width, in that order.
-
+
insert-completions (M-*)
--
+
-
Insert all completions of the text before point that would have
been generated by
possible-completions.
-
+
menu-complete ()
--
+
-
Similar to
complete, but replaces the word to be completed
with a single match from the list of possible completions.
Repeated execution of menu-complete steps through the list
@@ -1885,17 +1970,17 @@ This command is intended to be bound to TAB, but is unbound
by default.
-
+
menu-complete-backward ()
--
+
-
Identical to
menu-complete, but moves backward through the list
of possible completions, as if menu-complete had been given a
negative argument.
-
+
delete-char-or-list ()
--
+
-
Deletes the character under the cursor if not at the beginning or
end of the line (like
delete-char).
If at the end of the line, behaves identically to
@@ -1924,29 +2009,29 @@ This command is unbound by default.
-
+
start-kbd-macro (C-x ()
--
+
-
Begin saving the characters typed into the current keyboard macro.
-
+
end-kbd-macro (C-x ))
--
+
-
Stop saving the characters typed into the current keyboard macro
and save the definition.
-
+
call-last-kbd-macro (C-x e)
--
+
-
Re-execute the last keyboard macro defined, by making the characters
in the macro appear as if typed at the keyboard.
-
+
print-last-kbd-macro ()
--
+
-
Print the last keboard macro defined in a format suitable for the
inputrc file.
@@ -1972,87 +2057,87 @@ Print the last keboard macro defined in a format suitable for the
-
+
re-read-init-file (C-x C-r)
--
+
-
Read in the contents of the inputrc file, and incorporate
any bindings or variable assignments found there.
-
+
abort (C-g)
--
+
-
Abort the current editing command and
ring the terminal's bell (subject to the setting of
bell-style).
-
+
do-uppercase-version (M-a, M-b, M-x, ...)
--
+
-
If the metafied character x is lowercase, run the command
that is bound to the corresponding uppercase character.
-
+
prefix-meta (ESC)
--
+
-
Metafy the next character typed. This is for keyboards
without a meta key. Typing `ESC f' is equivalent to typing
M-f.
-
+
undo (C-_ or C-x C-u)
--
+
-
Incremental undo, separately remembered for each line.
-
+
revert-line (M-r)
--
+
-
Undo all changes made to this line. This is like executing the
undo
command enough times to get back to the beginning.
-
+
tilde-expand (M-~)
--
+
-
Perform tilde expansion on the current word.
-
+
set-mark (C-@)
--
+
-
Set the mark to the point. If a
numeric argument is supplied, the mark is set to that position.
-
+
exchange-point-and-mark (C-x C-x)
--
+
-
Swap the point with the mark. The current cursor position is set to
the saved position, and the old cursor position is saved as the mark.
-
+
character-search (C-])
--
+
-
A character is read and point is moved to the next occurrence of that
character. A negative count searches for previous occurrences.
-
+
character-search-backward (M-C-])
--
+
-
A character is read and point is moved to the previous occurrence
of that character. A negative count searches for subsequent
occurrences.
-
+
skip-csi-sequence ()
--
+
-
Read enough characters to consume a multi-key sequence such as those
defined for keys like Home and End. Such sequences begin with a
Control Sequence Indicator (CSI), usually ESC-[. If this sequence is
@@ -2062,9 +2147,9 @@ stray characters into the editing buffer. This is unbound by default,
but usually bound to ESC-[.
-
+
insert-comment (M-#)
--
+
-
Without a numeric argument, the value of the
comment-begin
variable is inserted at the beginning of the current line.
If a numeric argument is supplied, this command acts as a toggle: if
@@ -2075,43 +2160,43 @@ the line.
In either case, the line is accepted as if a newline had been typed.
-
+
dump-functions ()
--
+
-
Print all of the functions and their key bindings to the
Readline output stream. If a numeric argument is supplied,
the output is formatted in such a way that it can be made part
of an inputrc file. This command is unbound by default.
-
+
dump-variables ()
--
+
-
Print all of the settable variables and their values to the
Readline output stream. If a numeric argument is supplied,
the output is formatted in such a way that it can be made part
of an inputrc file. This command is unbound by default.
-
+
dump-macros ()
--
+
-
Print all of the Readline key sequences bound to macros and the
strings they output. If a numeric argument is supplied,
the output is formatted in such a way that it can be made part
of an inputrc file. This command is unbound by default.
-
+
emacs-editing-mode (C-e)
--
+
-
When in
vi command mode, this causes a switch to emacs
editing mode.
-
+
vi-editing-mode (M-C-j)
--
+
-
When in
emacs editing mode, this causes a switch to vi
editing mode.
@@ -2162,7 +2247,7 @@ in the consistency of user interface across discrete programs that need
to provide a command line interface.
-Copyright (C) 1988--2014 Free Software Foundation, Inc.
+Copyright (C) 1988--2016 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
@@ -2246,8 +2331,8 @@ the simplest way possible, perhaps to replace calls in your code to
gets() or fgets().
-
-
+
+
The function readline() prints a prompt prompt
@@ -2537,7 +2622,7 @@ negative argument.
A command function should return 0 if its action completes successfully,
-and a non-zero value if some error occurs.
+and a value greater than zero if some error occurs.
This is the convention obeyed by all of the builtin Readline bindable
command functions.
@@ -2563,7 +2648,7 @@ command functions.
These variables are available to function writers.
-
+
- Variable: char * rl_line_buffer
- This is the line gathered so far. You are welcome to modify the
@@ -2573,7 +2658,7 @@ the memory allocated to
rl_line_buffer.
-
+
- Variable: int rl_point
- The offset of the current cursor position in
rl_line_buffer
@@ -2581,7 +2666,7 @@ the memory allocated to rl_line_buffer.
-
+
- Variable: int rl_end
- The number of characters present in
rl_line_buffer. When
@@ -2590,7 +2675,7 @@ the memory allocated to rl_line_buffer.
-
+
- Variable: int rl_mark
- The mark (saved position) in the current line. If set, the mark
@@ -2598,7 +2683,7 @@ and point define a region.
-
+
- Variable: int rl_done
- Setting this to a non-zero value causes Readline to return the current
@@ -2606,7 +2691,7 @@ line immediately.
-
+
- Variable: int rl_num_chars_to_read
- Setting this to a positive value before calling
readline() causes
@@ -2615,7 +2700,7 @@ than reading up to a character bound to accept-line.
-
+
- Variable: int rl_pending_input
- Setting this to a value makes it the next keystroke read. This is a
@@ -2623,7 +2708,7 @@ way to stuff a single character into the input stream.
-
+
- Variable: int rl_dispatching
- Set to a non-zero value if a function is being called from a key binding;
@@ -2632,7 +2717,7 @@ they were called directly or by Readline's dispatching mechanism.
-
+
- Variable: int rl_erase_empty_line
- Setting this to a non-zero value causes Readline to completely erase
@@ -2642,7 +2727,7 @@ the beginning of the newly-blank line.
-
+
- Variable: char * rl_prompt
- The prompt Readline uses. This is set from the argument to
@@ -2652,7 +2737,7 @@ be used to modify the prompt string after calling
readline().
-
+
- Variable: char * rl_display_prompt
- The string displayed as the prompt. This is usually identical to
@@ -2661,7 +2746,7 @@ use the prompt string as a message area, such as incremental search.
-
+
- Variable: int rl_already_prompted
- If an application wishes to display the prompt itself, rather than have
@@ -2674,14 +2759,14 @@ never sets it.
-
+
- Variable: const char * rl_library_version
- The version number of this revision of the library.
-
+
- Variable: int rl_readline_version
- An integer encoding the current version of the library. The encoding is
@@ -2692,7 +2777,7 @@ value 0x0402.
-
+
- Variable: int rl_gnu_readline_p
- Always set to 1, denoting that this is GNU readline rather than some
@@ -2700,7 +2785,7 @@ emulation.
-
+
- Variable: const char * rl_terminal_name
- The terminal type, used for initialization. If not set by the application,
@@ -2709,7 +2794,7 @@ the first time it is called.
-
+
- Variable: const char * rl_readline_name
- This variable is set to a unique name by each application using Readline.
@@ -2718,7 +2803,7 @@ The value allows conditional parsing of the inputrc file
-
+
- Variable: FILE * rl_instream
- The stdio stream from which Readline reads input.
@@ -2726,7 +2811,7 @@ If
NULL, Readline defaults to stdin.
-
+
- Variable: FILE * rl_outstream
- The stdio stream to which Readline performs output.
@@ -2734,7 +2819,7 @@ If
NULL, Readline defaults to stdout.
-
+
- Variable: int rl_prefer_env_winsize
- If non-zero, Readline gives values found in the
LINES and
@@ -2743,7 +2828,7 @@ from the kernel when computing the screen dimensions.
-
+
- Variable: rl_command_func_t * rl_last_func
- The address of the last command function Readline executed. May be used to
@@ -2752,7 +2837,7 @@ example.
-
+
- Variable: rl_hook_func_t * rl_startup_hook
- If non-zero, this is the address of a function to call just
@@ -2760,7 +2845,7 @@ before
readline prints the first prompt.
-
+
- Variable: rl_hook_func_t * rl_pre_input_hook
- If non-zero, this is the address of a function to call after
@@ -2769,7 +2854,7 @@ starts reading input characters.
-
+
- Variable: rl_hook_func_t * rl_event_hook
- If non-zero, this is the address of a function to call periodically
@@ -2779,7 +2864,7 @@ is no keyboard input.
-
+
- Variable: rl_getc_func_t * rl_getc_function
- If non-zero, Readline will call indirectly through this pointer
@@ -2791,7 +2876,7 @@ setting rl_input_available_hook as well.
-
+
- Variable: rl_hook_func_t * rl_signal_event_hook
- If non-zero, this is the address of a function to call if a read system
@@ -2799,7 +2884,7 @@ call is interrupted when Readline is reading terminal input.
-
+
- Variable: rl_hook_func_t * rl_input_available_hook
- If non-zero, Readline will use this function's return value when it needs
@@ -2824,7 +2909,7 @@ setting rl_input_available_hook as well.
-
+
- Variable: rl_voidfunc_t * rl_redisplay_function
- If non-zero, Readline will call indirectly through this pointer
@@ -2834,7 +2919,7 @@ redisplay function (see section 2.4.6 Redisplay
-
+
- Variable: rl_vintfunc_t * rl_prep_term_function
- If non-zero, Readline will call indirectly through this pointer
@@ -2845,7 +2930,7 @@ By default, this is set to
rl_prep_terminal
-
+
- Variable: rl_voidfunc_t * rl_deprep_term_function
- If non-zero, Readline will call indirectly through this pointer
@@ -2856,7 +2941,7 @@ By default, this is set to
rl_deprep_terminal
-
+
- Variable: Keymap rl_executing_keymap
- This variable is set to the keymap (see section 2.4.2 Selecting a Keymap) in which the
@@ -2864,7 +2949,7 @@ currently executing readline function was found.
-
+
- Variable: Keymap rl_binding_keymap
- This variable is set to the keymap (see section 2.4.2 Selecting a Keymap) in which the
@@ -2872,21 +2957,21 @@ last key binding occurred.
-
+
- Variable: char * rl_executing_macro
- This variable is set to the text of any currently-executing macro.
-
+
- Variable: int rl_executing_key
- The key that caused the dispatch to the currently-executing Readline function.
-
+
- Variable: char * rl_executing_keyseq
- The full key sequence that caused the dispatch to the currently-executing
@@ -2894,14 +2979,14 @@ Readline function.
-
+
- Variable: int rl_key_sequence_length
- The number of characters in rl_executing_keyseq.
-
+
- Variable: int rl_readline_state
- A variable with bit values that encapsulate the current Readline state.
@@ -2971,7 +3056,7 @@ and is about to return the line to the caller.
-
+
- Variable: int rl_explicit_arg
- Set to a non-zero value if an explicit numeric argument was specified by
@@ -2979,7 +3064,7 @@ the user. Only valid in a bindable command function.
-
+
- Variable: int rl_numeric_arg
- Set to the value of any numeric argument explicitly specified by the user
@@ -2988,7 +3073,7 @@ command function.
-
+
- Variable: int rl_editing_mode
- Set to a value denoting Readline's current editing mode. A value of
@@ -3067,7 +3152,7 @@ programmer, should bind the functions you write to descriptive names as
well. Readline provides a function for doing that:
-
+
- Function: int rl_add_defun (const char *name, rl_command_func_t *function, int key)
- Add name to the list of named functions. Make function be
@@ -3107,7 +3192,7 @@ get run. You can make your own keymaps, copy existing keymaps, and tell
Readline which keymap to use.
-
+
- Function: Keymap rl_make_bare_keymap (void)
- Returns a new, empty keymap. The space for the keymap is allocated with
@@ -3116,14 +3201,14 @@ Readline which keymap to use.
-
+
- Function: Keymap rl_copy_keymap (Keymap map)
- Return a new keymap which is a copy of map.
-
+
- Function: Keymap rl_make_keymap (void)
- Return a new keymap with the printing characters bound to rl_insert,
@@ -3132,7 +3217,7 @@ the Meta digits bound to produce numeric arguments.
-
+
- Function: void rl_discard_keymap (Keymap keymap)
- Free the storage associated with the data in keymap.
@@ -3140,7 +3225,7 @@ The caller should free keymap.
-
+
- Function: void rl_free_keymap (Keymap keymap)
- Free all storage associated with keymap. This calls
@@ -3152,21 +3237,21 @@ Readline has several internal keymaps. These functions allow you to
change which keymap is active.
-
+
- Function: Keymap rl_get_keymap (void)
- Returns the currently active keymap.
-
+
- Function: void rl_set_keymap (Keymap keymap)
- Makes keymap the currently active keymap.
-
+
- Function: Keymap rl_get_keymap_by_name (const char *name)
- Return the keymap matching name. name is one which would
@@ -3174,7 +3259,7 @@ be supplied in a
set keymap inputrc line (see section
+
- Function: char * rl_get_keymap_name (Keymap keymap)
- Return the name matching keymap. name is one which would
@@ -3219,7 +3304,7 @@ initialization function assigned to the
rl_startup_hook variable
These functions manage key bindings.
-
+
- Function: int rl_bind_key (int key, rl_command_func_t *function)
- Binds key to function in the currently active keymap.
@@ -3227,7 +3312,7 @@ Returns non-zero in the case of an invalid key.
-
+
- Function: int rl_bind_key_in_map (int key, rl_command_func_t *function, Keymap map)
- Bind key to function in map.
@@ -3235,7 +3320,7 @@ Returns non-zero in the case of an invalid key.
-
+
- Function: int rl_bind_key_if_unbound (int key, rl_command_func_t *function)
- Binds key to function if it is not already bound in the
@@ -3245,7 +3330,7 @@ already bound.
-
+
- Function: int rl_bind_key_if_unbound_in_map (int key, rl_command_func_t *function, Keymap map)
- Binds key to function if it is not already bound in map.
@@ -3254,7 +3339,7 @@ already bound.
-
+
- Function: int rl_unbind_key (int key)
- Bind key to the null function in the currently active keymap.
@@ -3262,7 +3347,7 @@ Returns non-zero in case of error.
-
+
- Function: int rl_unbind_key_in_map (int key, Keymap map)
- Bind key to the null function in map.
@@ -3270,21 +3355,21 @@ Returns non-zero in case of error.
-
+
- Function: int rl_unbind_function_in_map (rl_command_func_t *function, Keymap map)
- Unbind all keys that execute function in map.
-
+
- Function: int rl_unbind_command_in_map (const char *command, Keymap map)
- Unbind all keys that are bound to command in map.
-
+
- Function: int rl_bind_keyseq (const char *keyseq, rl_command_func_t *function)
- Bind the key sequence represented by the string keyseq to the function
@@ -3294,7 +3379,7 @@ The return value is non-zero if keyseq is invalid.
-
+
- Function: int rl_bind_keyseq_in_map (const char *keyseq, rl_command_func_t *function, Keymap map)
- Bind the key sequence represented by the string keyseq to the function
@@ -3304,14 +3389,14 @@ The return value is non-zero if keyseq is invalid.
-
+
- Function: int rl_set_key (const char *keyseq, rl_command_func_t *function, Keymap map)
- Equivalent to
rl_bind_keyseq_in_map.
-
+
- Function: int rl_bind_keyseq_if_unbound (const char *keyseq, rl_command_func_t *function)
- Binds keyseq to function if it is not already bound in the
@@ -3321,7 +3406,7 @@ already bound.
-
+
- Function: int rl_bind_keyseq_if_unbound_in_map (const char *keyseq, rl_command_func_t *function, Keymap map)
- Binds keyseq to function if it is not already bound in map.
@@ -3330,7 +3415,7 @@ already bound.
-
+
- Function: int rl_generic_bind (int type, const char *keyseq, char *data, Keymap map)
- Bind the key sequence represented by the string keyseq to the arbitrary
@@ -3341,7 +3426,7 @@ necessary. The initial keymap in which to do bindings is map.
-
+
- Function: int rl_parse_and_bind (char *line)
- Parse line as if it had been read from the
inputrc file and
@@ -3350,7 +3435,7 @@ perform any key bindings and variable assignments found
-
+
- Function: int rl_read_init_file (const char *filename)
- Read keybindings and variable assignments from filename
@@ -3381,14 +3466,14 @@ and the functions invoked by a particular key sequence. You may also
associate a new function name with an arbitrary function.
-
+
- Function: rl_command_func_t * rl_named_function (const char *name)
- Return the function with name name.
-
+
- Function: rl_command_func_t * rl_function_of_keyseq (const char *keyseq, Keymap map, int *type)
- Return the function invoked by keyseq in keymap map.
@@ -3398,7 +3483,7 @@ it points to (one of
ISFUNC, ISKMAP, or ISMACR
-
+
- Function: char ** rl_invoking_keyseqs (rl_command_func_t *function)
- Return an array of strings representing the key sequences used to
@@ -3406,7 +3491,7 @@ invoke function in the current keymap.
-
+
- Function: char ** rl_invoking_keyseqs_in_map (rl_command_func_t *function, Keymap map)
- Return an array of strings representing the key sequences used to
@@ -3414,7 +3499,7 @@ invoke function in the keymap map.
-
+
- Function: void rl_function_dumper (int readable)
- Print the readline function names and the key sequences currently
@@ -3424,14 +3509,14 @@ the list is formatted in such a way that it can be made part of an
-
+
- Function: void rl_list_funmap_names (void)
- Print the names of all bindable Readline functions to
rl_outstream.
-
+
- Function: const char ** rl_funmap_names (void)
- Return a NULL terminated array of known function names. The array is
@@ -3441,7 +3526,7 @@ should free the array, but not the pointers, using
free or
-
+
- Function: int rl_add_funmap_entry (const char *name, rl_command_func_t *function)
- Add name to the list of bindable Readline command names, and make
@@ -3496,7 +3581,7 @@ tells what to undo, not how to undo it.
UNDO_BEGIN and
rl_end_undo_group().
-
+
- Function: int rl_begin_undo_group (void)
- Begins saving undo information in a group construct. The undo
@@ -3506,7 +3591,7 @@ information usually comes from calls to
rl_insert_text() and
-
+
- Function: int rl_end_undo_group (void)
- Closes the current undo group started with
rl_begin_undo_group
@@ -3515,7 +3600,7 @@ for each call to rl_begin_undo_group().
-
+
- Function: void rl_add_undo (enum undo_code what, int start, int end, char *text)
- Remember how to undo an event (according to what). The affected
@@ -3523,14 +3608,14 @@ text runs from start to end, and encompasses text
-
+
- Function: void rl_free_undo_list (void)
- Free the existing undo list.
-
+
- Function: int rl_do_undo (void)
- Undo the first thing on the undo list. Returns
0 if there was
@@ -3544,7 +3629,7 @@ once, just before you modify the text. You must supply the indices of
the text range that you are going to modify.
-
+
- Function: int rl_modifying (int start, int end)
- Tell Readline to save the text between start and end as a
@@ -3571,7 +3656,7 @@ that text.
-
+
- Function: void rl_redisplay (void)
- Change what's displayed on the screen to reflect the current contents
@@ -3579,7 +3664,7 @@ of
rl_line_buffer.
-
+
- Function: int rl_forced_update_display (void)
- Force the line to be updated and redisplayed, whether or not
@@ -3587,7 +3672,7 @@ Readline thinks the screen display is correct.
-
+
- Function: int rl_on_new_line (void)
- Tell the update functions that we have moved onto a new (empty) line,
@@ -3595,7 +3680,7 @@ usually after outputting a newline.
-
+
- Function: int rl_on_new_line_with_prompt (void)
- Tell the update functions that we have moved onto a new line, with
@@ -3607,7 +3692,14 @@ It should be used after setting rl_already_prompted.
-
+
+
+- Function: int rl_clear_visible_line (void)
+
- Clear the screen lines corresponding to the current line's contents.
+
+
+
+
- Function: int rl_reset_line_state (void)
- Reset the display state to a clean state and redisplay the current line
@@ -3615,14 +3707,14 @@ starting on a new line.
-
+
- Function: int rl_crlf (void)
- Move the cursor to the start of the next screen line.
-
+
- Function: int rl_show_char (int c)
- Display character c on
rl_outstream.
@@ -3633,7 +3725,7 @@ redisplay.
-
+
- Function: int rl_message (const char *, ...)
- The arguments are a format string as would be supplied to
printf,
@@ -3646,7 +3738,7 @@ before calling this function.
-
+
- Function: int rl_clear_message (void)
- Clear the message in the echo area. If the prompt was saved with a call to
@@ -3655,7 +3747,7 @@ call
rl_restore_prompt before calling this function.
-
+
- Function: void rl_save_prompt (void)
- Save the local Readline prompt display state in preparation for
@@ -3663,7 +3755,7 @@ displaying a new message in the message area with
rl_message().
-
+
- Function: void rl_restore_prompt (void)
- Restore the local Readline prompt display state saved by the most
@@ -3674,7 +3766,7 @@ corresponding call to
rl_clear_message.
-
+
- Function: int rl_expand_prompt (char *prompt)
- Expand any special character sequences in prompt and set up the
@@ -3687,12 +3779,12 @@ It returns the number of visible characters on the last line of the
Applications may indicate that the prompt contains characters that take
up no physical screen space when displayed by bracketing a sequence of
such characters with the special markers
RL_PROMPT_START_IGNORE
-and RL_PROMPT_END_IGNORE (declared in `readline.h'. This may
+and RL_PROMPT_END_IGNORE (declared in `readline.h'). This may
be used to embed terminal-specific escape sequences in prompts.
-
+
- Function: int rl_set_prompt (const char *prompt)
- Make Readline use prompt for subsequent redisplay. This calls
@@ -3719,7 +3811,7 @@ to the result.
-
+
- Function: int rl_insert_text (const char *text)
- Insert text into the line at the current cursor position.
@@ -3727,7 +3819,7 @@ Returns the number of characters inserted.
-
+
- Function: int rl_delete_text (int start, int end)
- Delete the text between start and end in the current line.
@@ -3735,7 +3827,7 @@ Returns the number of characters deleted.
-
+
- Function: char * rl_copy_text (int start, int end)
- Return a copy of the text between start and end in
@@ -3743,7 +3835,7 @@ the current line.
-
+
- Function: int rl_kill_text (int start, int end)
- Copy the text between start and end in the current line
@@ -3755,7 +3847,7 @@ not a kill, a new kill ring slot is used.
-
+
- Function: int rl_push_macro_input (char *macro)
- Cause macro to be inserted into the line, as if it had been invoked
@@ -3782,7 +3874,7 @@ by a key bound to a macro. Not especially useful; use
-
+
- Function: int rl_read_key (void)
- Return the next character available from Readline's current input stream.
@@ -3794,7 +3886,7 @@ the
rl_event_hook variable.
-
+
- Function: int rl_getc (FILE *stream)
- Return the next character available from stream, which is assumed to
@@ -3802,7 +3894,7 @@ be the keyboard.
-
+
- Function: int rl_stuff_char (int c)
- Insert c into the Readline input stream. It will be "read"
@@ -3813,7 +3905,7 @@ before Readline attempts to read characters from the terminal with
-
+
- Function: int rl_execute_next (int c)
- Make c be the next command to be executed when
rl_read_key()
@@ -3821,7 +3913,7 @@ is called. This sets rl_pending_input.
-
+
- Function: int rl_clear_pending_input (void)
- Unset rl_pending_input, effectively negating the effect of any
@@ -3830,7 +3922,7 @@ pending input has not already been read with
rl_read_key().
-
+
- Function: int rl_set_keyboard_input_timeout (int u)
- While waiting for keyboard input in
rl_read_key(), Readline will
@@ -3860,7 +3952,7 @@ Returns the old timeout value.
-
+
- Function: void rl_prep_terminal (int meta_flag)
- Modify the terminal settings for Readline's use, so
readline()
@@ -3870,7 +3962,7 @@ read eight-bit input.
-
+
- Function: void rl_deprep_terminal (void)
- Undo the effects of
rl_prep_terminal(), leaving the terminal in
@@ -3879,7 +3971,7 @@ the state in which it was before the most recent call to
-
+
- Function: void rl_tty_set_default_bindings (Keymap kmap)
- Read the operating system's terminal editing characters (as would be
@@ -3888,7 +3980,7 @@ The bindings are performed in kmap.
-
+
- Function: void rl_tty_unset_default_bindings (Keymap kmap)
- Reset the bindings manipulated by
rl_tty_set_default_bindings so
@@ -3897,7 +3989,18 @@ The bindings are performed in kmap.
-
+
+
+- Function: int rl_tty_set_echoing (int value)
+
- Set Readline's idea of whether or not it is echoing output to its output
+stream (rl_outstream). If value is 0, Readline does not display
+output to rl_outstream; any other value enables output. The initial
+value is set when Readline initializes the terminal settings.
+This function returns the previous value.
+
+
+
+
- Function: int rl_reset_terminal (const char *terminal_name)
- Reinitialize Readline's idea of the terminal settings using
@@ -3925,7 +4028,7 @@ environment variable is used.
-
+
- Function: int rl_save_state (struct readline_state *sp)
- Save a snapshot of Readline's internal state to sp.
@@ -3935,7 +4038,7 @@ The caller is responsible for allocating the structure.
-
+
- Function: int rl_restore_state (struct readline_state *sp)
- Restore Readline's internal state to that stored in sp, which must
@@ -3946,7 +4049,7 @@ The caller is responsible for freeing the structure.
-
+
- Function: void rl_free (void *mem)
- Deallocate the memory pointed to by mem. mem must have been
@@ -3954,7 +4057,7 @@ allocated by
malloc.
-
+
- Function: void rl_replace_line (const char *text, int clear_undo)
- Replace the contents of
rl_line_buffer with text.
@@ -3964,7 +4067,7 @@ current line is cleared.
-
+
- Function: void rl_extend_line_buffer (int len)
- Ensure that
rl_line_buffer has enough space to hold len
@@ -3972,7 +4075,7 @@ characters, possibly reallocating it if necessary.
-
+
- Function: int rl_initialize (void)
- Initialize or re-initialize Readline's internal state.
@@ -3981,21 +4084,21 @@ reading any input.
-
+
- Function: int rl_ding (void)
- Ring the terminal bell, obeying the setting of
bell-style.
-
+
- Function: int rl_alphabetic (int c)
- Return 1 if c is an alphabetic character.
-
+
- Function: void rl_display_match_list (char **matches, int len, int max)
- A convenience function for displaying a list of strings in
@@ -4015,28 +4118,28 @@ The following are implemented as macros, defined in
chardefs.h.
Applications should refrain from using them.
-
+
- Function: int _rl_uppercase_p (int c)
- Return 1 if c is an uppercase alphabetic character.
-
+
- Function: int _rl_lowercase_p (int c)
- Return 1 if c is a lowercase alphabetic character.
-
+
- Function: int _rl_digit_p (int c)
- Return 1 if c is a numeric character.
-
+
- Function: int _rl_to_upper (int c)
- If c is a lowercase alphabetic character, return the corresponding
@@ -4044,7 +4147,7 @@ uppercase character.
-
+
- Function: int _rl_to_lower (int c)
- If c is an uppercase alphabetic character, return the corresponding
@@ -4052,7 +4155,7 @@ lowercase character.
-
+
- Function: int _rl_digit_value (int c)
- If c is a number, return the value it represents.
@@ -4077,7 +4180,7 @@ lowercase character.
-
+
- Function: int rl_macro_bind (const char *keyseq, const char *macro, Keymap map)
- Bind the key sequence keyseq to invoke the macro macro.
@@ -4087,7 +4190,7 @@ use
rl_generic_bind() instead.
-
+
- Function: void rl_macro_dumper (int readable)
- Print the key sequences bound to macros and their values, using
@@ -4097,7 +4200,7 @@ that it can be made part of an
inputrc file and re-read.
-
+
- Function: int rl_variable_bind (const char *variable, const char *value)
- Make the Readline variable variable have value.
@@ -4107,7 +4210,7 @@ file (see section 1.3.1 Readline Init File Syntax<
-
+
- Function: char * rl_variable_value (const char *variable)
- Return a string representing the value of the Readline variable variable.
@@ -4115,7 +4218,7 @@ For boolean variables, this string is either `on' or `off'
-
+
- Function: void rl_variable_dumper (int readable)
- Print the readline variable names and their current values
@@ -4125,7 +4228,7 @@ that it can be made part of an
inputrc file and re-read.
-
+
- Function: int rl_set_paren_blink_timeout (int u)
- Set the time interval (in microseconds) that Readline waits when showing
@@ -4133,7 +4236,7 @@ a balancing character when
blink-matching-paren has been enabled.
-
+
- Function: char * rl_get_termcap (const char *cap)
- Retrieve the string value of the termcap capability cap.
@@ -4145,7 +4248,7 @@ values for only those capabilities Readline uses.
-
+
- Function: void rl_clear_history (void)
- Clear the history list by deleting all of the entries, in the same manner
@@ -4181,7 +4284,7 @@ also be invoked as a `callback' function from an event loop. There
are functions available to make this easy.
-
+
- Function: void rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *lhandler)
- Set up the terminal for readline I/O and display the initial
@@ -4189,10 +4292,12 @@ expanded value of prompt. Save the value of lhandler to
use as a handler function to call when a complete line of input has been
entered.
The handler function receives the text of the line as an argument.
+As with
readline(), the handler function should free the
+line when it it finished with it.
-
+
- Function: void rl_callback_read_char (void)
- Whenever an application determines that keyboard input is available, it
@@ -4212,11 +4317,22 @@ the terminal settings are modified for Readline's use again.
-
+
+
+- Function: void rl_callback_sigcleanup (void)
+
- Clean up any internal state the callback interface uses to maintain state
+between calls to rl_callback_read_char (e.g., the state of any active
+incremental searches). This is intended to be used by applications that
+wish to perform their own signal handling; Readline's internal signal handler
+calls this when appropriate.
+
+
+
+
- Function: void rl_callback_handler_remove (void)
- Restore the terminal to its initial state and remove the line handler.
-This may be called from within a callback as well as independently.
+You may call this function from within a callback as well as independently.
If the lhandler installed by
rl_callback_handler_install
does not exit the program, either this function or the function referred
to by the value of rl_deprep_term_function should be called before
@@ -4332,12 +4448,16 @@ It understands the EOF character or "exit" to exit the program.
| | /* Standard include files. stdio.h is required. */
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
+#include <locale.h>
/* Used for select(2) */
#include <sys/types.h>
#include <sys/select.h>
+#include <signal.h>
+
#include <stdio.h>
/* Standard readline include files. */
@@ -4345,10 +4465,20 @@ It understands the EOF character or "exit" to exit the program.
#include <readline/history.h>
static void cb_linehandler (char *);
+static void sighandler (int);
int running;
+int sigwinch_received;
const char *prompt = "rltest$ ";
+/* Handle SIGWINCH and window size changes when readline is not active and
+ reading a character. */
+static void
+sighandler (int sig)
+{
+ sigwinch_received = 1;
+}
+
/* Callback function called for each line when accept-line executed, EOF
seen, or EOF character read. This sets a flag and returns; it could
also call exit(3). */
@@ -4383,6 +4513,13 @@ main (int c, char **v)
fd_set fds;
int r;
+ /* Set the default locale values according to environment variables. */
+ setlocale (LC_ALL, "");
+
+ /* Handle window size changes when readline is not active and reading
+ characters. */
+ signal (SIGWINCH, sighandler);
+
/* Install the line handler. */
rl_callback_handler_install (prompt, cb_linehandler);
@@ -4397,12 +4534,19 @@ main (int c, char **v)
FD_SET (fileno (rl_instream), &fds);
r = select (FD_SETSIZE, &fds, NULL, NULL, NULL);
- if (r < 0)
+ if (r < 0 && errno != EINTR)
{
perror ("rltest: select");
rl_callback_handler_remove ();
break;
}
+ if (sigwinch_received)
+ {
+ rl_resize_terminal ();
+ sigwinch_received = 0;
+ }
+ if (r < 0)
+ continue;
if (FD_ISSET (fileno (rl_instream), &fds))
rl_callback_read_char ();
@@ -4468,7 +4612,32 @@ resetting the terminal to its original state. If the application's signal
handler does more than update its idea of the terminal size and return (for
example, a longjmp back to a main processing loop), it must
call rl_cleanup_after_signal() (described below), to restore the
-terminal state.
+terminal state.
+
+
+When an application is using the callback interface
+(see section 2.4.12 Alternate Interface), Readline installs signal handlers only for
+the duration of the call to rl_callback_read_char. Applications
+using the callback interface should be prepared to clean up Readline's
+state if they wish to handle the signal before the line handler completes
+and restores the terminal state.
+
+
+If an application using the callback interface wishes to have Readline
+install its signal handlers at the time the application calls
+rl_callback_handler_install and remove them only when a complete
+line of input has been read, it should set the
+rl_persistent_signal_handlers variable to a non-zero value.
+This allows an application to defer all of the handling of the signals
+Readline catches to Readline.
+Applications should use this variable with care; it can result in Readline
+catching signals and not acting on them (or allowing the application to react
+to them) until the application calls rl_callback_read_char. This
+can result in an application becoming less responsive to keyboard signals
+like SIGINT.
+If an application does not want or need to perform any signal handling, or
+does not need to do any processing between calls to rl_callback_read_char,
+setting this variable may be desirable.
Readline provides two variables that allow application writers to
@@ -4478,7 +4647,7 @@ values of these variables only when calling readline(), not in
a signal handler, so Readline's internal signal state is not corrupted.
-
+
- Variable: int rl_catch_signals
- If this variable is non-zero, Readline will install signal handlers for
@@ -4490,7 +4659,7 @@ The default value of
rl_catch_signals is 1.
-
+
- Variable: int rl_catch_sigwinch
- If this variable is set to a non-zero value,
@@ -4501,7 +4670,20 @@ The default value of
rl_catch_sigwinch is 1.
-
+
+
+- Variable: int rl_persistent_signal_handlers
+
- If an application using the callback interface wishes Readline's signal
+handlers to be installed and active during the set of calls to
+
rl_callback_read_char that constitutes an entire single line,
+it should set this variable to a non-zero value.
+
+
+The default value of rl_persistent_signal_handlers is 0.
+
+
+
+
- Variable: int rl_change_environment
- If this variable is set to a non-zero value,
@@ -4521,7 +4703,15 @@ Readline provides convenience functions to do the necessary terminal
and internal state cleanup upon receipt of a signal.
-
+
+
+- Function: int rl_pending_signal (void)
+
- Return the signal number of the most recent signal Readline received but
+has not yet handled, or 0 if there is no pending signal.
+
+
+
+
- Function: void rl_cleanup_after_signal (void)
- This function will reset the state of the terminal to what it was before
@@ -4531,7 +4721,7 @@ all signals, depending on the values of
rl_catch_signals and
-
+
- Function: void rl_free_line_state (void)
- This will free any partial state associated with the current input line
@@ -4543,7 +4733,7 @@ current input line.
-
+
- Function: void rl_reset_after_signal (void)
- This will reinitialize the terminal and reinstall any Readline signal
@@ -4558,7 +4748,7 @@ Readline to update its idea of the terminal size when a
SIGWINCH
is received.
-
+
- Function: void rl_echo_signal_char (int sig)
- If an application wishes to install its own signal handlers, but still
@@ -4568,14 +4758,14 @@ function with sig set to
SIGINT, SIGQUIT, o
-
+
- Function: void rl_resize_terminal (void)
- Update Readline's internal screen size by reading values from the kernel.
-
+
- Function: void rl_set_screen_size (int rows, int cols)
- Set Readline's idea of the terminal size to rows rows and
@@ -4589,7 +4779,7 @@ is still interested in the screen dimensions, Readline's idea of the screen
size may be queried.
-
+
- Function: void rl_get_screen_size (int *rows, int *cols)
- Return Readline's idea of the terminal's size in the
@@ -4597,7 +4787,7 @@ variables pointed to by the arguments.
-
+
- Function: void rl_reset_screen_size (void)
- Cause Readline to reobtain the screen size and recalculate its dimensions.
@@ -4607,7 +4797,7 @@ variables pointed to by the arguments.
The following functions install and remove Readline's signal handlers.
-
+
- Function: int rl_set_signals (void)
- Install Readline's signal handler for
SIGINT, SIGQUIT,
@@ -4617,7 +4807,7 @@ The following functions install and remove Readline's signal handlers.
-
+
- Function: int rl_clear_signals (void)
- Remove all of the Readline signal handlers installed by
@@ -4730,7 +4920,7 @@ Such a generator function is referred to as an
-
+
- Function: int rl_complete (int ignore, int invoking_key)
- Complete the word at or before point. You have supplied the function
@@ -4739,7 +4929,7 @@ that does the initial simple matching selection algorithm (see
-
+
- Variable: rl_compentry_func_t * rl_completion_entry_function
- This is a pointer to the generator function for
@@ -4775,7 +4965,7 @@ Here is the complete list of callable completion functions present in
Readline.
-
+
- Function: int rl_complete_internal (int what_to_do)
- Complete the word at or before point. what_to_do says what to do
@@ -4789,7 +4979,7 @@ a common prefix.
-
+
- Function: int rl_complete (int ignore, int invoking_key)
- Complete the word at or before point. You have supplied the function
@@ -4801,7 +4991,7 @@ argument depending on invoking_key.
-
+
- Function: int rl_possible_completions (int count, int invoking_key)
- List the possible completions. See description of
rl_complete
@@ -4810,7 +5000,7 @@ argument depending on invoking_key.
-
+
- Function: int rl_insert_completions (int count, int invoking_key)
- Insert the list of possible completions into the line, deleting the
@@ -4819,7 +5009,7 @@ This calls
rl_complete_internal() with an argument of `*'
-
+
- Function: int rl_completion_mode (rl_command_func_t *cfunc)
- Returns the appropriate value to pass to
rl_complete_internal()
@@ -4831,7 +5021,7 @@ the same interface as rl_complete().
-
+
- Function: char ** rl_completion_matches (const char *text, rl_compentry_func_t *entry_func)
- Returns an array of strings which is a list of completions for
@@ -4849,7 +5039,7 @@ when there are no more matches.
-
+
- Function: char * rl_filename_completion_function (const char *text, int state)
- A generator function for filename completion in the general case.
@@ -4860,7 +5050,7 @@ Readline functions).
-
+
- Function: char * rl_username_completion_function (const char *text, int state)
- A completion generator for usernames. text contains a partial
@@ -4888,7 +5078,7 @@ for subsequent calls.
-
+
- Variable: rl_compentry_func_t * rl_completion_entry_function
- A pointer to the generator function for
rl_completion_matches().
@@ -4897,7 +5087,7 @@ the default filename completer.
-
+
- Variable: rl_completion_func_t * rl_attempted_completion_function
- A pointer to an alternative function to create matches.
@@ -4914,7 +5104,7 @@ completion even if this function returns no matches.
-
+
- Variable: rl_quote_func_t * rl_filename_quoting_function
- A pointer to a function that will quote a filename in an
@@ -4931,7 +5121,7 @@ to reset this character.
-
+
- Variable: rl_dequote_func_t * rl_filename_dequoting_function
- A pointer to a function that will remove application-specific quoting
@@ -4944,7 +5134,7 @@ that delimits the filename (usually `'' or `"'). If
-
+
- Variable: rl_linebuf_func_t * rl_char_is_quoted_p
- A pointer to a function to call that determines whether or not a specific
@@ -4957,7 +5147,7 @@ used to break words for the completer.
-
+
- Variable: rl_compignore_func_t * rl_ignore_some_completions_function
- This function, if defined, is called by the completer when real filename
@@ -4970,7 +5160,7 @@ from the array must be freed.
-
+
- Variable: rl_icppfunc_t * rl_directory_completion_hook
- This function, if defined, is allowed to modify the directory portion
@@ -4993,7 +5183,7 @@ The function should not modify the directory argument if it returns 0.
-
+
- Variable: rl_icppfunc_t * rl_directory_rewrite_hook;
- If non-zero, this is the address of a function to call when completing
@@ -5013,7 +5203,7 @@ The function should not modify the directory argument if it returns 0.
-
+
- Variable: rl_icppfunc_t * rl_filename_stat_hook
- If non-zero, this is the address of a function for the completer to
@@ -5029,7 +5219,7 @@ The function should not modify the directory argument if it returns 0.
-
+
- Variable: rl_dequote_func_t * rl_filename_rewrite_hook
- If non-zero, this is the address of a function called when reading
@@ -5048,7 +5238,7 @@ allocated string.
-
+
- Variable: rl_compdisp_func_t * rl_completion_display_matches_hook
- If non-zero, then this is the address of a function to call when
@@ -5060,12 +5250,12 @@ where matches is the array of matching strings,
num_matches is the number of strings in that array, and
max_length is the length of the longest string in that array.
Readline provides a convenience function,
rl_display_match_list,
-that takes care of doing the display to Readline's output stream. That
-function may be called from this hook.
+that takes care of doing the display to Readline's output stream.
+You may call that function from this hook.
-
+
- Variable: const char * rl_basic_word_break_characters
- The basic list of characters that signal a break between words for the
@@ -5075,14 +5265,14 @@ which break words for completion in Bash:
-
+
- Variable: const char * rl_basic_quote_characters
- A list of quote characters which can cause a word break.
-
+
- Variable: const char * rl_completer_word_break_characters
- The list of characters that signal a break between words for
@@ -5091,7 +5281,7 @@ which break words for completion in Bash:
-
+
- Variable: rl_cpvfunc_t * rl_completion_word_break_hook
- If non-zero, this is the address of a function to call when Readline is
@@ -5103,7 +5293,7 @@ returns
NULL, rl_completer_word_break_characters is us
-
+
- Variable: const char * rl_completer_quote_characters
- A list of characters which can be used to quote a substring of the line.
@@ -5113,7 +5303,7 @@ unless they also appear within this list.
-
+
- Variable: const char * rl_filename_quote_characters
- A list of characters that cause a filename to be quoted by the completer
@@ -5121,7 +5311,7 @@ when they appear in a completed filename. The default is the null string.
-
+
- Variable: const char * rl_special_prefixes
- The list of characters that are word break characters, but should be
@@ -5132,7 +5322,7 @@ shell variables and hostnames.
-
+
- Variable: int rl_completion_query_items
- Up to this many items will be displayed in response to a
@@ -5142,7 +5332,7 @@ indicates that Readline should never ask the user.
-
+
- Variable: int rl_completion_append_character
- When a single completion alternative matches at the end of the command
@@ -5155,7 +5345,7 @@ an application-specific command line syntax specification.
-
+
- Variable: int rl_completion_suppress_append
- If non-zero, rl_completion_append_character is not appended to
@@ -5165,7 +5355,7 @@ is called, and may only be changed within such a function.
-
+
- Variable: int rl_completion_quote_character
- When Readline is completing quoted text, as delimited by one of the
@@ -5175,7 +5365,7 @@ This is set before any application-specific completion function is called.
-
+
- Variable: int rl_completion_suppress_quote
- If non-zero, Readline does not append a matching quote character when
@@ -5185,7 +5375,7 @@ is called, and may only be changed within such a function.
-
+
- Variable: int rl_completion_found_quote
- When Readline is completing quoted text, it sets this variable
@@ -5195,7 +5385,7 @@ This is set before any application-specific completion function is called.
-
+
- Variable: int rl_completion_mark_symlink_dirs
- If non-zero, a slash will be appended to completed filenames that are
@@ -5210,7 +5400,7 @@ function modifies the value, the user's preferences are honored.
-
+
- Variable: int rl_ignore_completion_duplicates
- If non-zero, then duplicates in the matches are removed.
@@ -5218,7 +5408,7 @@ The default is 1.
-
+
- Variable: int rl_filename_completion_desired
- Non-zero means that the results of the matches are to be treated as
@@ -5232,7 +5422,7 @@ characters in
rl_filename_quote_characters and
-
+
- Variable: int rl_filename_quoting_desired
- Non-zero means that the results of the matches are to be quoted using
@@ -5246,7 +5436,7 @@ by
rl_filename_quoting_function.
-
+
- Variable: int rl_attempted_completion_over
- If an application-specific completion function assigned to
@@ -5257,7 +5447,7 @@ It should be set only by an application's completion function.
-
+
- Variable: int rl_sort_completion_matches
- If an application sets this variable to 0, Readline will not sort the
@@ -5269,7 +5459,7 @@ matches.
-
+
- Variable: int rl_completion_type
- Set to a character describing the type of completion Readline is currently
@@ -5281,7 +5471,7 @@ the same interface as
rl_complete().
-
+
- Variable: int rl_completion_invoking_key
- Set to the final character in the key sequence that invoked one of the
@@ -5291,7 +5481,7 @@ function is called.
-
+
- Variable: int rl_inhibit_completion
- If this variable is non-zero, completion is inhibited. The completion
@@ -6438,7 +6628,7 @@ to permit their use in free software.
| notation, readline | 1.2.1 Readline Bare Essentials |
|
| R | | |
- | readline, function | 2.1 Basic Behavior |
+ | readline, function | 2.1 Basic Behavior |
|
| V | | |
| variables, readline | 1.3.1 Readline Init File Syntax |
@@ -6530,433 +6720,447 @@ to permit their use in free software.
| Index Entry | Section |
|
| _ | | |
- | _rl_digit_p | 2.4.10 Utility Functions |
- | _rl_digit_value | 2.4.10 Utility Functions |
- | _rl_lowercase_p | 2.4.10 Utility Functions |
- | _rl_to_lower | 2.4.10 Utility Functions |
- | _rl_to_upper | 2.4.10 Utility Functions |
- | _rl_uppercase_p | 2.4.10 Utility Functions |
+ | _rl_digit_p | 2.4.10 Utility Functions |
+ | _rl_digit_value | 2.4.10 Utility Functions |
+ | _rl_lowercase_p | 2.4.10 Utility Functions |
+ | _rl_to_lower | 2.4.10 Utility Functions |
+ | _rl_to_upper | 2.4.10 Utility Functions |
+ | _rl_uppercase_p | 2.4.10 Utility Functions |
|
| A | | |
- | abort (C-g) | 1.4.8 Some Miscellaneous Commands |
- | abort (C-g) | 1.4.8 Some Miscellaneous Commands |
- | accept-line (Newline or Return) | 1.4.2 Commands For Manipulating The History |
- | accept-line (Newline or Return) | 1.4.2 Commands For Manipulating The History |
+ | abort (C-g) | 1.4.8 Some Miscellaneous Commands |
+ | abort (C-g) | 1.4.8 Some Miscellaneous Commands |
+ | accept-line (Newline or Return) | 1.4.2 Commands For Manipulating The History |
+ | accept-line (Newline or Return) | 1.4.2 Commands For Manipulating The History |
|
| B | | |
- | backward-char (C-b) | 1.4.1 Commands For Moving |
- | backward-char (C-b) | 1.4.1 Commands For Moving |
- | backward-delete-char (Rubout) | 1.4.3 Commands For Changing Text |
- | backward-delete-char (Rubout) | 1.4.3 Commands For Changing Text |
- | backward-kill-line (C-x Rubout) | 1.4.4 Killing And Yanking |
- | backward-kill-line (C-x Rubout) | 1.4.4 Killing And Yanking |
- | backward-kill-word (M-DEL) | 1.4.4 Killing And Yanking |
- | backward-kill-word (M-DEL) | 1.4.4 Killing And Yanking |
- | backward-word (M-b) | 1.4.1 Commands For Moving |
- | backward-word (M-b) | 1.4.1 Commands For Moving |
- | beginning-of-history (M-<) | 1.4.2 Commands For Manipulating The History |
- | beginning-of-history (M-<) | 1.4.2 Commands For Manipulating The History |
- | beginning-of-line (C-a) | 1.4.1 Commands For Moving |
- | beginning-of-line (C-a) | 1.4.1 Commands For Moving |
+ | backward-char (C-b) | 1.4.1 Commands For Moving |
+ | backward-char (C-b) | 1.4.1 Commands For Moving |
+ | backward-delete-char (Rubout) | 1.4.3 Commands For Changing Text |
+ | backward-delete-char (Rubout) | 1.4.3 Commands For Changing Text |
+ | backward-kill-line (C-x Rubout) | 1.4.4 Killing And Yanking |
+ | backward-kill-line (C-x Rubout) | 1.4.4 Killing And Yanking |
+ | backward-kill-word (M-DEL) | 1.4.4 Killing And Yanking |
+ | backward-kill-word (M-DEL) | 1.4.4 Killing And Yanking |
+ | backward-word (M-b) | 1.4.1 Commands For Moving |
+ | backward-word (M-b) | 1.4.1 Commands For Moving |
+ | beginning-of-history (M-<) | 1.4.2 Commands For Manipulating The History |
+ | beginning-of-history (M-<) | 1.4.2 Commands For Manipulating The History |
+ | beginning-of-line (C-a) | 1.4.1 Commands For Moving |
+ | beginning-of-line (C-a) | 1.4.1 Commands For Moving |
| bell-style | 1.3.1 Readline Init File Syntax |
| bind-tty-special-chars | 1.3.1 Readline Init File Syntax |
+ | blink-matching-paren | 1.3.1 Readline Init File Syntax |
+ | bracketed-paste-begin () | 1.4.3 Commands For Changing Text |
+ | bracketed-paste-begin () | 1.4.3 Commands For Changing Text |
|
| C | | |
- | call-last-kbd-macro (C-x e) | 1.4.7 Keyboard Macros |
- | call-last-kbd-macro (C-x e) | 1.4.7 Keyboard Macros |
- | capitalize-word (M-c) | 1.4.3 Commands For Changing Text |
- | capitalize-word (M-c) | 1.4.3 Commands For Changing Text |
- | character-search (C-]) | 1.4.8 Some Miscellaneous Commands |
- | character-search (C-]) | 1.4.8 Some Miscellaneous Commands |
- | character-search-backward (M-C-]) | 1.4.8 Some Miscellaneous Commands |
- | character-search-backward (M-C-]) | 1.4.8 Some Miscellaneous Commands |
- | clear-screen (C-l) | 1.4.1 Commands For Moving |
- | clear-screen (C-l) | 1.4.1 Commands For Moving |
- | colored-stats | 1.3.1 Readline Init File Syntax |
- | comment-begin | 1.3.1 Readline Init File Syntax |
- | complete (TAB) | 1.4.6 Letting Readline Type For You |
- | complete (TAB) | 1.4.6 Letting Readline Type For You |
- | completion-display-width | 1.3.1 Readline Init File Syntax |
- | completion-ignore-case | 1.3.1 Readline Init File Syntax |
- | completion-map-case | 1.3.1 Readline Init File Syntax |
- | completion-prefix-display-length | 1.3.1 Readline Init File Syntax |
- | completion-query-items | 1.3.1 Readline Init File Syntax |
- | convert-meta | 1.3.1 Readline Init File Syntax |
- | copy-backward-word () | 1.4.4 Killing And Yanking |
- | copy-backward-word () | 1.4.4 Killing And Yanking |
- | copy-forward-word () | 1.4.4 Killing And Yanking |
- | copy-forward-word () | 1.4.4 Killing And Yanking |
- | copy-region-as-kill () | 1.4.4 Killing And Yanking |
- | copy-region-as-kill () | 1.4.4 Killing And Yanking |
+ | call-last-kbd-macro (C-x e) | 1.4.7 Keyboard Macros |
+ | call-last-kbd-macro (C-x e) | 1.4.7 Keyboard Macros |
+ | capitalize-word (M-c) | 1.4.3 Commands For Changing Text |
+ | capitalize-word (M-c) | 1.4.3 Commands For Changing Text |
+ | character-search (C-]) | 1.4.8 Some Miscellaneous Commands |
+ | character-search (C-]) | 1.4.8 Some Miscellaneous Commands |
+ | character-search-backward (M-C-]) | 1.4.8 Some Miscellaneous Commands |
+ | character-search-backward (M-C-]) | 1.4.8 Some Miscellaneous Commands |
+ | clear-screen (C-l) | 1.4.1 Commands For Moving |
+ | clear-screen (C-l) | 1.4.1 Commands For Moving |
+ | colored-completion-prefix | 1.3.1 Readline Init File Syntax |
+ | colored-stats | 1.3.1 Readline Init File Syntax |
+ | comment-begin | 1.3.1 Readline Init File Syntax |
+ | complete (TAB) | 1.4.6 Letting Readline Type For You |
+ | complete (TAB) | 1.4.6 Letting Readline Type For You |
+ | completion-display-width | 1.3.1 Readline Init File Syntax |
+ | completion-ignore-case | 1.3.1 Readline Init File Syntax |
+ | completion-map-case | 1.3.1 Readline Init File Syntax |
+ | completion-prefix-display-length | 1.3.1 Readline Init File Syntax |
+ | completion-query-items | 1.3.1 Readline Init File Syntax |
+ | convert-meta | 1.3.1 Readline Init File Syntax |
+ | copy-backward-word () | 1.4.4 Killing And Yanking |
+ | copy-backward-word () | 1.4.4 Killing And Yanking |
+ | copy-forward-word () | 1.4.4 Killing And Yanking |
+ | copy-forward-word () | 1.4.4 Killing And Yanking |
+ | copy-region-as-kill () | 1.4.4 Killing And Yanking |
+ | copy-region-as-kill () | 1.4.4 Killing And Yanking |
|
| D | | |
- | delete-char (C-d) | 1.4.3 Commands For Changing Text |
- | delete-char (C-d) | 1.4.3 Commands For Changing Text |
- | delete-char-or-list () | 1.4.6 Letting Readline Type For You |
- | delete-char-or-list () | 1.4.6 Letting Readline Type For You |
- | delete-horizontal-space () | 1.4.4 Killing And Yanking |
- | delete-horizontal-space () | 1.4.4 Killing And Yanking |
- | digit-argument (M-0, M-1, <small>...</small> M--) | 1.4.5 Specifying Numeric Arguments |
- | digit-argument (M-0, M-1, <small>...</small> M--) | 1.4.5 Specifying Numeric Arguments |
- | disable-completion | 1.3.1 Readline Init File Syntax |
- | do-uppercase-version (M-a, M-b, M-x, <small>...</small>) | 1.4.8 Some Miscellaneous Commands |
- | do-uppercase-version (M-a, M-b, M-x, <small>...</small>) | 1.4.8 Some Miscellaneous Commands |
- | downcase-word (M-l) | 1.4.3 Commands For Changing Text |
- | downcase-word (M-l) | 1.4.3 Commands For Changing Text |
- | dump-functions () | 1.4.8 Some Miscellaneous Commands |
- | dump-functions () | 1.4.8 Some Miscellaneous Commands |
- | dump-macros () | 1.4.8 Some Miscellaneous Commands |
- | dump-macros () | 1.4.8 Some Miscellaneous Commands |
- | dump-variables () | 1.4.8 Some Miscellaneous Commands |
- | dump-variables () | 1.4.8 Some Miscellaneous Commands |
+ | delete-char (C-d) | 1.4.3 Commands For Changing Text |
+ | delete-char (C-d) | 1.4.3 Commands For Changing Text |
+ | delete-char-or-list () | 1.4.6 Letting Readline Type For You |
+ | delete-char-or-list () | 1.4.6 Letting Readline Type For You |
+ | delete-horizontal-space () | 1.4.4 Killing And Yanking |
+ | delete-horizontal-space () | 1.4.4 Killing And Yanking |
+ | digit-argument (M-0, M-1, <small>...</small> M--) | 1.4.5 Specifying Numeric Arguments |
+ | digit-argument (M-0, M-1, <small>...</small> M--) | 1.4.5 Specifying Numeric Arguments |
+ | disable-completion | 1.3.1 Readline Init File Syntax |
+ | do-uppercase-version (M-a, M-b, M-x, <small>...</small>) | 1.4.8 Some Miscellaneous Commands |
+ | do-uppercase-version (M-a, M-b, M-x, <small>...</small>) | 1.4.8 Some Miscellaneous Commands |
+ | downcase-word (M-l) | 1.4.3 Commands For Changing Text |
+ | downcase-word (M-l) | 1.4.3 Commands For Changing Text |
+ | dump-functions () | 1.4.8 Some Miscellaneous Commands |
+ | dump-functions () | 1.4.8 Some Miscellaneous Commands |
+ | dump-macros () | 1.4.8 Some Miscellaneous Commands |
+ | dump-macros () | 1.4.8 Some Miscellaneous Commands |
+ | dump-variables () | 1.4.8 Some Miscellaneous Commands |
+ | dump-variables () | 1.4.8 Some Miscellaneous Commands |
|
| E | | |
- | editing-mode | 1.3.1 Readline Init File Syntax |
- | emacs-editing-mode (C-e) | 1.4.8 Some Miscellaneous Commands |
- | emacs-editing-mode (C-e) | 1.4.8 Some Miscellaneous Commands |
- | enable-keypad | 1.3.1 Readline Init File Syntax |
- | end-kbd-macro (C-x )) | 1.4.7 Keyboard Macros |
- | end-kbd-macro (C-x )) | 1.4.7 Keyboard Macros |
- | end-of-file (usually C-d) | 1.4.3 Commands For Changing Text |
- | end-of-file (usually C-d) | 1.4.3 Commands For Changing Text |
- | end-of-history (M->) | 1.4.2 Commands For Manipulating The History |
- | end-of-history (M->) | 1.4.2 Commands For Manipulating The History |
- | end-of-line (C-e) | 1.4.1 Commands For Moving |
- | end-of-line (C-e) | 1.4.1 Commands For Moving |
- | exchange-point-and-mark (C-x C-x) | 1.4.8 Some Miscellaneous Commands |
- | exchange-point-and-mark (C-x C-x) | 1.4.8 Some Miscellaneous Commands |
- | expand-tilde | 1.3.1 Readline Init File Syntax |
+ | echo-control-characters | 1.3.1 Readline Init File Syntax |
+ | editing-mode | 1.3.1 Readline Init File Syntax |
+ | emacs-editing-mode (C-e) | 1.4.8 Some Miscellaneous Commands |
+ | emacs-editing-mode (C-e) | 1.4.8 Some Miscellaneous Commands |
+ | emacs-mode-string | 1.3.1 Readline Init File Syntax |
+ | enable-bracketed-paste | 1.3.1 Readline Init File Syntax |
+ | enable-keypad | 1.3.1 Readline Init File Syntax |
+ | end-kbd-macro (C-x )) | 1.4.7 Keyboard Macros |
+ | end-kbd-macro (C-x )) | 1.4.7 Keyboard Macros |
+ | end-of-file (usually C-d) | 1.4.3 Commands For Changing Text |
+ | end-of-file (usually C-d) | 1.4.3 Commands For Changing Text |
+ | end-of-history (M->) | 1.4.2 Commands For Manipulating The History |
+ | end-of-history (M->) | 1.4.2 Commands For Manipulating The History |
+ | end-of-line (C-e) | 1.4.1 Commands For Moving |
+ | end-of-line (C-e) | 1.4.1 Commands For Moving |
+ | exchange-point-and-mark (C-x C-x) | 1.4.8 Some Miscellaneous Commands |
+ | exchange-point-and-mark (C-x C-x) | 1.4.8 Some Miscellaneous Commands |
+ | expand-tilde | 1.3.1 Readline Init File Syntax |
|
| F | | |
- | forward-backward-delete-char () | 1.4.3 Commands For Changing Text |
- | forward-backward-delete-char () | 1.4.3 Commands For Changing Text |
- | forward-char (C-f) | 1.4.1 Commands For Moving |
- | forward-char (C-f) | 1.4.1 Commands For Moving |
- | forward-search-history (C-s) | 1.4.2 Commands For Manipulating The History |
- | forward-search-history (C-s) | 1.4.2 Commands For Manipulating The History |
- | forward-word (M-f) | 1.4.1 Commands For Moving |
- | forward-word (M-f) | 1.4.1 Commands For Moving |
+ | forward-backward-delete-char () | 1.4.3 Commands For Changing Text |
+ | forward-backward-delete-char () | 1.4.3 Commands For Changing Text |
+ | forward-char (C-f) | 1.4.1 Commands For Moving |
+ | forward-char (C-f) | 1.4.1 Commands For Moving |
+ | forward-search-history (C-s) | 1.4.2 Commands For Manipulating The History |
+ | forward-search-history (C-s) | 1.4.2 Commands For Manipulating The History |
+ | forward-word (M-f) | 1.4.1 Commands For Moving |
+ | forward-word (M-f) | 1.4.1 Commands For Moving |
|
| H | | |
- | history-preserve-point | 1.3.1 Readline Init File Syntax |
- | history-search-backward () | 1.4.2 Commands For Manipulating The History |
- | history-search-backward () | 1.4.2 Commands For Manipulating The History |
- | history-search-forward () | 1.4.2 Commands For Manipulating The History |
- | history-search-forward () | 1.4.2 Commands For Manipulating The History |
- | history-size | 1.3.1 Readline Init File Syntax |
- | history-substr-search-backward () | 1.4.2 Commands For Manipulating The History |
- | history-substr-search-backward () | 1.4.2 Commands For Manipulating The History |
- | history-substr-search-forward () | 1.4.2 Commands For Manipulating The History |
- | history-substr-search-forward () | 1.4.2 Commands For Manipulating The History |
- | horizontal-scroll-mode | 1.3.1 Readline Init File Syntax |
+ | history-preserve-point | 1.3.1 Readline Init File Syntax |
+ | history-search-backward () | 1.4.2 Commands For Manipulating The History |
+ | history-search-backward () | 1.4.2 Commands For Manipulating The History |
+ | history-search-forward () | 1.4.2 Commands For Manipulating The History |
+ | history-search-forward () | 1.4.2 Commands For Manipulating The History |
+ | history-size | 1.3.1 Readline Init File Syntax |
+ | history-substr-search-backward () | 1.4.2 Commands For Manipulating The History |
+ | history-substr-search-backward () | 1.4.2 Commands For Manipulating The History |
+ | history-substr-search-forward () | 1.4.2 Commands For Manipulating The History |
+ | history-substr-search-forward () | 1.4.2 Commands For Manipulating The History |
+ | horizontal-scroll-mode | 1.3.1 Readline Init File Syntax |
|
| I | | |
- | input-meta | 1.3.1 Readline Init File Syntax |
- | insert-comment (M-#) | 1.4.8 Some Miscellaneous Commands |
- | insert-comment (M-#) | 1.4.8 Some Miscellaneous Commands |
- | insert-completions (M-*) | 1.4.6 Letting Readline Type For You |
- | insert-completions (M-*) | 1.4.6 Letting Readline Type For You |
- | isearch-terminators | 1.3.1 Readline Init File Syntax |
+ | input-meta | 1.3.1 Readline Init File Syntax |
+ | insert-comment (M-#) | 1.4.8 Some Miscellaneous Commands |
+ | insert-comment (M-#) | 1.4.8 Some Miscellaneous Commands |
+ | insert-completions (M-*) | 1.4.6 Letting Readline Type For You |
+ | insert-completions (M-*) | 1.4.6 Letting Readline Type For You |
+ | isearch-terminators | 1.3.1 Readline Init File Syntax |
|
| K | | |
- | keymap | 1.3.1 Readline Init File Syntax |
- | kill-line (C-k) | 1.4.4 Killing And Yanking |
- | kill-line (C-k) | 1.4.4 Killing And Yanking |
- | kill-region () | 1.4.4 Killing And Yanking |
- | kill-region () | 1.4.4 Killing And Yanking |
- | kill-whole-line () | 1.4.4 Killing And Yanking |
- | kill-whole-line () | 1.4.4 Killing And Yanking |
- | kill-word (M-d) | 1.4.4 Killing And Yanking |
- | kill-word (M-d) | 1.4.4 Killing And Yanking |
+ | keymap | 1.3.1 Readline Init File Syntax |
+ | kill-line (C-k) | 1.4.4 Killing And Yanking |
+ | kill-line (C-k) | 1.4.4 Killing And Yanking |
+ | kill-region () | 1.4.4 Killing And Yanking |
+ | kill-region () | 1.4.4 Killing And Yanking |
+ | kill-whole-line () | 1.4.4 Killing And Yanking |
+ | kill-whole-line () | 1.4.4 Killing And Yanking |
+ | kill-word (M-d) | 1.4.4 Killing And Yanking |
+ | kill-word (M-d) | 1.4.4 Killing And Yanking |
|
| M | | |
- | mark-modified-lines | 1.3.1 Readline Init File Syntax |
- | mark-symlinked-directories | 1.3.1 Readline Init File Syntax |
- | match-hidden-files | 1.3.1 Readline Init File Syntax |
- | menu-complete () | 1.4.6 Letting Readline Type For You |
- | menu-complete () | 1.4.6 Letting Readline Type For You |
- | menu-complete-backward () | 1.4.6 Letting Readline Type For You |
- | menu-complete-backward () | 1.4.6 Letting Readline Type For You |
- | menu-complete-display-prefix | 1.3.1 Readline Init File Syntax |
- | meta-flag | 1.3.1 Readline Init File Syntax |
+ | mark-modified-lines | 1.3.1 Readline Init File Syntax |
+ | mark-symlinked-directories | 1.3.1 Readline Init File Syntax |
+ | match-hidden-files | 1.3.1 Readline Init File Syntax |
+ | menu-complete () | 1.4.6 Letting Readline Type For You |
+ | menu-complete () | 1.4.6 Letting Readline Type For You |
+ | menu-complete-backward () | 1.4.6 Letting Readline Type For You |
+ | menu-complete-backward () | 1.4.6 Letting Readline Type For You |
+ | menu-complete-display-prefix | 1.3.1 Readline Init File Syntax |
+ | meta-flag | 1.3.1 Readline Init File Syntax |
|
| N | | |
- | next-history (C-n) | 1.4.2 Commands For Manipulating The History |
- | next-history (C-n) | 1.4.2 Commands For Manipulating The History |
- | non-incremental-forward-search-history (M-n) | 1.4.2 Commands For Manipulating The History |
- | non-incremental-forward-search-history (M-n) | 1.4.2 Commands For Manipulating The History |
- | non-incremental-reverse-search-history (M-p) | 1.4.2 Commands For Manipulating The History |
- | non-incremental-reverse-search-history (M-p) | 1.4.2 Commands For Manipulating The History |
+ | next-history (C-n) | 1.4.2 Commands For Manipulating The History |
+ | next-history (C-n) | 1.4.2 Commands For Manipulating The History |
+ | non-incremental-forward-search-history (M-n) | 1.4.2 Commands For Manipulating The History |
+ | non-incremental-forward-search-history (M-n) | 1.4.2 Commands For Manipulating The History |
+ | non-incremental-reverse-search-history (M-p) | 1.4.2 Commands For Manipulating The History |
+ | non-incremental-reverse-search-history (M-p) | 1.4.2 Commands For Manipulating The History |
|
| O | | |
- | output-meta | 1.3.1 Readline Init File Syntax |
- | overwrite-mode () | 1.4.3 Commands For Changing Text |
- | overwrite-mode () | 1.4.3 Commands For Changing Text |
+ | output-meta | 1.3.1 Readline Init File Syntax |
+ | overwrite-mode () | 1.4.3 Commands For Changing Text |
+ | overwrite-mode () | 1.4.3 Commands For Changing Text |
|
| P | | |
- | page-completions | 1.3.1 Readline Init File Syntax |
- | possible-completions (M-?) | 1.4.6 Letting Readline Type For You |
- | possible-completions (M-?) | 1.4.6 Letting Readline Type For You |
- | prefix-meta (ESC) | 1.4.8 Some Miscellaneous Commands |
- | prefix-meta (ESC) | 1.4.8 Some Miscellaneous Commands |
- | previous-history (C-p) | 1.4.2 Commands For Manipulating The History |
- | previous-history (C-p) | 1.4.2 Commands For Manipulating The History |
- | print-last-kbd-macro () | 1.4.7 Keyboard Macros |
- | print-last-kbd-macro () | 1.4.7 Keyboard Macros |
+ | page-completions | 1.3.1 Readline Init File Syntax |
+ | possible-completions (M-?) | 1.4.6 Letting Readline Type For You |
+ | possible-completions (M-?) | 1.4.6 Letting Readline Type For You |
+ | prefix-meta (ESC) | 1.4.8 Some Miscellaneous Commands |
+ | prefix-meta (ESC) | 1.4.8 Some Miscellaneous Commands |
+ | previous-history (C-p) | 1.4.2 Commands For Manipulating The History |
+ | previous-history (C-p) | 1.4.2 Commands For Manipulating The History |
+ | print-last-kbd-macro () | 1.4.7 Keyboard Macros |
+ | print-last-kbd-macro () | 1.4.7 Keyboard Macros |
|
| Q | | |
- | quoted-insert (C-q or C-v) | 1.4.3 Commands For Changing Text |
- | quoted-insert (C-q or C-v) | 1.4.3 Commands For Changing Text |
+ | quoted-insert (C-q or C-v) | 1.4.3 Commands For Changing Text |
+ | quoted-insert (C-q or C-v) | 1.4.3 Commands For Changing Text |
|
| R | | |
- | re-read-init-file (C-x C-r) | 1.4.8 Some Miscellaneous Commands |
- | re-read-init-file (C-x C-r) | 1.4.8 Some Miscellaneous Commands |
- | readline | 2.1 Basic Behavior |
- | redraw-current-line () | 1.4.1 Commands For Moving |
- | redraw-current-line () | 1.4.1 Commands For Moving |
- | reverse-search-history (C-r) | 1.4.2 Commands For Manipulating The History |
- | reverse-search-history (C-r) | 1.4.2 Commands For Manipulating The History |
- | revert-all-at-newline | 1.3.1 Readline Init File Syntax |
- | revert-line (M-r) | 1.4.8 Some Miscellaneous Commands |
- | revert-line (M-r) | 1.4.8 Some Miscellaneous Commands |
- | rl_add_defun | 2.4.1 Naming a Function |
- | rl_add_funmap_entry | 2.4.4 Associating Function Names and Bindings |
- | rl_add_undo | 2.4.5 Allowing Undoing |
- | rl_alphabetic | 2.4.10 Utility Functions |
- | rl_already_prompted | 2.3 Readline Variables |
- | rl_attempted_completion_function | 2.6.3 Completion Variables |
- | rl_attempted_completion_over | 2.6.3 Completion Variables |
- | rl_basic_quote_characters | 2.6.3 Completion Variables |
- | rl_basic_word_break_characters | 2.6.3 Completion Variables |
- | rl_begin_undo_group | 2.4.5 Allowing Undoing |
- | rl_bind_key | 2.4.3 Binding Keys |
- | rl_bind_key_if_unbound | 2.4.3 Binding Keys |
- | rl_bind_key_if_unbound_in_map | 2.4.3 Binding Keys |
- | rl_bind_key_in_map | 2.4.3 Binding Keys |
- | rl_bind_keyseq | 2.4.3 Binding Keys |
- | rl_bind_keyseq_if_unbound | 2.4.3 Binding Keys |
- | rl_bind_keyseq_if_unbound_in_map | 2.4.3 Binding Keys |
- | rl_bind_keyseq_in_map | 2.4.3 Binding Keys |
- | rl_binding_keymap | 2.3 Readline Variables |
- | rl_callback_handler_install | 2.4.12 Alternate Interface |
- | rl_callback_handler_remove | 2.4.12 Alternate Interface |
- | rl_callback_read_char | 2.4.12 Alternate Interface |
- | rl_catch_signals | 2.5 Readline Signal Handling |
- | rl_catch_sigwinch | 2.5 Readline Signal Handling |
- | rl_change_environment | 2.5 Readline Signal Handling |
- | rl_char_is_quoted_p | 2.6.3 Completion Variables |
- | rl_cleanup_after_signal | 2.5 Readline Signal Handling |
- | rl_clear_history | 2.4.11 Miscellaneous Functions |
- | rl_clear_message | 2.4.6 Redisplay |
- | rl_clear_pending_input | 2.4.8 Character Input |
- | rl_clear_signals | 2.5 Readline Signal Handling |
- | rl_complete | 2.6.1 How Completing Works |
- | rl_complete | 2.6.2 Completion Functions |
- | rl_complete_internal | 2.6.2 Completion Functions |
- | rl_completer_quote_characters | 2.6.3 Completion Variables |
- | rl_completer_word_break_characters | 2.6.3 Completion Variables |
- | rl_completion_append_character | 2.6.3 Completion Variables |
- | rl_completion_display_matches_hook | 2.6.3 Completion Variables |
- | rl_completion_entry_function | 2.6.1 How Completing Works |
- | rl_completion_entry_function | 2.6.3 Completion Variables |
- | rl_completion_found_quote | 2.6.3 Completion Variables |
- | rl_completion_invoking_key | 2.6.3 Completion Variables |
- | rl_completion_mark_symlink_dirs | 2.6.3 Completion Variables |
- | rl_completion_matches | 2.6.2 Completion Functions |
- | rl_completion_mode | 2.6.2 Completion Functions |
- | rl_completion_query_items | 2.6.3 Completion Variables |
- | rl_completion_quote_character | 2.6.3 Completion Variables |
- | rl_completion_suppress_append | 2.6.3 Completion Variables |
- | rl_completion_suppress_quote | 2.6.3 Completion Variables |
- | rl_completion_type | 2.6.3 Completion Variables |
- | rl_completion_word_break_hook | 2.6.3 Completion Variables |
- | rl_copy_keymap | 2.4.2 Selecting a Keymap |
- | rl_copy_text | 2.4.7 Modifying Text |
- | rl_crlf | 2.4.6 Redisplay |
- | rl_delete_text | 2.4.7 Modifying Text |
- | rl_deprep_term_function | 2.3 Readline Variables |
- | rl_deprep_terminal | 2.4.9 Terminal Management |
- | rl_ding | 2.4.10 Utility Functions |
- | rl_directory_completion_hook | 2.6.3 Completion Variables |
- | rl_directory_rewrite_hook; | 2.6.3 Completion Variables |
- | rl_discard_keymap | 2.4.2 Selecting a Keymap |
- | rl_dispatching | 2.3 Readline Variables |
- | rl_display_match_list | 2.4.10 Utility Functions |
- | rl_display_prompt | 2.3 Readline Variables |
- | rl_do_undo | 2.4.5 Allowing Undoing |
- | rl_done | 2.3 Readline Variables |
- | rl_echo_signal_char | 2.5 Readline Signal Handling |
- | rl_editing_mode | 2.3 Readline Variables |
- | rl_end | 2.3 Readline Variables |
- | rl_end_undo_group | 2.4.5 Allowing Undoing |
- | rl_erase_empty_line | 2.3 Readline Variables |
- | rl_event_hook | 2.3 Readline Variables |
- | rl_execute_next | 2.4.8 Character Input |
- | rl_executing_key | 2.3 Readline Variables |
- | rl_executing_keymap | 2.3 Readline Variables |
- | rl_executing_keyseq | 2.3 Readline Variables |
- | rl_executing_macro | 2.3 Readline Variables |
- | rl_expand_prompt | 2.4.6 Redisplay |
- | rl_explicit_arg | 2.3 Readline Variables |
- | rl_extend_line_buffer | 2.4.10 Utility Functions |
- | rl_filename_completion_desired | 2.6.3 Completion Variables |
- | rl_filename_completion_function | 2.6.2 Completion Functions |
- | rl_filename_dequoting_function | 2.6.3 Completion Variables |
- | rl_filename_quote_characters | 2.6.3 Completion Variables |
- | rl_filename_quoting_desired | 2.6.3 Completion Variables |
- | rl_filename_quoting_function | 2.6.3 Completion Variables |
- | rl_filename_rewrite_hook | 2.6.3 Completion Variables |
- | rl_filename_stat_hook | 2.6.3 Completion Variables |
- | rl_forced_update_display | 2.4.6 Redisplay |
- | rl_free | 2.4.10 Utility Functions |
- | rl_free_keymap | 2.4.2 Selecting a Keymap |
- | rl_free_line_state | 2.5 Readline Signal Handling |
- | rl_free_undo_list | 2.4.5 Allowing Undoing |
- | rl_function_dumper | 2.4.4 Associating Function Names and Bindings |
- | rl_function_of_keyseq | 2.4.4 Associating Function Names and Bindings |
- | rl_funmap_names | 2.4.4 Associating Function Names and Bindings |
- | rl_generic_bind | 2.4.3 Binding Keys |
- | rl_get_keymap | 2.4.2 Selecting a Keymap |
- | rl_get_keymap_by_name | 2.4.2 Selecting a Keymap |
- | rl_get_keymap_name | 2.4.2 Selecting a Keymap |
- | rl_get_screen_size | 2.5 Readline Signal Handling |
- | rl_get_termcap | 2.4.11 Miscellaneous Functions |
- | rl_getc | 2.4.8 Character Input |
- | rl_getc_function | 2.3 Readline Variables |
- | rl_gnu_readline_p | 2.3 Readline Variables |
- | rl_ignore_completion_duplicates | 2.6.3 Completion Variables |
- | rl_ignore_some_completions_function | 2.6.3 Completion Variables |
- | rl_inhibit_completion | 2.6.3 Completion Variables |
- | rl_initialize | 2.4.10 Utility Functions |
- | rl_input_available_hook | 2.3 Readline Variables |
- | rl_insert_completions | 2.6.2 Completion Functions |
- | rl_insert_text | 2.4.7 Modifying Text |
- | rl_instream | 2.3 Readline Variables |
- | rl_invoking_keyseqs | 2.4.4 Associating Function Names and Bindings |
- | rl_invoking_keyseqs_in_map | 2.4.4 Associating Function Names and Bindings |
- | rl_key_sequence_length | 2.3 Readline Variables |
- | rl_kill_text | 2.4.7 Modifying Text |
- | rl_last_func | 2.3 Readline Variables |
- | rl_library_version | 2.3 Readline Variables |
- | rl_line_buffer | 2.3 Readline Variables |
- | rl_list_funmap_names | 2.4.4 Associating Function Names and Bindings |
- | rl_macro_bind | 2.4.11 Miscellaneous Functions |
- | rl_macro_dumper | 2.4.11 Miscellaneous Functions |
- | rl_make_bare_keymap | 2.4.2 Selecting a Keymap |
- | rl_make_keymap | 2.4.2 Selecting a Keymap |
- | rl_mark | 2.3 Readline Variables |
- | rl_message | 2.4.6 Redisplay |
- | rl_modifying | 2.4.5 Allowing Undoing |
- | rl_named_function | 2.4.4 Associating Function Names and Bindings |
- | rl_num_chars_to_read | 2.3 Readline Variables |
- | rl_numeric_arg | 2.3 Readline Variables |
- | rl_on_new_line | 2.4.6 Redisplay |
- | rl_on_new_line_with_prompt | 2.4.6 Redisplay |
- | rl_outstream | 2.3 Readline Variables |
- | rl_parse_and_bind | 2.4.3 Binding Keys |
- | rl_pending_input | 2.3 Readline Variables |
- | rl_point | 2.3 Readline Variables |
- | rl_possible_completions | 2.6.2 Completion Functions |
- | rl_pre_input_hook | 2.3 Readline Variables |
- | rl_prefer_env_winsize | 2.3 Readline Variables |
- | rl_prep_term_function | 2.3 Readline Variables |
- | rl_prep_terminal | 2.4.9 Terminal Management |
- | rl_prompt | 2.3 Readline Variables |
- | rl_push_macro_input | 2.4.7 Modifying Text |
- | rl_read_init_file | 2.4.3 Binding Keys |
- | rl_read_key | 2.4.8 Character Input |
- | rl_readline_name | 2.3 Readline Variables |
- | rl_readline_state | 2.3 Readline Variables |
- | rl_readline_version | 2.3 Readline Variables |
- | rl_redisplay | 2.4.6 Redisplay |
- | rl_redisplay_function | 2.3 Readline Variables |
- | rl_replace_line | 2.4.10 Utility Functions |
- | rl_reset_after_signal | 2.5 Readline Signal Handling |
- | rl_reset_line_state | 2.4.6 Redisplay |
- | rl_reset_screen_size | 2.5 Readline Signal Handling |
- | rl_reset_terminal | 2.4.9 Terminal Management |
- | rl_resize_terminal | 2.5 Readline Signal Handling |
- | rl_restore_prompt | 2.4.6 Redisplay |
- | rl_restore_state | 2.4.10 Utility Functions |
- | rl_save_prompt | 2.4.6 Redisplay |
- | rl_save_state | 2.4.10 Utility Functions |
- | rl_set_key | 2.4.3 Binding Keys |
- | rl_set_keyboard_input_timeout | 2.4.8 Character Input |
- | rl_set_keymap | 2.4.2 Selecting a Keymap |
- | rl_set_paren_blink_timeout | 2.4.11 Miscellaneous Functions |
- | rl_set_prompt | 2.4.6 Redisplay |
- | rl_set_screen_size | 2.5 Readline Signal Handling |
- | rl_set_signals | 2.5 Readline Signal Handling |
- | rl_show_char | 2.4.6 Redisplay |
- | rl_signal_event_hook | 2.3 Readline Variables |
- | rl_sort_completion_matches | 2.6.3 Completion Variables |
- | rl_special_prefixes | 2.6.3 Completion Variables |
- | rl_startup_hook | 2.3 Readline Variables |
- | rl_stuff_char | 2.4.8 Character Input |
- | rl_terminal_name | 2.3 Readline Variables |
- | rl_tty_set_default_bindings | 2.4.9 Terminal Management |
- | rl_tty_unset_default_bindings | 2.4.9 Terminal Management |
- | rl_unbind_command_in_map | 2.4.3 Binding Keys |
- | rl_unbind_function_in_map | 2.4.3 Binding Keys |
- | rl_unbind_key | 2.4.3 Binding Keys |
- | rl_unbind_key_in_map | 2.4.3 Binding Keys |
- | rl_username_completion_function | 2.6.2 Completion Functions |
- | rl_variable_bind | 2.4.11 Miscellaneous Functions |
- | rl_variable_dumper | 2.4.11 Miscellaneous Functions |
- | rl_variable_value | 2.4.11 Miscellaneous Functions |
+ | re-read-init-file (C-x C-r) | 1.4.8 Some Miscellaneous Commands |
+ | re-read-init-file (C-x C-r) | 1.4.8 Some Miscellaneous Commands |
+ | readline | 2.1 Basic Behavior |
+ | redraw-current-line () | 1.4.1 Commands For Moving |
+ | redraw-current-line () | 1.4.1 Commands For Moving |
+ | reverse-search-history (C-r) | 1.4.2 Commands For Manipulating The History |
+ | reverse-search-history (C-r) | 1.4.2 Commands For Manipulating The History |
+ | revert-all-at-newline | 1.3.1 Readline Init File Syntax |
+ | revert-line (M-r) | 1.4.8 Some Miscellaneous Commands |
+ | revert-line (M-r) | 1.4.8 Some Miscellaneous Commands |
+ | rl_add_defun | 2.4.1 Naming a Function |
+ | rl_add_funmap_entry | 2.4.4 Associating Function Names and Bindings |
+ | rl_add_undo | 2.4.5 Allowing Undoing |
+ | rl_alphabetic | 2.4.10 Utility Functions |
+ | rl_already_prompted | 2.3 Readline Variables |
+ | rl_attempted_completion_function | 2.6.3 Completion Variables |
+ | rl_attempted_completion_over | 2.6.3 Completion Variables |
+ | rl_basic_quote_characters | 2.6.3 Completion Variables |
+ | rl_basic_word_break_characters | 2.6.3 Completion Variables |
+ | rl_begin_undo_group | 2.4.5 Allowing Undoing |
+ | rl_bind_key | 2.4.3 Binding Keys |
+ | rl_bind_key_if_unbound | 2.4.3 Binding Keys |
+ | rl_bind_key_if_unbound_in_map | 2.4.3 Binding Keys |
+ | rl_bind_key_in_map | 2.4.3 Binding Keys |
+ | rl_bind_keyseq | 2.4.3 Binding Keys |
+ | rl_bind_keyseq_if_unbound | 2.4.3 Binding Keys |
+ | rl_bind_keyseq_if_unbound_in_map | 2.4.3 Binding Keys |
+ | rl_bind_keyseq_in_map | 2.4.3 Binding Keys |
+ | rl_binding_keymap | 2.3 Readline Variables |
+ | rl_callback_handler_install | 2.4.12 Alternate Interface |
+ | rl_callback_handler_remove | 2.4.12 Alternate Interface |
+ | rl_callback_read_char | 2.4.12 Alternate Interface |
+ | rl_callback_sigcleanup | 2.4.12 Alternate Interface |
+ | rl_catch_signals | 2.5 Readline Signal Handling |
+ | rl_catch_sigwinch | 2.5 Readline Signal Handling |
+ | rl_change_environment | 2.5 Readline Signal Handling |
+ | rl_char_is_quoted_p | 2.6.3 Completion Variables |
+ | rl_cleanup_after_signal | 2.5 Readline Signal Handling |
+ | rl_clear_history | 2.4.11 Miscellaneous Functions |
+ | rl_clear_message | 2.4.6 Redisplay |
+ | rl_clear_pending_input | 2.4.8 Character Input |
+ | rl_clear_signals | 2.5 Readline Signal Handling |
+ | rl_clear_visible_line | 2.4.6 Redisplay |
+ | rl_complete | 2.6.1 How Completing Works |
+ | rl_complete | 2.6.2 Completion Functions |
+ | rl_complete_internal | 2.6.2 Completion Functions |
+ | rl_completer_quote_characters | 2.6.3 Completion Variables |
+ | rl_completer_word_break_characters | 2.6.3 Completion Variables |
+ | rl_completion_append_character | 2.6.3 Completion Variables |
+ | rl_completion_display_matches_hook | 2.6.3 Completion Variables |
+ | rl_completion_entry_function | 2.6.1 How Completing Works |
+ | rl_completion_entry_function | 2.6.3 Completion Variables |
+ | rl_completion_found_quote | 2.6.3 Completion Variables |
+ | rl_completion_invoking_key | 2.6.3 Completion Variables |
+ | rl_completion_mark_symlink_dirs | 2.6.3 Completion Variables |
+ | rl_completion_matches | 2.6.2 Completion Functions |
+ | rl_completion_mode | 2.6.2 Completion Functions |
+ | rl_completion_query_items | 2.6.3 Completion Variables |
+ | rl_completion_quote_character | 2.6.3 Completion Variables |
+ | rl_completion_suppress_append | 2.6.3 Completion Variables |
+ | rl_completion_suppress_quote | 2.6.3 Completion Variables |
+ | rl_completion_type | 2.6.3 Completion Variables |
+ | rl_completion_word_break_hook | 2.6.3 Completion Variables |
+ | rl_copy_keymap | 2.4.2 Selecting a Keymap |
+ | rl_copy_text | 2.4.7 Modifying Text |
+ | rl_crlf | 2.4.6 Redisplay |
+ | rl_delete_text | 2.4.7 Modifying Text |
+ | rl_deprep_term_function | 2.3 Readline Variables |
+ | rl_deprep_terminal | 2.4.9 Terminal Management |
+ | rl_ding | 2.4.10 Utility Functions |
+ | rl_directory_completion_hook | 2.6.3 Completion Variables |
+ | rl_directory_rewrite_hook; | 2.6.3 Completion Variables |
+ | rl_discard_keymap | 2.4.2 Selecting a Keymap |
+ | rl_dispatching | 2.3 Readline Variables |
+ | rl_display_match_list | 2.4.10 Utility Functions |
+ | rl_display_prompt | 2.3 Readline Variables |
+ | rl_do_undo | 2.4.5 Allowing Undoing |
+ | rl_done | 2.3 Readline Variables |
+ | rl_echo_signal_char | 2.5 Readline Signal Handling |
+ | rl_editing_mode | 2.3 Readline Variables |
+ | rl_end | 2.3 Readline Variables |
+ | rl_end_undo_group | 2.4.5 Allowing Undoing |
+ | rl_erase_empty_line | 2.3 Readline Variables |
+ | rl_event_hook | 2.3 Readline Variables |
+ | rl_execute_next | 2.4.8 Character Input |
+ | rl_executing_key | 2.3 Readline Variables |
+ | rl_executing_keymap | 2.3 Readline Variables |
+ | rl_executing_keyseq | 2.3 Readline Variables |
+ | rl_executing_macro | 2.3 Readline Variables |
+ | rl_expand_prompt | 2.4.6 Redisplay |
+ | rl_explicit_arg | 2.3 Readline Variables |
+ | rl_extend_line_buffer | 2.4.10 Utility Functions |
+ | rl_filename_completion_desired | 2.6.3 Completion Variables |
+ | rl_filename_completion_function | 2.6.2 Completion Functions |
+ | rl_filename_dequoting_function | 2.6.3 Completion Variables |
+ | rl_filename_quote_characters | 2.6.3 Completion Variables |
+ | rl_filename_quoting_desired | 2.6.3 Completion Variables |
+ | rl_filename_quoting_function | 2.6.3 Completion Variables |
+ | rl_filename_rewrite_hook | 2.6.3 Completion Variables |
+ | rl_filename_stat_hook | 2.6.3 Completion Variables |
+ | rl_forced_update_display | 2.4.6 Redisplay |
+ | rl_free | 2.4.10 Utility Functions |
+ | rl_free_keymap | 2.4.2 Selecting a Keymap |
+ | rl_free_line_state | 2.5 Readline Signal Handling |
+ | rl_free_undo_list | 2.4.5 Allowing Undoing |
+ | rl_function_dumper | 2.4.4 Associating Function Names and Bindings |
+ | rl_function_of_keyseq | 2.4.4 Associating Function Names and Bindings |
+ | rl_funmap_names | 2.4.4 Associating Function Names and Bindings |
+ | rl_generic_bind | 2.4.3 Binding Keys |
+ | rl_get_keymap | 2.4.2 Selecting a Keymap |
+ | rl_get_keymap_by_name | 2.4.2 Selecting a Keymap |
+ | rl_get_keymap_name | 2.4.2 Selecting a Keymap |
+ | rl_get_screen_size | 2.5 Readline Signal Handling |
+ | rl_get_termcap | 2.4.11 Miscellaneous Functions |
+ | rl_getc | 2.4.8 Character Input |
+ | rl_getc_function | 2.3 Readline Variables |
+ | rl_gnu_readline_p | 2.3 Readline Variables |
+ | rl_ignore_completion_duplicates | 2.6.3 Completion Variables |
+ | rl_ignore_some_completions_function | 2.6.3 Completion Variables |
+ | rl_inhibit_completion | 2.6.3 Completion Variables |
+ | rl_initialize | 2.4.10 Utility Functions |
+ | rl_input_available_hook | 2.3 Readline Variables |
+ | rl_insert_completions | 2.6.2 Completion Functions |
+ | rl_insert_text | 2.4.7 Modifying Text |
+ | rl_instream | 2.3 Readline Variables |
+ | rl_invoking_keyseqs | 2.4.4 Associating Function Names and Bindings |
+ | rl_invoking_keyseqs_in_map | 2.4.4 Associating Function Names and Bindings |
+ | rl_key_sequence_length | 2.3 Readline Variables |
+ | rl_kill_text | 2.4.7 Modifying Text |
+ | rl_last_func | 2.3 Readline Variables |
+ | rl_library_version | 2.3 Readline Variables |
+ | rl_line_buffer | 2.3 Readline Variables |
+ | rl_list_funmap_names | 2.4.4 Associating Function Names and Bindings |
+ | rl_macro_bind | 2.4.11 Miscellaneous Functions |
+ | rl_macro_dumper | 2.4.11 Miscellaneous Functions |
+ | rl_make_bare_keymap | 2.4.2 Selecting a Keymap |
+ | rl_make_keymap | 2.4.2 Selecting a Keymap |
+ | rl_mark | 2.3 Readline Variables |
+ | rl_message | 2.4.6 Redisplay |
+ | rl_modifying | 2.4.5 Allowing Undoing |
+ | rl_named_function | 2.4.4 Associating Function Names and Bindings |
+ | rl_num_chars_to_read | 2.3 Readline Variables |
+ | rl_numeric_arg | 2.3 Readline Variables |
+ | rl_on_new_line | 2.4.6 Redisplay |
+ | rl_on_new_line_with_prompt | 2.4.6 Redisplay |
+ | rl_outstream | 2.3 Readline Variables |
+ | rl_parse_and_bind | 2.4.3 Binding Keys |
+ | rl_pending_input | 2.3 Readline Variables |
+ | rl_pending_signal | 2.5 Readline Signal Handling |
+ | rl_persistent_signal_handlers | 2.5 Readline Signal Handling |
+ | rl_point | 2.3 Readline Variables |
+ | rl_possible_completions | 2.6.2 Completion Functions |
+ | rl_pre_input_hook | 2.3 Readline Variables |
+ | rl_prefer_env_winsize | 2.3 Readline Variables |
+ | rl_prep_term_function | 2.3 Readline Variables |
+ | rl_prep_terminal | 2.4.9 Terminal Management |
+ | rl_prompt | 2.3 Readline Variables |
+ | rl_push_macro_input | 2.4.7 Modifying Text |
+ | rl_read_init_file | 2.4.3 Binding Keys |
+ | rl_read_key | 2.4.8 Character Input |
+ | rl_readline_name | 2.3 Readline Variables |
+ | rl_readline_state | 2.3 Readline Variables |
+ | rl_readline_version | 2.3 Readline Variables |
+ | rl_redisplay | 2.4.6 Redisplay |
+ | rl_redisplay_function | 2.3 Readline Variables |
+ | rl_replace_line | 2.4.10 Utility Functions |
+ | rl_reset_after_signal | 2.5 Readline Signal Handling |
+ | rl_reset_line_state | 2.4.6 Redisplay |
+ | rl_reset_screen_size | 2.5 Readline Signal Handling |
+ | rl_reset_terminal | 2.4.9 Terminal Management |
+ | rl_resize_terminal | 2.5 Readline Signal Handling |
+ | rl_restore_prompt | 2.4.6 Redisplay |
+ | rl_restore_state | 2.4.10 Utility Functions |
+ | rl_save_prompt | 2.4.6 Redisplay |
+ | rl_save_state | 2.4.10 Utility Functions |
+ | rl_set_key | 2.4.3 Binding Keys |
+ | rl_set_keyboard_input_timeout | 2.4.8 Character Input |
+ | rl_set_keymap | 2.4.2 Selecting a Keymap |
+ | rl_set_paren_blink_timeout | 2.4.11 Miscellaneous Functions |
+ | rl_set_prompt | 2.4.6 Redisplay |
+ | rl_set_screen_size | 2.5 Readline Signal Handling |
+ | rl_set_signals | 2.5 Readline Signal Handling |
+ | rl_show_char | 2.4.6 Redisplay |
+ | rl_signal_event_hook | 2.3 Readline Variables |
+ | rl_sort_completion_matches | 2.6.3 Completion Variables |
+ | rl_special_prefixes | 2.6.3 Completion Variables |
+ | rl_startup_hook | 2.3 Readline Variables |
+ | rl_stuff_char | 2.4.8 Character Input |
+ | rl_terminal_name | 2.3 Readline Variables |
+ | rl_tty_set_default_bindings | 2.4.9 Terminal Management |
+ | rl_tty_set_echoing | 2.4.9 Terminal Management |
+ | rl_tty_unset_default_bindings | 2.4.9 Terminal Management |
+ | rl_unbind_command_in_map | 2.4.3 Binding Keys |
+ | rl_unbind_function_in_map | 2.4.3 Binding Keys |
+ | rl_unbind_key | 2.4.3 Binding Keys |
+ | rl_unbind_key_in_map | 2.4.3 Binding Keys |
+ | rl_username_completion_function | 2.6.2 Completion Functions |
+ | rl_variable_bind | 2.4.11 Miscellaneous Functions |
+ | rl_variable_dumper | 2.4.11 Miscellaneous Functions |
+ | rl_variable_value | 2.4.11 Miscellaneous Functions |
|
| S | | |
- | self-insert (a, b, A, 1, !, <small>...</small>) | 1.4.3 Commands For Changing Text |
- | self-insert (a, b, A, 1, !, <small>...</small>) | 1.4.3 Commands For Changing Text |
- | set-mark (C-@) | 1.4.8 Some Miscellaneous Commands |
- | set-mark (C-@) | 1.4.8 Some Miscellaneous Commands |
- | show-all-if-ambiguous | 1.3.1 Readline Init File Syntax |
- | show-all-if-unmodified | 1.3.1 Readline Init File Syntax |
- | show-mode-in-prompt | 1.3.1 Readline Init File Syntax |
- | skip-completed-text | 1.3.1 Readline Init File Syntax |
- | skip-csi-sequence () | 1.4.8 Some Miscellaneous Commands |
- | skip-csi-sequence () | 1.4.8 Some Miscellaneous Commands |
- | start-kbd-macro (C-x () | 1.4.7 Keyboard Macros |
- | start-kbd-macro (C-x () | 1.4.7 Keyboard Macros |
+ | self-insert (a, b, A, 1, !, <small>...</small>) | 1.4.3 Commands For Changing Text |
+ | self-insert (a, b, A, 1, !, <small>...</small>) | 1.4.3 Commands For Changing Text |
+ | set-mark (C-@) | 1.4.8 Some Miscellaneous Commands |
+ | set-mark (C-@) | 1.4.8 Some Miscellaneous Commands |
+ | show-all-if-ambiguous | 1.3.1 Readline Init File Syntax |
+ | show-all-if-unmodified | 1.3.1 Readline Init File Syntax |
+ | show-mode-in-prompt | 1.3.1 Readline Init File Syntax |
+ | skip-completed-text | 1.3.1 Readline Init File Syntax |
+ | skip-csi-sequence () | 1.4.8 Some Miscellaneous Commands |
+ | skip-csi-sequence () | 1.4.8 Some Miscellaneous Commands |
+ | start-kbd-macro (C-x () | 1.4.7 Keyboard Macros |
+ | start-kbd-macro (C-x () | 1.4.7 Keyboard Macros |
|
| T | | |
- | tab-insert (M-TAB) | 1.4.3 Commands For Changing Text |
- | tab-insert (M-TAB) | 1.4.3 Commands For Changing Text |
- | tilde-expand (M-~) | 1.4.8 Some Miscellaneous Commands |
- | tilde-expand (M-~) | 1.4.8 Some Miscellaneous Commands |
- | transpose-chars (C-t) | 1.4.3 Commands For Changing Text |
- | transpose-chars (C-t) | 1.4.3 Commands For Changing Text |
- | transpose-words (M-t) | 1.4.3 Commands For Changing Text |
- | transpose-words (M-t) | 1.4.3 Commands For Changing Text |
+ | tab-insert (M-TAB) | 1.4.3 Commands For Changing Text |
+ | tab-insert (M-TAB) | 1.4.3 Commands For Changing Text |
+ | tilde-expand (M-~) | 1.4.8 Some Miscellaneous Commands |
+ | tilde-expand (M-~) | 1.4.8 Some Miscellaneous Commands |
+ | transpose-chars (C-t) | 1.4.3 Commands For Changing Text |
+ | transpose-chars (C-t) | 1.4.3 Commands For Changing Text |
+ | transpose-words (M-t) | 1.4.3 Commands For Changing Text |
+ | transpose-words (M-t) | 1.4.3 Commands For Changing Text |
|
| U | | |
- | undo (C-_ or C-x C-u) | 1.4.8 Some Miscellaneous Commands |
- | undo (C-_ or C-x C-u) | 1.4.8 Some Miscellaneous Commands |
- | universal-argument () | 1.4.5 Specifying Numeric Arguments |
- | universal-argument () | 1.4.5 Specifying Numeric Arguments |
- | unix-filename-rubout () | 1.4.4 Killing And Yanking |
- | unix-filename-rubout () | 1.4.4 Killing And Yanking |
- | unix-line-discard (C-u) | 1.4.4 Killing And Yanking |
- | unix-line-discard (C-u) | 1.4.4 Killing And Yanking |
- | unix-word-rubout (C-w) | 1.4.4 Killing And Yanking |
- | unix-word-rubout (C-w) | 1.4.4 Killing And Yanking |
- | upcase-word (M-u) | 1.4.3 Commands For Changing Text |
- | upcase-word (M-u) | 1.4.3 Commands For Changing Text |
+ | undo (C-_ or C-x C-u) | 1.4.8 Some Miscellaneous Commands |
+ | undo (C-_ or C-x C-u) | 1.4.8 Some Miscellaneous Commands |
+ | universal-argument () | 1.4.5 Specifying Numeric Arguments |
+ | universal-argument () | 1.4.5 Specifying Numeric Arguments |
+ | unix-filename-rubout () | 1.4.4 Killing And Yanking |
+ | unix-filename-rubout () | 1.4.4 Killing And Yanking |
+ | unix-line-discard (C-u) | 1.4.4 Killing And Yanking |
+ | unix-line-discard (C-u) | 1.4.4 Killing And Yanking |
+ | unix-word-rubout (C-w) | 1.4.4 Killing And Yanking |
+ | unix-word-rubout (C-w) | 1.4.4 Killing And Yanking |
+ | upcase-word (M-u) | 1.4.3 Commands For Changing Text |
+ | upcase-word (M-u) | 1.4.3 Commands For Changing Text |
|
| V | | |
- | vi-editing-mode (M-C-j) | 1.4.8 Some Miscellaneous Commands |
- | vi-editing-mode (M-C-j) | 1.4.8 Some Miscellaneous Commands |
- | visible-stats | 1.3.1 Readline Init File Syntax |
+ | vi-cmd-mode-string | 1.3.1 Readline Init File Syntax |
+ | vi-editing-mode (M-C-j) | 1.4.8 Some Miscellaneous Commands |
+ | vi-editing-mode (M-C-j) | 1.4.8 Some Miscellaneous Commands |
+ | vi-ins-mode-string | 1.3.1 Readline Init File Syntax |
+ | visible-stats | 1.3.1 Readline Init File Syntax |
|
| Y | | |
- | yank (C-y) | 1.4.4 Killing And Yanking |
- | yank (C-y) | 1.4.4 Killing And Yanking |
- | yank-last-arg (M-. or M-_) | 1.4.2 Commands For Manipulating The History |
- | yank-last-arg (M-. or M-_) | 1.4.2 Commands For Manipulating The History |
- | yank-nth-arg (M-C-y) | 1.4.2 Commands For Manipulating The History |
- | yank-nth-arg (M-C-y) | 1.4.2 Commands For Manipulating The History |
- | yank-pop (M-y) | 1.4.4 Killing And Yanking |
- | yank-pop (M-y) | 1.4.4 Killing And Yanking |
+ | yank (C-y) | 1.4.4 Killing And Yanking |
+ | yank (C-y) | 1.4.4 Killing And Yanking |
+ | yank-last-arg (M-. or M-_) | 1.4.2 Commands For Manipulating The History |
+ | yank-last-arg (M-. or M-_) | 1.4.2 Commands For Manipulating The History |
+ | yank-nth-arg (M-C-y) | 1.4.2 Commands For Manipulating The History |
+ | yank-nth-arg (M-C-y) | 1.4.2 Commands For Manipulating The History |
+ | yank-pop (M-y) | 1.4.4 Killing And Yanking |
+ | yank-pop (M-y) | 1.4.4 Killing And Yanking |
|
|
| Jump to: | _
@@ -7165,7 +7369,7 @@ to permit their use in free software.
| [ ? ] |
|---|
About this document
-This document was generated by Chet Ramey on February, 11 2014
+This document was generated by chet on September, 7 2016
using texi2html
@@ -7327,7 +7531,7 @@ the following structure:
This document was generated
-by Chet Ramey on February, 11 2014
+by chet on September, 7 2016
using texi2html
diff --git a/doc/readline.info b/doc/readline.info
index 344e1dd..6eb3efa 100644
--- a/doc/readline.info
+++ b/doc/readline.info
@@ -1,11 +1,10 @@
-This is readline.info, produced by makeinfo version 4.13 from
-/usr/homes/chet/src/bash/readline-src/doc/rlman.texi.
+This is readline.info, produced by makeinfo version 6.1 from rlman.texi.
-This manual describes the GNU Readline Library (version 6.3, 6 January
-2014), a library which aids in the consistency of user interface across
+This manual describes the GNU Readline Library (version 7.0, 16 July
+2016), a library which aids in the consistency of user interface across
discrete programs which provide a command line interface.
- Copyright (C) 1988-2014 Free Software Foundation, Inc.
+ Copyright (C) 1988-2016 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
@@ -14,7 +13,6 @@ discrete programs which provide a command line interface.
no Back-Cover Texts. A copy of the license is included in the
section entitled "GNU Free Documentation License".
-
INFO-DIR-SECTION Libraries
START-INFO-DIR-ENTRY
* Readline: (readline). The GNU readline library API.
@@ -29,7 +27,7 @@ GNU Readline Library
This document describes the GNU Readline Library, a utility which aids
in the consistency of user interface across discrete programs which
provide a command line interface. The Readline home page is
-`http://www.gnu.org/software/readline/'.
+.
* Menu:
@@ -68,10 +66,10 @@ File: readline.info, Node: Introduction and Notation, Next: Readline Interacti
The following paragraphs describe the notation used to represent
keystrokes.
- The text `C-k' is read as `Control-K' and describes the character
+ The text 'C-k' is read as 'Control-K' and describes the character
produced when the key is pressed while the Control key is depressed.
- The text `M-k' is read as `Meta-K' and describes the character
+ The text 'M-k' is read as 'Meta-K' and describes the character
produced when the Meta key (if you have one) is depressed, and the
key is pressed. The Meta key is labeled on many keyboards. On
keyboards with two keys labeled (usually to either side of the
@@ -85,15 +83,15 @@ Meta key, the identical keystroke can be generated by typing
_first_, and then typing . Either process is known as "metafying"
the key.
- The text `M-C-k' is read as `Meta-Control-k' and describes the
-character produced by "metafying" `C-k'.
+ The text 'M-C-k' is read as 'Meta-Control-k' and describes the
+character produced by "metafying" 'C-k'.
- In addition, several keys have their own names. Specifically,
-, , , , , and all stand for themselves
-when seen in this text, or in an init file (*note Readline Init File::).
-If your keyboard lacks a key, typing will produce the
-desired character. The key may be labeled or on
-some keyboards.
+ In addition, several keys have their own names. Specifically, ,
+, , , , and all stand for themselves when seen
+in this text, or in an init file (*note Readline Init File::). If your
+keyboard lacks a key, typing will produce the desired
+character. The key may be labeled or on some
+keyboards.
File: readline.info, Node: Readline Interaction, Next: Readline Init File, Prev: Introduction and Notation, Up: Command Line Editing
@@ -131,41 +129,35 @@ character appears where the cursor was, and then the cursor moves one
space to the right. If you mistype a character, you can use your erase
character to back up and delete the mistyped character.
- Sometimes you may mistype a character, and not notice the error
-until you have typed several other characters. In that case, you can
-type `C-b' to move the cursor to the left, and then correct your
-mistake. Afterwards, you can move the cursor to the right with `C-f'.
+ Sometimes you may mistype a character, and not notice the error until
+you have typed several other characters. In that case, you can type
+'C-b' to move the cursor to the left, and then correct your mistake.
+Afterwards, you can move the cursor to the right with 'C-f'.
When you add text in the middle of a line, you will notice that
-characters to the right of the cursor are `pushed over' to make room
-for the text that you have inserted. Likewise, when you delete text
-behind the cursor, characters to the right of the cursor are `pulled
-back' to fill in the blank space created by the removal of the text. A
-list of the bare essentials for editing the text of an input line
-follows.
-
-`C-b'
- Move back one character.
+characters to the right of the cursor are 'pushed over' to make room for
+the text that you have inserted. Likewise, when you delete text behind
+the cursor, characters to the right of the cursor are 'pulled back' to
+fill in the blank space created by the removal of the text. A list of
+the bare essentials for editing the text of an input line follows.
-`C-f'
+'C-b'
+ Move back one character.
+'C-f'
Move forward one character.
-
or
Delete the character to the left of the cursor.
-
-`C-d'
+'C-d'
Delete the character underneath the cursor.
-
Printing characters
Insert the character into the line at the cursor.
-
-`C-_' or `C-x C-u'
+'C-_' or 'C-x C-u'
Undo the last editing command. You can undo all the way back to an
empty line.
(Depending on your configuration, the key be set to delete
the character to the left of the cursor and the key set to delete
-the character underneath the cursor, like `C-d', rather than the
+the character underneath the cursor, like 'C-d', rather than the
character to the left of the cursor.)
@@ -175,29 +167,25 @@ File: readline.info, Node: Readline Movement Commands, Next: Readline Killing
--------------------------------
The above table describes the most basic keystrokes that you need in
-order to do editing of the input line. For your convenience, many
-other commands have been added in addition to `C-b', `C-f', `C-d', and
-. Here are some commands for moving more rapidly about the line.
+order to do editing of the input line. For your convenience, many other
+commands have been added in addition to 'C-b', 'C-f', 'C-d', and .
+Here are some commands for moving more rapidly about the line.
-`C-a'
+'C-a'
Move to the start of the line.
-
-`C-e'
+'C-e'
Move to the end of the line.
-
-`M-f'
+'M-f'
Move forward a word, where a word is composed of letters and
digits.
-
-`M-b'
+'M-b'
Move backward a word.
-
-`C-l'
+'C-l'
Clear the screen, reprinting the current line at the top.
- Notice how `C-f' moves forward a character, while `M-f' moves
-forward a word. It is a loose convention that control keystrokes
-operate on characters while meta keystrokes operate on words.
+ Notice how 'C-f' moves forward a character, while 'M-f' moves forward
+a word. It is a loose convention that control keystrokes operate on
+characters while meta keystrokes operate on words.
File: readline.info, Node: Readline Killing Commands, Next: Readline Arguments, Prev: Readline Movement Commands, Up: Readline Interaction
@@ -206,51 +194,49 @@ File: readline.info, Node: Readline Killing Commands, Next: Readline Arguments
-------------------------------
"Killing" text means to delete the text from the line, but to save it
-away for later use, usually by "yanking" (re-inserting) it back into
-the line. (`Cut' and `paste' are more recent jargon for `kill' and
-`yank'.)
+away for later use, usually by "yanking" (re-inserting) it back into the
+line. ('Cut' and 'paste' are more recent jargon for 'kill' and 'yank'.)
- If the description for a command says that it `kills' text, then you
+ If the description for a command says that it 'kills' text, then you
can be sure that you can get the text back in a different (or the same)
place later.
- When you use a kill command, the text is saved in a "kill-ring".
-Any number of consecutive kills save all of the killed text together, so
+ When you use a kill command, the text is saved in a "kill-ring". Any
+number of consecutive kills save all of the killed text together, so
that when you yank it back, you get it all. The kill ring is not line
specific; the text that you killed on a previously typed line is
-available to be yanked back later, when you are typing another line.
+available to be yanked back later, when you are typing another line.
Here is the list of commands for killing text.
-`C-k'
+'C-k'
Kill the text from the current cursor position to the end of the
line.
-`M-d'
+'M-d'
Kill from the cursor to the end of the current word, or, if between
words, to the end of the next word. Word boundaries are the same
- as those used by `M-f'.
+ as those used by 'M-f'.
-`M-'
+'M-'
Kill from the cursor the start of the current word, or, if between
words, to the start of the previous word. Word boundaries are the
- same as those used by `M-b'.
-
-`C-w'
- Kill from the cursor to the previous whitespace. This is
- different than `M-' because the word boundaries differ.
+ same as those used by 'M-b'.
+'C-w'
+ Kill from the cursor to the previous whitespace. This is different
+ than 'M-' because the word boundaries differ.
Here is how to "yank" the text back into the line. Yanking means to
copy the most-recently-killed text from the kill buffer.
-`C-y'
+'C-y'
Yank the most recently killed text back into the buffer at the
cursor.
-`M-y'
+'M-y'
Rotate the kill-ring, and yank the new top. You can only do this
- if the prior command is `C-y' or `M-y'.
+ if the prior command is 'C-y' or 'M-y'.
File: readline.info, Node: Readline Arguments, Next: Searching, Prev: Readline Killing Commands, Up: Readline Interaction
@@ -263,15 +249,15 @@ argument acts as a repeat count, other times it is the sign of the
argument that is significant. If you pass a negative argument to a
command which normally acts in a forward direction, that command will
act in a backward direction. For example, to kill text back to the
-start of the line, you might type `M-- C-k'.
+start of the line, you might type 'M-- C-k'.
The general way to pass numeric arguments to a command is to type
-meta digits before the command. If the first `digit' typed is a minus
-sign (`-'), then the sign of the argument will be negative. Once you
+meta digits before the command. If the first 'digit' typed is a minus
+sign ('-'), then the sign of the argument will be negative. Once you
have typed one meta digit to get the argument started, you can type the
-remainder of the digits, and then the command. For example, to give
-the `C-d' command an argument of 10, you could type `M-1 0 C-d', which
-will delete the next ten characters on the input line.
+remainder of the digits, and then the command. For example, to give the
+'C-d' command an argument of 10, you could type 'M-1 0 C-d', which will
+delete the next ten characters on the input line.
File: readline.info, Node: Searching, Prev: Readline Arguments, Up: Readline Interaction
@@ -279,36 +265,36 @@ File: readline.info, Node: Searching, Prev: Readline Arguments, Up: Readline
1.2.5 Searching for Commands in the History
-------------------------------------------
-Readline provides commands for searching through the command history
-for lines containing a specified string. There are two search modes:
+Readline provides commands for searching through the command history for
+lines containing a specified string. There are two search modes:
"incremental" and "non-incremental".
Incremental searches begin before the user has finished typing the
search string. As each character of the search string is typed,
Readline displays the next entry from the history matching the string
-typed so far. An incremental search requires only as many characters
-as needed to find the desired history entry. To search backward in the
-history for a particular string, type `C-r'. Typing `C-s' searches
-forward through the history. The characters present in the value of
-the `isearch-terminators' variable are used to terminate an incremental
+typed so far. An incremental search requires only as many characters as
+needed to find the desired history entry. To search backward in the
+history for a particular string, type 'C-r'. Typing 'C-s' searches
+forward through the history. The characters present in the value of the
+'isearch-terminators' variable are used to terminate an incremental
search. If that variable has not been assigned a value, the and
-`C-J' characters will terminate an incremental search. `C-g' will
-abort an incremental search and restore the original line. When the
-search is terminated, the history entry containing the search string
-becomes the current line.
-
- To find other matching entries in the history list, type `C-r' or
-`C-s' as appropriate. This will search backward or forward in the
-history for the next entry matching the search string typed so far.
-Any other key sequence bound to a Readline command will terminate the
-search and execute that command. For instance, a will terminate
-the search and accept the line, thereby executing the command from the
+'C-J' characters will terminate an incremental search. 'C-g' will abort
+an incremental search and restore the original line. When the search is
+terminated, the history entry containing the search string becomes the
+current line.
+
+ To find other matching entries in the history list, type 'C-r' or
+'C-s' as appropriate. This will search backward or forward in the
+history for the next entry matching the search string typed so far. Any
+other key sequence bound to a Readline command will terminate the search
+and execute that command. For instance, a will terminate the
+search and accept the line, thereby executing the command from the
history list. A movement command will terminate the search, make the
last line found the current line, and begin editing.
- Readline remembers the last incremental search string. If two
-`C-r's are typed without any intervening characters defining a new
-search string, any remembered search string is used.
+ Readline remembers the last incremental search string. If two 'C-r's
+are typed without any intervening characters defining a new search
+string, any remembered search string is used.
Non-incremental searches read the entire search string before
starting to search for matching history lines. The search string may be
@@ -320,19 +306,19 @@ File: readline.info, Node: Readline Init File, Next: Bindable Readline Command
1.3 Readline Init File
======================
-Although the Readline library comes with a set of Emacs-like
-keybindings installed by default, it is possible to use a different set
-of keybindings. Any user can customize programs that use Readline by
+Although the Readline library comes with a set of Emacs-like keybindings
+installed by default, it is possible to use a different set of
+keybindings. Any user can customize programs that use Readline by
putting commands in an "inputrc" file, conventionally in his home
directory. The name of this file is taken from the value of the
-environment variable `INPUTRC'. If that variable is unset, the default
-is `~/.inputrc'. If that file does not exist or cannot be read, the
-ultimate default is `/etc/inputrc'.
+environment variable 'INPUTRC'. If that variable is unset, the default
+is '~/.inputrc'. If that file does not exist or cannot be read, the
+ultimate default is '/etc/inputrc'.
When a program which uses the Readline library starts up, the init
file is read, and the key bindings are set.
- In addition, the `C-x C-r' command re-reads this init file, thus
+ In addition, the 'C-x C-r' command re-reads this init file, thus
incorporating any changes that you might have made to it.
* Menu:
@@ -349,21 +335,21 @@ File: readline.info, Node: Readline Init File Syntax, Next: Conditional Init C
1.3.1 Readline Init File Syntax
-------------------------------
-There are only a few basic constructs allowed in the Readline init
-file. Blank lines are ignored. Lines beginning with a `#' are
-comments. Lines beginning with a `$' indicate conditional constructs
-(*note Conditional Init Constructs::). Other lines denote variable
-settings and key bindings.
+There are only a few basic constructs allowed in the Readline init file.
+Blank lines are ignored. Lines beginning with a '#' are comments.
+Lines beginning with a '$' indicate conditional constructs (*note
+Conditional Init Constructs::). Other lines denote variable settings
+and key bindings.
Variable Settings
You can modify the run-time behavior of Readline by altering the
- values of variables in Readline using the `set' command within the
+ values of variables in Readline using the 'set' command within the
init file. The syntax is simple:
set VARIABLE VALUE
- Here, for example, is how to change from the default Emacs-like
- key binding to use `vi' line editing commands:
+ Here, for example, is how to change from the default Emacs-like key
+ binding to use 'vi' line editing commands:
set editing-mode vi
@@ -371,258 +357,315 @@ Variable Settings
without regard to case. Unrecognized variable names are ignored.
Boolean variables (those that can be set to on or off) are set to
- on if the value is null or empty, ON (case-insensitive), or 1.
- Any other value results in the variable being set to off.
+ on if the value is null or empty, ON (case-insensitive), or 1. Any
+ other value results in the variable being set to off.
A great deal of run-time behavior is changeable with the following
variables.
- `bell-style'
- Controls what happens when Readline wants to ring the
- terminal bell. If set to `none', Readline never rings the
- bell. If set to `visible', Readline uses a visible bell if
- one is available. If set to `audible' (the default),
- Readline attempts to ring the terminal's bell.
-
- `bind-tty-special-chars'
- If set to `on', Readline attempts to bind the control
- characters treated specially by the kernel's terminal driver
- to their Readline equivalents.
-
- `colored-stats'
- If set to `on', Readline displays possible completions using
+ 'bell-style'
+ Controls what happens when Readline wants to ring the terminal
+ bell. If set to 'none', Readline never rings the bell. If
+ set to 'visible', Readline uses a visible bell if one is
+ available. If set to 'audible' (the default), Readline
+ attempts to ring the terminal's bell.
+
+ 'bind-tty-special-chars'
+ If set to 'on' (the default), Readline attempts to bind the
+ control characters treated specially by the kernel's terminal
+ driver to their Readline equivalents.
+
+ 'blink-matching-paren'
+ If set to 'on', Readline attempts to briefly move the cursor
+ to an opening parenthesis when a closing parenthesis is
+ inserted. The default is 'off'.
+
+ 'colored-completion-prefix'
+ If set to 'on', when listing completions, Readline displays
+ the common prefix of the set of possible completions using a
+ different color. The color definitions are taken from the
+ value of the 'LS_COLORS' environment variable. The default is
+ 'off'.
+
+ 'colored-stats'
+ If set to 'on', Readline displays possible completions using
different colors to indicate their file type. The color
- definitions are taken from the value of the `LS_COLORS'
- environment variable. The default is `off'.
+ definitions are taken from the value of the 'LS_COLORS'
+ environment variable. The default is 'off'.
- `comment-begin'
+ 'comment-begin'
The string to insert at the beginning of the line when the
- `insert-comment' command is executed. The default value is
- `"#"'.
+ 'insert-comment' command is executed. The default value is
+ '"#"'.
- `completion-display-width'
+ 'completion-display-width'
The number of screen columns used to display possible matches
when performing completion. The value is ignored if it is
less than 0 or greater than the terminal screen width. A
value of 0 will cause matches to be displayed one per line.
The default value is -1.
- `completion-ignore-case'
- If set to `on', Readline performs filename matching and
+ 'completion-ignore-case'
+ If set to 'on', Readline performs filename matching and
completion in a case-insensitive fashion. The default value
- is `off'.
+ is 'off'.
- `completion-map-case'
- If set to `on', and COMPLETION-IGNORE-CASE is enabled,
- Readline treats hyphens (`-') and underscores (`_') as
+ 'completion-map-case'
+ If set to 'on', and COMPLETION-IGNORE-CASE is enabled,
+ Readline treats hyphens ('-') and underscores ('_') as
equivalent when performing case-insensitive filename matching
and completion.
- `completion-prefix-display-length'
+ 'completion-prefix-display-length'
The length in characters of the common prefix of a list of
possible completions that is displayed without modification.
When set to a value greater than zero, common prefixes longer
than this value are replaced with an ellipsis when displaying
possible completions.
- `completion-query-items'
+ 'completion-query-items'
The number of possible completions that determines when the
user is asked whether the list of possibilities should be
displayed. If the number of possible completions is greater
than this value, Readline will ask the user whether or not he
wishes to view them; otherwise, they are simply listed. This
- variable must be set to an integer value greater than or
- equal to 0. A negative value means Readline should never ask.
- The default limit is `100'.
+ variable must be set to an integer value greater than or equal
+ to 0. A negative value means Readline should never ask. The
+ default limit is '100'.
- `convert-meta'
- If set to `on', Readline will convert characters with the
+ 'convert-meta'
+ If set to 'on', Readline will convert characters with the
eighth bit set to an ASCII key sequence by stripping the
eighth bit and prefixing an character, converting them
- to a meta-prefixed key sequence. The default value is `on'.
-
- `disable-completion'
- If set to `On', Readline will inhibit word completion.
- Completion characters will be inserted into the line as if
- they had been mapped to `self-insert'. The default is `off'.
+ to a meta-prefixed key sequence. The default value is 'on',
+ but will be set to 'off' if the locale is one that contains
+ eight-bit characters.
- `editing-mode'
- The `editing-mode' variable controls which default set of key
- bindings is used. By default, Readline starts up in Emacs
- editing mode, where the keystrokes are most similar to Emacs.
- This variable can be set to either `emacs' or `vi'.
+ 'disable-completion'
+ If set to 'On', Readline will inhibit word completion.
+ Completion characters will be inserted into the line as if
+ they had been mapped to 'self-insert'. The default is 'off'.
- `echo-control-characters'
- When set to `on', on operating systems that indicate they
+ 'echo-control-characters'
+ When set to 'on', on operating systems that indicate they
support it, readline echoes a character corresponding to a
- signal generated from the keyboard. The default is `on'.
+ signal generated from the keyboard. The default is 'on'.
- `enable-keypad'
- When set to `on', Readline will try to enable the application
+ 'editing-mode'
+ The 'editing-mode' variable controls which default set of key
+ bindings is used. By default, Readline starts up in Emacs
+ editing mode, where the keystrokes are most similar to Emacs.
+ This variable can be set to either 'emacs' or 'vi'.
+
+ 'emacs-mode-string'
+ This string is displayed immediately before the last line of
+ the primary prompt when emacs editing mode is active. The
+ value is expanded like a key binding, so the standard set of
+ meta- and control prefixes and backslash escape sequences is
+ available. Use the '\1' and '\2' escapes to begin and end
+ sequences of non-printing characters, which can be used to
+ embed a terminal control sequence into the mode string. The
+ default is '@'.
+
+ 'enable-bracketed-paste'
+ When set to 'On', Readline will configure the terminal in a
+ way that will enable it to insert each paste into the editing
+ buffer as a single string of characters, instead of treating
+ each character as if it had been read from the keyboard. This
+ can prevent pasted characters from being interpreted as
+ editing commands. The default is 'off'.
+
+ 'enable-keypad'
+ When set to 'on', Readline will try to enable the application
keypad when it is called. Some systems need this to enable
- the arrow keys. The default is `off'.
+ the arrow keys. The default is 'off'.
- `enable-meta-key'
- When set to `on', Readline will try to enable any meta
- modifier key the terminal claims to support when it is
- called. On many terminals, the meta key is used to send
- eight-bit characters. The default is `on'.
+ 'enable-meta-key'
+ When set to 'on', Readline will try to enable any meta
+ modifier key the terminal claims to support when it is called.
+ On many terminals, the meta key is used to send eight-bit
+ characters. The default is 'on'.
- `expand-tilde'
- If set to `on', tilde expansion is performed when Readline
- attempts word completion. The default is `off'.
+ 'expand-tilde'
+ If set to 'on', tilde expansion is performed when Readline
+ attempts word completion. The default is 'off'.
- `history-preserve-point'
- If set to `on', the history code attempts to place the point
+ 'history-preserve-point'
+ If set to 'on', the history code attempts to place the point
(the current cursor position) at the same location on each
- history line retrieved with `previous-history' or
- `next-history'. The default is `off'.
-
- `history-size'
- Set the maximum number of history entries saved in the
- history list. If set to zero, any existing history entries
- are deleted and no new entries are saved. If set to a value
- less than zero, the number of history entries is not limited.
- By default, the number of history entries is not limited.
-
- `horizontal-scroll-mode'
- This variable can be set to either `on' or `off'. Setting it
- to `on' means that the text of the lines being edited will
+ history line retrieved with 'previous-history' or
+ 'next-history'. The default is 'off'.
+
+ 'history-size'
+ Set the maximum number of history entries saved in the history
+ list. If set to zero, any existing history entries are
+ deleted and no new entries are saved. If set to a value less
+ than zero, the number of history entries is not limited. By
+ default, the number of history entries is not limited. If an
+ attempt is made to set HISTORY-SIZE to a non-numeric value,
+ the maximum number of history entries will be set to 500.
+
+ 'horizontal-scroll-mode'
+ This variable can be set to either 'on' or 'off'. Setting it
+ to 'on' means that the text of the lines being edited will
scroll horizontally on a single screen line when they are
longer than the width of the screen, instead of wrapping onto
- a new screen line. By default, this variable is set to `off'.
+ a new screen line. By default, this variable is set to 'off'.
- `input-meta'
- If set to `on', Readline will enable eight-bit input (it will
+ 'input-meta'
+ If set to 'on', Readline will enable eight-bit input (it will
not clear the eighth bit in the characters it reads),
regardless of what the terminal claims it can support. The
- default value is `off'. The name `meta-flag' is a synonym
- for this variable.
+ default value is 'off', but Readline will set it to 'on' if
+ the locale contains eight-bit characters. The name
+ 'meta-flag' is a synonym for this variable.
- `isearch-terminators'
+ 'isearch-terminators'
The string of characters that should terminate an incremental
search without subsequently executing the character as a
command (*note Searching::). If this variable has not been
- given a value, the characters and `C-J' will terminate
+ given a value, the characters and 'C-J' will terminate
an incremental search.
- `keymap'
+ 'keymap'
Sets Readline's idea of the current keymap for key binding
- commands. Acceptable `keymap' names are `emacs',
- `emacs-standard', `emacs-meta', `emacs-ctlx', `vi', `vi-move',
- `vi-command', and `vi-insert'. `vi' is equivalent to
- `vi-command'; `emacs' is equivalent to `emacs-standard'. The
- default value is `emacs'. The value of the `editing-mode'
- variable also affects the default keymap.
-
- `keyseq-timeout'
- Specifies the duration Readline will wait for a character
- when reading an ambiguous key sequence (one that can form a
- complete key sequence using the input read so far, or can
- take additional input to complete a longer key sequence). If
- no input is received within the timeout, Readline will use
- the shorter but complete key sequence. Readline uses this
- value to determine whether or not input is available on the
- current input source (`rl_instream' by default). The value
- is specified in milliseconds, so a value of 1000 means that
+ commands. Acceptable 'keymap' names are 'emacs',
+ 'emacs-standard', 'emacs-meta', 'emacs-ctlx', 'vi', 'vi-move',
+ 'vi-command', and 'vi-insert'. 'vi' is equivalent to
+ 'vi-command' ('vi-move' is also a synonym); 'emacs' is
+ equivalent to 'emacs-standard'. The default value is 'emacs'.
+ The value of the 'editing-mode' variable also affects the
+ default keymap.
+
+ 'keyseq-timeout'
+ Specifies the duration Readline will wait for a character when
+ reading an ambiguous key sequence (one that can form a
+ complete key sequence using the input read so far, or can take
+ additional input to complete a longer key sequence). If no
+ input is received within the timeout, Readline will use the
+ shorter but complete key sequence. Readline uses this value
+ to determine whether or not input is available on the current
+ input source ('rl_instream' by default). The value is
+ specified in milliseconds, so a value of 1000 means that
Readline will wait one second for additional input. If this
variable is set to a value less than or equal to zero, or to a
non-numeric value, Readline will wait until another key is
- pressed to decide which key sequence to complete. The
- default value is `500'.
+ pressed to decide which key sequence to complete. The default
+ value is '500'.
- `mark-directories'
- If set to `on', completed directory names have a slash
- appended. The default is `on'.
+ 'mark-directories'
+ If set to 'on', completed directory names have a slash
+ appended. The default is 'on'.
- `mark-modified-lines'
- This variable, when set to `on', causes Readline to display an
- asterisk (`*') at the start of history lines which have been
- modified. This variable is `off' by default.
+ 'mark-modified-lines'
+ This variable, when set to 'on', causes Readline to display an
+ asterisk ('*') at the start of history lines which have been
+ modified. This variable is 'off' by default.
- `mark-symlinked-directories'
- If set to `on', completed names which are symbolic links to
+ 'mark-symlinked-directories'
+ If set to 'on', completed names which are symbolic links to
directories have a slash appended (subject to the value of
- `mark-directories'). The default is `off'.
+ 'mark-directories'). The default is 'off'.
- `match-hidden-files'
- This variable, when set to `on', causes Readline to match
- files whose names begin with a `.' (hidden files) when
- performing filename completion. If set to `off', the leading
- `.' must be supplied by the user in the filename to be
- completed. This variable is `on' by default.
+ 'match-hidden-files'
+ This variable, when set to 'on', causes Readline to match
+ files whose names begin with a '.' (hidden files) when
+ performing filename completion. If set to 'off', the leading
+ '.' must be supplied by the user in the filename to be
+ completed. This variable is 'on' by default.
- `menu-complete-display-prefix'
- If set to `on', menu completion displays the common prefix of
+ 'menu-complete-display-prefix'
+ If set to 'on', menu completion displays the common prefix of
the list of possible completions (which may be empty) before
- cycling through the list. The default is `off'.
+ cycling through the list. The default is 'off'.
- `output-meta'
- If set to `on', Readline will display characters with the
+ 'output-meta'
+ If set to 'on', Readline will display characters with the
eighth bit set directly rather than as a meta-prefixed escape
- sequence. The default is `off'.
+ sequence. The default is 'off', but Readline will set it to
+ 'on' if the locale contains eight-bit characters.
- `page-completions'
- If set to `on', Readline uses an internal `more'-like pager
- to display a screenful of possible completions at a time.
- This variable is `on' by default.
+ 'page-completions'
+ If set to 'on', Readline uses an internal 'more'-like pager to
+ display a screenful of possible completions at a time. This
+ variable is 'on' by default.
- `print-completions-horizontally'
- If set to `on', Readline will display completions with matches
+ 'print-completions-horizontally'
+ If set to 'on', Readline will display completions with matches
sorted horizontally in alphabetical order, rather than down
- the screen. The default is `off'.
+ the screen. The default is 'off'.
- `revert-all-at-newline'
- If set to `on', Readline will undo all changes to history
- lines before returning when `accept-line' is executed. By
+ 'revert-all-at-newline'
+ If set to 'on', Readline will undo all changes to history
+ lines before returning when 'accept-line' is executed. By
default, history lines may be modified and retain individual
- undo lists across calls to `readline'. The default is `off'.
+ undo lists across calls to 'readline'. The default is 'off'.
- `show-all-if-ambiguous'
+ 'show-all-if-ambiguous'
This alters the default behavior of the completion functions.
- If set to `on', words which have more than one possible
+ If set to 'on', words which have more than one possible
completion cause the matches to be listed immediately instead
- of ringing the bell. The default value is `off'.
+ of ringing the bell. The default value is 'off'.
- `show-all-if-unmodified'
+ 'show-all-if-unmodified'
This alters the default behavior of the completion functions
in a fashion similar to SHOW-ALL-IF-AMBIGUOUS. If set to
- `on', words which have more than one possible completion
+ 'on', words which have more than one possible completion
without any possible partial completion (the possible
completions don't share a common prefix) cause the matches to
be listed immediately instead of ringing the bell. The
- default value is `off'.
-
- `show-mode-in-prompt'
- If set to `on', add a character to the beginning of the prompt
- indicating the editing mode: emacs (`@'), vi command (`:'),
- or vi insertion (`+'). The default value is `off'.
-
- `skip-completed-text'
- If set to `on', this alters the default completion behavior
- when inserting a single match into the line. It's only
- active when performing completion in the middle of a word.
- If enabled, readline does not insert characters from the
- completion that match characters after point in the word
- being completed, so portions of the word following the cursor
- are not duplicated. For instance, if this is enabled,
- attempting completion when the cursor is after the `e' in
- `Makefile' will result in `Makefile' rather than
- `Makefilefile', assuming there is a single possible
- completion. The default value is `off'.
-
- `visible-stats'
- If set to `on', a character denoting a file's type is
- appended to the filename when listing possible completions.
- The default is `off'.
-
+ default value is 'off'.
+
+ 'show-mode-in-prompt'
+ If set to 'on', add a character to the beginning of the prompt
+ indicating the editing mode: emacs, vi command, or vi
+ insertion. The mode strings are user-settable. The default
+ value is 'off'.
+
+ 'skip-completed-text'
+ If set to 'on', this alters the default completion behavior
+ when inserting a single match into the line. It's only active
+ when performing completion in the middle of a word. If
+ enabled, readline does not insert characters from the
+ completion that match characters after point in the word being
+ completed, so portions of the word following the cursor are
+ not duplicated. For instance, if this is enabled, attempting
+ completion when the cursor is after the 'e' in 'Makefile' will
+ result in 'Makefile' rather than 'Makefilefile', assuming
+ there is a single possible completion. The default value is
+ 'off'.
+
+ 'vi-cmd-mode-string'
+ This string is displayed immediately before the last line of
+ the primary prompt when vi editing mode is active and in
+ command mode. The value is expanded like a key binding, so
+ the standard set of meta- and control prefixes and backslash
+ escape sequences is available. Use the '\1' and '\2' escapes
+ to begin and end sequences of non-printing characters, which
+ can be used to embed a terminal control sequence into the mode
+ string. The default is '(cmd)'.
+
+ 'vi-ins-mode-string'
+ This string is displayed immediately before the last line of
+ the primary prompt when vi editing mode is active and in
+ insertion mode. The value is expanded like a key binding, so
+ the standard set of meta- and control prefixes and backslash
+ escape sequences is available. Use the '\1' and '\2' escapes
+ to begin and end sequences of non-printing characters, which
+ can be used to embed a terminal control sequence into the mode
+ string. The default is '(ins)'.
+
+ 'visible-stats'
+ If set to 'on', a character denoting a file's type is appended
+ to the filename when listing possible completions. The
+ default is 'off'.
Key Bindings
- The syntax for controlling key bindings in the init file is
- simple. First you need to find the name of the command that you
- want to change. The following sections contain tables of the
- command name, the default keybinding, if any, and a short
- description of what the command does.
+ The syntax for controlling key bindings in the init file is simple.
+ First you need to find the name of the command that you want to
+ change. The following sections contain tables of the command name,
+ the default keybinding, if any, and a short description of what the
+ command does.
Once you know the name of the command, simply place on a line in
the init file the name of the key you wish to bind the command to,
@@ -631,27 +674,27 @@ Key Bindings
part of the key name. The name of the key can be expressed in
different ways, depending on what you find most comfortable.
- In addition to command names, readline allows keys to be bound to
- a string that is inserted when the key is pressed (a MACRO).
+ In addition to command names, readline allows keys to be bound to a
+ string that is inserted when the key is pressed (a MACRO).
- KEYNAME: FUNCTION-NAME or MACRO
+ KEYNAME: FUNCTION-NAME or MACRO
KEYNAME is the name of a key spelled out in English. For
example:
Control-u: universal-argument
Meta-Rubout: backward-kill-word
Control-o: "> output"
- In the above example, `C-u' is bound to the function
- `universal-argument', `M-DEL' is bound to the function
- `backward-kill-word', and `C-o' is bound to run the macro
+ In the above example, 'C-u' is bound to the function
+ 'universal-argument', 'M-DEL' is bound to the function
+ 'backward-kill-word', and 'C-o' is bound to run the macro
expressed on the right hand side (that is, to insert the text
- `> output' into the line).
+ '> output' into the line).
A number of symbolic character names are recognized while
processing this key binding syntax: DEL, ESC, ESCAPE, LFD,
NEWLINE, RET, RETURN, RUBOUT, SPACE, SPC, and TAB.
- "KEYSEQ": FUNCTION-NAME or MACRO
+ "KEYSEQ": FUNCTION-NAME or MACRO
KEYSEQ differs from KEYNAME above in that strings denoting an
entire key sequence can be specified, by placing the key
sequence in double quotes. Some GNU Emacs style key escapes
@@ -662,66 +705,51 @@ Key Bindings
"\C-x\C-r": re-read-init-file
"\e[11~": "Function Key 1"
- In the above example, `C-u' is again bound to the function
- `universal-argument' (just as it was in the first example),
- `C-x C-r' is bound to the function `re-read-init-file', and
- ` <[> <1> <1> <~>' is bound to insert the text `Function
- Key 1'.
-
+ In the above example, 'C-u' is again bound to the function
+ 'universal-argument' (just as it was in the first example),
+ ''C-x' 'C-r'' is bound to the function 're-read-init-file',
+ and ' <[> <1> <1> <~>' is bound to insert the text
+ 'Function Key 1'.
The following GNU Emacs style escape sequences are available when
specifying key sequences:
- `\C-'
+ '\C-'
control prefix
-
- `\M-'
+ '\M-'
meta prefix
-
- `\e'
+ '\e'
an escape character
-
- `\\'
+ '\\'
backslash
-
- `\"'
+ '\"'
<">, a double quotation mark
-
- `\''
+ '\''
<'>, a single quote or apostrophe
In addition to the GNU Emacs style escape sequences, a second set
of backslash escapes is available:
- `\a'
+ '\a'
alert (bell)
-
- `\b'
+ '\b'
backspace
-
- `\d'
+ '\d'
delete
-
- `\f'
+ '\f'
form feed
-
- `\n'
+ '\n'
newline
-
- `\r'
+ '\r'
carriage return
-
- `\t'
+ '\t'
horizontal tab
-
- `\v'
+ '\v'
vertical tab
-
- `\NNN'
+ '\NNN'
the eight-bit character whose value is the octal value NNN
(one to three digits)
-
- `\xHH'
+ '\xHH'
the eight-bit character whose value is the hexadecimal value
HH (one or two hex digits)
@@ -729,12 +757,11 @@ Key Bindings
used to indicate a macro definition. Unquoted text is assumed to
be a function name. In the macro body, the backslash escapes
described above are expanded. Backslash will quote any other
- character in the macro text, including `"' and `''. For example,
- the following binding will make `C-x \' insert a single `\' into
+ character in the macro text, including '"' and '''. For example,
+ the following binding will make ''C-x' \' insert a single '\' into
the line:
"\C-x\\": "\\"
-
File: readline.info, Node: Conditional Init Constructs, Next: Sample Init File, Prev: Readline Init File Syntax, Up: Readline Init File
@@ -742,33 +769,32 @@ File: readline.info, Node: Conditional Init Constructs, Next: Sample Init File
---------------------------------
Readline implements a facility similar in spirit to the conditional
-compilation features of the C preprocessor which allows key bindings
-and variable settings to be performed as the result of tests. There
-are four parser directives used.
-
-`$if'
- The `$if' construct allows bindings to be made based on the
- editing mode, the terminal being used, or the application using
- Readline. The text of the test extends to the end of the line; no
- characters are required to isolate it.
-
- `mode'
- The `mode=' form of the `$if' directive is used to test
- whether Readline is in `emacs' or `vi' mode. This may be
- used in conjunction with the `set keymap' command, for
- instance, to set bindings in the `emacs-standard' and
- `emacs-ctlx' keymaps only if Readline is starting out in
- `emacs' mode.
-
- `term'
- The `term=' form may be used to include terminal-specific key
+compilation features of the C preprocessor which allows key bindings and
+variable settings to be performed as the result of tests. There are
+four parser directives used.
+
+'$if'
+ The '$if' construct allows bindings to be made based on the editing
+ mode, the terminal being used, or the application using Readline.
+ The text of the test extends to the end of the line; no characters
+ are required to isolate it.
+
+ 'mode'
+ The 'mode=' form of the '$if' directive is used to test
+ whether Readline is in 'emacs' or 'vi' mode. This may be used
+ in conjunction with the 'set keymap' command, for instance, to
+ set bindings in the 'emacs-standard' and 'emacs-ctlx' keymaps
+ only if Readline is starting out in 'emacs' mode.
+
+ 'term'
+ The 'term=' form may be used to include terminal-specific key
bindings, perhaps to bind the key sequences output by the
terminal's function keys. The word on the right side of the
- `=' is tested against both the full name of the terminal and
- the portion of the terminal name before the first `-'. This
- allows `sun' to match both `sun' and `sun-cmd', for instance.
+ '=' is tested against both the full name of the terminal and
+ the portion of the terminal name before the first '-'. This
+ allows 'sun' to match both 'sun' and 'sun-cmd', for instance.
- `application'
+ 'application'
The APPLICATION construct is used to include
application-specific settings. Each program using the
Readline library sets the APPLICATION NAME, and you can test
@@ -781,18 +807,18 @@ are four parser directives used.
"\C-xq": "\eb\"\ef\""
$endif
-`$endif'
- This command, as seen in the previous example, terminates an `$if'
+'$endif'
+ This command, as seen in the previous example, terminates an '$if'
command.
-`$else'
- Commands in this branch of the `$if' directive are executed if the
+'$else'
+ Commands in this branch of the '$if' directive are executed if the
test fails.
-`$include'
+'$include'
This directive takes a single filename as an argument and reads
commands and bindings from that file. For example, the following
- directive reads from `/etc/inputrc':
+ directive reads from '/etc/inputrc':
$include /etc/inputrc
@@ -804,7 +830,6 @@ File: readline.info, Node: Sample Init File, Prev: Conditional Init Constructs
Here is an example of an INPUTRC file. This illustrates key binding,
variable assignment, and conditional syntax.
-
# This file controls the behaviour of line input editing for
# programs that use the GNU Readline library. Existing
# programs include FTP, Bash, and GDB.
@@ -922,14 +947,14 @@ File: readline.info, Node: Bindable Readline Commands, Next: Readline vi Mode,
* Keyboard Macros:: Saving and re-executing typed characters
* Miscellaneous Commands:: Other miscellaneous commands.
- This section describes Readline commands that may be bound to key
+This section describes Readline commands that may be bound to key
sequences. Command names without an accompanying key sequence are
unbound by default.
In the following descriptions, "point" refers to the current cursor
-position, and "mark" refers to a cursor position saved by the
-`set-mark' command. The text between the point and mark is referred to
-as the "region".
+position, and "mark" refers to a cursor position saved by the 'set-mark'
+command. The text between the point and mark is referred to as the
+"region".
File: readline.info, Node: Commands For Moving, Next: Commands For History, Up: Bindable Readline Commands
@@ -937,125 +962,123 @@ File: readline.info, Node: Commands For Moving, Next: Commands For History, U
1.4.1 Commands For Moving
-------------------------
-`beginning-of-line (C-a)'
+'beginning-of-line (C-a)'
Move to the start of the current line.
-`end-of-line (C-e)'
+'end-of-line (C-e)'
Move to the end of the line.
-`forward-char (C-f)'
+'forward-char (C-f)'
Move forward a character.
-`backward-char (C-b)'
+'backward-char (C-b)'
Move back a character.
-`forward-word (M-f)'
+'forward-word (M-f)'
Move forward to the end of the next word. Words are composed of
letters and digits.
-`backward-word (M-b)'
+'backward-word (M-b)'
Move back to the start of the current or previous word. Words are
composed of letters and digits.
-`clear-screen (C-l)'
+'clear-screen (C-l)'
Clear the screen and redraw the current line, leaving the current
line at the top of the screen.
-`redraw-current-line ()'
+'redraw-current-line ()'
Refresh the current line. By default, this is unbound.
-
File: readline.info, Node: Commands For History, Next: Commands For Text, Prev: Commands For Moving, Up: Bindable Readline Commands
1.4.2 Commands For Manipulating The History
-------------------------------------------
-`accept-line (Newline or Return)'
+'accept-line (Newline or Return)'
Accept the line regardless of where the cursor is. If this line is
non-empty, it may be added to the history list for future recall
- with `add_history()'. If this line is a modified history line,
- the history line is restored to its original state.
+ with 'add_history()'. If this line is a modified history line, the
+ history line is restored to its original state.
-`previous-history (C-p)'
- Move `back' through the history list, fetching the previous
+'previous-history (C-p)'
+ Move 'back' through the history list, fetching the previous
command.
-`next-history (C-n)'
- Move `forward' through the history list, fetching the next command.
+'next-history (C-n)'
+ Move 'forward' through the history list, fetching the next command.
-`beginning-of-history (M-<)'
+'beginning-of-history (M-<)'
Move to the first line in the history.
-`end-of-history (M->)'
+'end-of-history (M->)'
Move to the end of the input history, i.e., the line currently
being entered.
-`reverse-search-history (C-r)'
- Search backward starting at the current line and moving `up'
+'reverse-search-history (C-r)'
+ Search backward starting at the current line and moving 'up'
through the history as necessary. This is an incremental search.
-`forward-search-history (C-s)'
- Search forward starting at the current line and moving `down'
- through the the history as necessary. This is an incremental
- search.
+'forward-search-history (C-s)'
+ Search forward starting at the current line and moving 'down'
+ through the history as necessary. This is an incremental search.
-`non-incremental-reverse-search-history (M-p)'
- Search backward starting at the current line and moving `up'
- through the history as necessary using a non-incremental search
- for a string supplied by the user.
+'non-incremental-reverse-search-history (M-p)'
+ Search backward starting at the current line and moving 'up'
+ through the history as necessary using a non-incremental search for
+ a string supplied by the user. The search string may match
+ anywhere in a history line.
-`non-incremental-forward-search-history (M-n)'
- Search forward starting at the current line and moving `down'
- through the the history as necessary using a non-incremental search
- for a string supplied by the user.
+'non-incremental-forward-search-history (M-n)'
+ Search forward starting at the current line and moving 'down'
+ through the history as necessary using a non-incremental search for
+ a string supplied by the user. The search string may match
+ anywhere in a history line.
-`history-search-forward ()'
+'history-search-forward ()'
Search forward through the history for the string of characters
between the start of the current line and the point. The search
string must match at the beginning of a history line. This is a
non-incremental search. By default, this command is unbound.
-`history-search-backward ()'
+'history-search-backward ()'
Search backward through the history for the string of characters
between the start of the current line and the point. The search
string must match at the beginning of a history line. This is a
non-incremental search. By default, this command is unbound.
-`history-substr-search-forward ()'
+'history-substr-search-forward ()'
Search forward through the history for the string of characters
between the start of the current line and the point. The search
string may match anywhere in a history line. This is a
non-incremental search. By default, this command is unbound.
-`history-substr-search-backward ()'
+'history-substr-search-backward ()'
Search backward through the history for the string of characters
between the start of the current line and the point. The search
string may match anywhere in a history line. This is a
non-incremental search. By default, this command is unbound.
-`yank-nth-arg (M-C-y)'
+'yank-nth-arg (M-C-y)'
Insert the first argument to the previous command (usually the
second word on the previous line) at point. With an argument N,
insert the Nth word from the previous command (the words in the
previous command begin with word 0). A negative argument inserts
the Nth word from the end of the previous command. Once the
- argument N is computed, the argument is extracted as if the `!N'
+ argument N is computed, the argument is extracted as if the '!N'
history expansion had been specified.
-`yank-last-arg (M-. or M-_)'
+'yank-last-arg (M-. or M-_)'
Insert last argument to the previous command (the last word of the
previous history entry). With a numeric argument, behave exactly
- like `yank-nth-arg'. Successive calls to `yank-last-arg' move
- back through the history list, inserting the last word (or the
- word specified by the argument to the first call) of each line in
- turn. Any numeric argument supplied to these successive calls
- determines the direction to move through the history. A negative
- argument switches the direction through the history (back or
- forward). The history expansion facilities are used to extract
- the last argument, as if the `!$' history expansion had been
- specified.
-
+ like 'yank-nth-arg'. Successive calls to 'yank-last-arg' move back
+ through the history list, inserting the last word (or the word
+ specified by the argument to the first call) of each line in turn.
+ Any numeric argument supplied to these successive calls determines
+ the direction to move through the history. A negative argument
+ switches the direction through the history (back or forward). The
+ history expansion facilities are used to extract the last argument,
+ as if the '!$' history expansion had been specified.
File: readline.info, Node: Commands For Text, Next: Commands For Killing, Prev: Commands For History, Up: Bindable Readline Commands
@@ -1063,139 +1086,147 @@ File: readline.info, Node: Commands For Text, Next: Commands For Killing, Pre
1.4.3 Commands For Changing Text
--------------------------------
-`end-of-file (usually C-d)'
+'end-of-file (usually C-d)'
The character indicating end-of-file as set, for example, by
- `stty'. If this character is read when there are no characters on
+ 'stty'. If this character is read when there are no characters on
the line, and point is at the beginning of the line, Readline
interprets it as the end of input and returns EOF.
-`delete-char (C-d)'
+'delete-char (C-d)'
Delete the character at point. If this function is bound to the
- same character as the tty EOF character, as `C-d' commonly is, see
+ same character as the tty EOF character, as 'C-d' commonly is, see
above for the effects.
-`backward-delete-char (Rubout)'
+'backward-delete-char (Rubout)'
Delete the character behind the cursor. A numeric argument means
to kill the characters instead of deleting them.
-`forward-backward-delete-char ()'
+'forward-backward-delete-char ()'
Delete the character under the cursor, unless the cursor is at the
end of the line, in which case the character behind the cursor is
deleted. By default, this is not bound to a key.
-`quoted-insert (C-q or C-v)'
+'quoted-insert (C-q or C-v)'
Add the next character typed to the line verbatim. This is how to
- insert key sequences like `C-q', for example.
+ insert key sequences like 'C-q', for example.
-`tab-insert (M-)'
+'tab-insert (M-)'
Insert a tab character.
-`self-insert (a, b, A, 1, !, ...)'
+'self-insert (a, b, A, 1, !, ...)'
Insert yourself.
-`transpose-chars (C-t)'
+'bracketed-paste-begin ()'
+ This function is intended to be bound to the "bracketed paste"
+ escape sequence sent by some terminals, and such a binding is
+ assigned by default. It allows Readline to insert the pasted text
+ as a single unit without treating each character as if it had been
+ read from the keyboard. The characters are inserted as if each one
+ was bound to 'self-insert') instead of executing any editing
+ commands.
+
+'transpose-chars (C-t)'
Drag the character before the cursor forward over the character at
the cursor, moving the cursor forward as well. If the insertion
point is at the end of the line, then this transposes the last two
characters of the line. Negative arguments have no effect.
-`transpose-words (M-t)'
+'transpose-words (M-t)'
Drag the word before point past the word after point, moving point
past that word as well. If the insertion point is at the end of
the line, this transposes the last two words on the line.
-`upcase-word (M-u)'
+'upcase-word (M-u)'
Uppercase the current (or following) word. With a negative
argument, uppercase the previous word, but do not move the cursor.
-`downcase-word (M-l)'
+'downcase-word (M-l)'
Lowercase the current (or following) word. With a negative
argument, lowercase the previous word, but do not move the cursor.
-`capitalize-word (M-c)'
+'capitalize-word (M-c)'
Capitalize the current (or following) word. With a negative
argument, capitalize the previous word, but do not move the cursor.
-`overwrite-mode ()'
+'overwrite-mode ()'
Toggle overwrite mode. With an explicit positive numeric argument,
switches to overwrite mode. With an explicit non-positive numeric
argument, switches to insert mode. This command affects only
- `emacs' mode; `vi' mode does overwrite differently. Each call to
- `readline()' starts in insert mode.
+ 'emacs' mode; 'vi' mode does overwrite differently. Each call to
+ 'readline()' starts in insert mode.
- In overwrite mode, characters bound to `self-insert' replace the
+ In overwrite mode, characters bound to 'self-insert' replace the
text at point rather than pushing the text to the right.
- Characters bound to `backward-delete-char' replace the character
+ Characters bound to 'backward-delete-char' replace the character
before point with a space.
By default, this command is unbound.
-
File: readline.info, Node: Commands For Killing, Next: Numeric Arguments, Prev: Commands For Text, Up: Bindable Readline Commands
1.4.4 Killing And Yanking
-------------------------
-`kill-line (C-k)'
+'kill-line (C-k)'
Kill the text from point to the end of the line.
-`backward-kill-line (C-x Rubout)'
- Kill backward to the beginning of the line.
+'backward-kill-line (C-x Rubout)'
+ Kill backward from the cursor to the beginning of the current line.
-`unix-line-discard (C-u)'
+'unix-line-discard (C-u)'
Kill backward from the cursor to the beginning of the current line.
-`kill-whole-line ()'
+'kill-whole-line ()'
Kill all characters on the current line, no matter where point is.
By default, this is unbound.
-`kill-word (M-d)'
+'kill-word (M-d)'
Kill from point to the end of the current word, or if between
words, to the end of the next word. Word boundaries are the same
- as `forward-word'.
+ as 'forward-word'.
-`backward-kill-word (M-)'
+'backward-kill-word (M-)'
Kill the word behind point. Word boundaries are the same as
- `backward-word'.
+ 'backward-word'.
-`unix-word-rubout (C-w)'
+'unix-word-rubout (C-w)'
Kill the word behind point, using white space as a word boundary.
The killed text is saved on the kill-ring.
-`unix-filename-rubout ()'
+'unix-filename-rubout ()'
Kill the word behind point, using white space and the slash
character as the word boundaries. The killed text is saved on the
kill-ring.
-`delete-horizontal-space ()'
+'delete-horizontal-space ()'
Delete all spaces and tabs around point. By default, this is
unbound.
-`kill-region ()'
+'kill-region ()'
Kill the text in the current region. By default, this command is
unbound.
-`copy-region-as-kill ()'
+'copy-region-as-kill ()'
Copy the text in the region to the kill buffer, so it can be yanked
right away. By default, this command is unbound.
-`copy-backward-word ()'
- Copy the word before point to the kill buffer. The word
- boundaries are the same as `backward-word'. By default, this
- command is unbound.
+'copy-backward-word ()'
+ Copy the word before point to the kill buffer. The word boundaries
+ are the same as 'backward-word'. By default, this command is
+ unbound.
-`copy-forward-word ()'
+'copy-forward-word ()'
Copy the word following point to the kill buffer. The word
- boundaries are the same as `forward-word'. By default, this
+ boundaries are the same as 'forward-word'. By default, this
command is unbound.
-`yank (C-y)'
+'yank (C-y)'
Yank the top of the kill ring into the buffer at point.
-`yank-pop (M-y)'
+'yank-pop (M-y)'
Rotate the kill-ring, and yank the new top. You can only do this
- if the prior command is `yank' or `yank-pop'.
+ if the prior command is 'yank' or 'yank-pop'.
File: readline.info, Node: Numeric Arguments, Next: Commands For Completion, Prev: Commands For Killing, Up: Bindable Readline Commands
@@ -1203,22 +1234,22 @@ File: readline.info, Node: Numeric Arguments, Next: Commands For Completion,
1.4.5 Specifying Numeric Arguments
----------------------------------
-`digit-argument (M-0, M-1, ... M--)'
+'digit-argument (M-0, M-1, ... M--)'
Add this digit to the argument already accumulating, or start a new
- argument. `M--' starts a negative argument.
+ argument. 'M--' starts a negative argument.
-`universal-argument ()'
+'universal-argument ()'
This is another way to specify an argument. If this command is
followed by one or more digits, optionally with a leading minus
- sign, those digits define the argument. If the command is
- followed by digits, executing `universal-argument' again ends the
- numeric argument, but is otherwise ignored. As a special case, if
- this command is immediately followed by a character that is
- neither a digit or minus sign, the argument count for the next
- command is multiplied by four. The argument count is initially
- one, so executing this function the first time makes the argument
- count four, a second time makes the argument count sixteen, and so
- on. By default, this is not bound to a key.
+ sign, those digits define the argument. If the command is followed
+ by digits, executing 'universal-argument' again ends the numeric
+ argument, but is otherwise ignored. As a special case, if this
+ command is immediately followed by a character that is neither a
+ digit nor minus sign, the argument count for the next command is
+ multiplied by four. The argument count is initially one, so
+ executing this function the first time makes the argument count
+ four, a second time makes the argument count sixteen, and so on.
+ By default, this is not bound to a key.
File: readline.info, Node: Commands For Completion, Next: Keyboard Macros, Prev: Numeric Arguments, Up: Bindable Readline Commands
@@ -1226,199 +1257,195 @@ File: readline.info, Node: Commands For Completion, Next: Keyboard Macros, Pr
1.4.6 Letting Readline Type For You
-----------------------------------
-`complete ()'
- Attempt to perform completion on the text before point. The
- actual completion performed is application-specific. The default
- is filename completion.
+'complete ()'
+ Attempt to perform completion on the text before point. The actual
+ completion performed is application-specific. The default is
+ filename completion.
-`possible-completions (M-?)'
+'possible-completions (M-?)'
List the possible completions of the text before point. When
displaying completions, Readline sets the number of columns used
- for display to the value of `completion-display-width', the value
- of the environment variable `COLUMNS', or the screen width, in
- that order.
+ for display to the value of 'completion-display-width', the value
+ of the environment variable 'COLUMNS', or the screen width, in that
+ order.
-`insert-completions (M-*)'
+'insert-completions (M-*)'
Insert all completions of the text before point that would have
- been generated by `possible-completions'.
+ been generated by 'possible-completions'.
-`menu-complete ()'
- Similar to `complete', but replaces the word to be completed with
- a single match from the list of possible completions. Repeated
- execution of `menu-complete' steps through the list of possible
+'menu-complete ()'
+ Similar to 'complete', but replaces the word to be completed with a
+ single match from the list of possible completions. Repeated
+ execution of 'menu-complete' steps through the list of possible
completions, inserting each match in turn. At the end of the list
of completions, the bell is rung (subject to the setting of
- `bell-style') and the original text is restored. An argument of N
+ 'bell-style') and the original text is restored. An argument of N
moves N positions forward in the list of matches; a negative
argument may be used to move backward through the list. This
command is intended to be bound to , but is unbound by
default.
-`menu-complete-backward ()'
- Identical to `menu-complete', but moves backward through the list
- of possible completions, as if `menu-complete' had been given a
+'menu-complete-backward ()'
+ Identical to 'menu-complete', but moves backward through the list
+ of possible completions, as if 'menu-complete' had been given a
negative argument.
-`delete-char-or-list ()'
+'delete-char-or-list ()'
Deletes the character under the cursor if not at the beginning or
- end of the line (like `delete-char'). If at the end of the line,
- behaves identically to `possible-completions'. This command is
+ end of the line (like 'delete-char'). If at the end of the line,
+ behaves identically to 'possible-completions'. This command is
unbound by default.
-
File: readline.info, Node: Keyboard Macros, Next: Miscellaneous Commands, Prev: Commands For Completion, Up: Bindable Readline Commands
1.4.7 Keyboard Macros
---------------------
-`start-kbd-macro (C-x ()'
+'start-kbd-macro (C-x ()'
Begin saving the characters typed into the current keyboard macro.
-`end-kbd-macro (C-x ))'
+'end-kbd-macro (C-x ))'
Stop saving the characters typed into the current keyboard macro
and save the definition.
-`call-last-kbd-macro (C-x e)'
+'call-last-kbd-macro (C-x e)'
Re-execute the last keyboard macro defined, by making the
characters in the macro appear as if typed at the keyboard.
-`print-last-kbd-macro ()'
+'print-last-kbd-macro ()'
Print the last keboard macro defined in a format suitable for the
INPUTRC file.
-
File: readline.info, Node: Miscellaneous Commands, Prev: Keyboard Macros, Up: Bindable Readline Commands
1.4.8 Some Miscellaneous Commands
---------------------------------
-`re-read-init-file (C-x C-r)'
+'re-read-init-file (C-x C-r)'
Read in the contents of the INPUTRC file, and incorporate any
bindings or variable assignments found there.
-`abort (C-g)'
+'abort (C-g)'
Abort the current editing command and ring the terminal's bell
- (subject to the setting of `bell-style').
+ (subject to the setting of 'bell-style').
-`do-uppercase-version (M-a, M-b, M-X, ...)'
+'do-uppercase-version (M-a, M-b, M-X, ...)'
If the metafied character X is lowercase, run the command that is
bound to the corresponding uppercase character.
-`prefix-meta ()'
+'prefix-meta ()'
Metafy the next character typed. This is for keyboards without a
- meta key. Typing ` f' is equivalent to typing `M-f'.
+ meta key. Typing ' f' is equivalent to typing 'M-f'.
-`undo (C-_ or C-x C-u)'
+'undo (C-_ or C-x C-u)'
Incremental undo, separately remembered for each line.
-`revert-line (M-r)'
+'revert-line (M-r)'
Undo all changes made to this line. This is like executing the
- `undo' command enough times to get back to the beginning.
+ 'undo' command enough times to get back to the beginning.
-`tilde-expand (M-~)'
+'tilde-expand (M-~)'
Perform tilde expansion on the current word.
-`set-mark (C-@)'
+'set-mark (C-@)'
Set the mark to the point. If a numeric argument is supplied, the
mark is set to that position.
-`exchange-point-and-mark (C-x C-x)'
+'exchange-point-and-mark (C-x C-x)'
Swap the point with the mark. The current cursor position is set
to the saved position, and the old cursor position is saved as the
mark.
-`character-search (C-])'
+'character-search (C-])'
A character is read and point is moved to the next occurrence of
that character. A negative count searches for previous
occurrences.
-`character-search-backward (M-C-])'
+'character-search-backward (M-C-])'
A character is read and point is moved to the previous occurrence
of that character. A negative count searches for subsequent
occurrences.
-`skip-csi-sequence ()'
+'skip-csi-sequence ()'
Read enough characters to consume a multi-key sequence such as
those defined for keys like Home and End. Such sequences begin
with a Control Sequence Indicator (CSI), usually ESC-[. If this
- sequence is bound to "\e[", keys producing such sequences will
- have no effect unless explicitly bound to a readline command,
- instead of inserting stray characters into the editing buffer.
- This is unbound by default, but usually bound to ESC-[.
+ sequence is bound to "\e[", keys producing such sequences will have
+ no effect unless explicitly bound to a readline command, instead of
+ inserting stray characters into the editing buffer. This is
+ unbound by default, but usually bound to ESC-[.
-`insert-comment (M-#)'
- Without a numeric argument, the value of the `comment-begin'
+'insert-comment (M-#)'
+ Without a numeric argument, the value of the 'comment-begin'
variable is inserted at the beginning of the current line. If a
- numeric argument is supplied, this command acts as a toggle: if
- the characters at the beginning of the line do not match the value
- of `comment-begin', the value is inserted, otherwise the
- characters in `comment-begin' are deleted from the beginning of
- the line. In either case, the line is accepted as if a newline
- had been typed.
-
-`dump-functions ()'
+ numeric argument is supplied, this command acts as a toggle: if the
+ characters at the beginning of the line do not match the value of
+ 'comment-begin', the value is inserted, otherwise the characters in
+ 'comment-begin' are deleted from the beginning of the line. In
+ either case, the line is accepted as if a newline had been typed.
+
+'dump-functions ()'
Print all of the functions and their key bindings to the Readline
output stream. If a numeric argument is supplied, the output is
formatted in such a way that it can be made part of an INPUTRC
file. This command is unbound by default.
-`dump-variables ()'
+'dump-variables ()'
Print all of the settable variables and their values to the
Readline output stream. If a numeric argument is supplied, the
output is formatted in such a way that it can be made part of an
INPUTRC file. This command is unbound by default.
-`dump-macros ()'
+'dump-macros ()'
Print all of the Readline key sequences bound to macros and the
- strings they output. If a numeric argument is supplied, the
- output is formatted in such a way that it can be made part of an
- INPUTRC file. This command is unbound by default.
+ strings they output. If a numeric argument is supplied, the output
+ is formatted in such a way that it can be made part of an INPUTRC
+ file. This command is unbound by default.
-`emacs-editing-mode (C-e)'
- When in `vi' command mode, this causes a switch to `emacs' editing
+'emacs-editing-mode (C-e)'
+ When in 'vi' command mode, this causes a switch to 'emacs' editing
mode.
-`vi-editing-mode (M-C-j)'
- When in `emacs' editing mode, this causes a switch to `vi' editing
+'vi-editing-mode (M-C-j)'
+ When in 'emacs' editing mode, this causes a switch to 'vi' editing
mode.
-
File: readline.info, Node: Readline vi Mode, Prev: Bindable Readline Commands, Up: Command Line Editing
1.5 Readline vi Mode
====================
-While the Readline library does not have a full set of `vi' editing
+While the Readline library does not have a full set of 'vi' editing
functions, it does contain enough to allow simple editing of the line.
-The Readline `vi' mode behaves as specified in the POSIX standard.
+The Readline 'vi' mode behaves as specified in the POSIX standard.
- In order to switch interactively between `emacs' and `vi' editing
-modes, use the command `M-C-j' (bound to emacs-editing-mode when in
-`vi' mode and to vi-editing-mode in `emacs' mode). The Readline
-default is `emacs' mode.
+ In order to switch interactively between 'emacs' and 'vi' editing
+modes, use the command 'M-C-j' (bound to emacs-editing-mode when in 'vi'
+mode and to vi-editing-mode in 'emacs' mode). The Readline default is
+'emacs' mode.
- When you enter a line in `vi' mode, you are already placed in
-`insertion' mode, as if you had typed an `i'. Pressing switches
-you into `command' mode, where you can edit the text of the line with
-the standard `vi' movement keys, move to previous history lines with
-`k' and subsequent lines with `j', and so forth.
+ When you enter a line in 'vi' mode, you are already placed in
+'insertion' mode, as if you had typed an 'i'. Pressing switches
+you into 'command' mode, where you can edit the text of the line with
+the standard 'vi' movement keys, move to previous history lines with 'k'
+and subsequent lines with 'j', and so forth.
This document describes the GNU Readline Library, a utility for
aiding in the consistency of user interface across discrete programs
that need to provide a command line interface.
- Copyright (C) 1988-2014 Free Software Foundation, Inc.
+ Copyright (C) 1988-2016 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice pare
preserved on all copies.
Permission is granted to copy and distribute modified versions of
-this manual under the conditions for verbatim copying, provided that
-the entire resulting derived work is distributed under the terms of a
+this manual under the conditions for verbatim copying, provided that the
+entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
Permission is granted to copy and distribute translations of this
@@ -1434,9 +1461,9 @@ File: readline.info, Node: Programming with GNU Readline, Next: GNU Free Docum
This chapter describes the interface between the GNU Readline Library
and other programs. If you are a programmer, and you wish to include
-the features found in GNU Readline such as completion, line editing,
-and interactive history manipulation in your own programs, this section
-is for you.
+the features found in GNU Readline such as completion, line editing, and
+interactive history manipulation in your own programs, this section is
+for you.
* Menu:
@@ -1457,41 +1484,41 @@ File: readline.info, Node: Basic Behavior, Next: Custom Functions, Up: Progra
2.1 Basic Behavior
==================
-Many programs provide a command line interface, such as `mail', `ftp',
-and `sh'. For such programs, the default behaviour of Readline is
+Many programs provide a command line interface, such as 'mail', 'ftp',
+and 'sh'. For such programs, the default behaviour of Readline is
sufficient. This section describes how to use Readline in the simplest
-way possible, perhaps to replace calls in your code to `gets()' or
-`fgets()'.
+way possible, perhaps to replace calls in your code to 'gets()' or
+'fgets()'.
- The function `readline()' prints a prompt PROMPT and then reads and
-returns a single line of text from the user. If PROMPT is `NULL' or
-the empty string, no prompt is displayed. The line `readline' returns
-is allocated with `malloc()'; the caller should `free()' the line when
-it has finished with it. The declaration for `readline' in ANSI C is
+ The function 'readline()' prints a prompt PROMPT and then reads and
+returns a single line of text from the user. If PROMPT is 'NULL' or the
+empty string, no prompt is displayed. The line 'readline' returns is
+allocated with 'malloc()'; the caller should 'free()' the line when it
+has finished with it. The declaration for 'readline' in ANSI C is
- `char *readline (const char *PROMPT);'
+ char *readline (const char *PROMPT);
So, one might say
- `char *line = readline ("Enter a line: ");'
- in order to read a line of text from the user. The line returned
-has the final newline removed, so only the text remains.
+ char *line = readline ("Enter a line: ");
+in order to read a line of text from the user. The line returned has
+the final newline removed, so only the text remains.
- If `readline' encounters an `EOF' while reading the line, and the
-line is empty at that point, then `(char *)NULL' is returned.
+ If 'readline' encounters an 'EOF' while reading the line, and the
+line is empty at that point, then '(char *)NULL' is returned.
Otherwise, the line is ended just as if a newline had been typed.
- If you want the user to be able to get at the line later, (with
- for example), you must call `add_history()' to save the line away
-in a "history" list of such lines.
+ If you want the user to be able to get at the line later, (with
+for example), you must call 'add_history()' to save the line away in a
+"history" list of such lines.
- `add_history (line)';
+ add_history (line);
For full details on the GNU History Library, see the associated manual.
It is preferable to avoid saving empty lines on the history list,
-since users rarely have a burning need to reuse a blank line. Here is
-a function which usefully replaces the standard `gets()' library
-function, and has the advantage of no static buffer to overflow:
+since users rarely have a burning need to reuse a blank line. Here is a
+function which usefully replaces the standard 'gets()' library function,
+and has the advantage of no static buffer to overflow:
/* A static variable for holding the line. */
static char *line_read = (char *)NULL;
@@ -1523,21 +1550,21 @@ function, and has the advantage of no static buffer to overflow:
This function gives the user the default behaviour of
completion: completion on file names. If you do not want Readline to
complete on filenames, you can change the binding of the key with
-`rl_bind_key()'.
+'rl_bind_key()'.
- `int rl_bind_key (int KEY, rl_command_func_t *FUNCTION);'
+ int rl_bind_key (int KEY, rl_command_func_t *FUNCTION);
- `rl_bind_key()' takes two arguments: KEY is the character that you
+ 'rl_bind_key()' takes two arguments: KEY is the character that you
want to bind, and FUNCTION is the address of the function to call when
-KEY is pressed. Binding to `rl_insert()' makes insert
-itself. `rl_bind_key()' returns non-zero if KEY is not a valid ASCII
+KEY is pressed. Binding to 'rl_insert()' makes insert
+itself. 'rl_bind_key()' returns non-zero if KEY is not a valid ASCII
character code (between 0 and 255).
Thus, to disable the default behavior, the following suffices:
- `rl_bind_key ('\t', rl_insert);'
+ rl_bind_key ('\t', rl_insert);
This code should be executed once at the start of your program; you
-might write a function called `initialize_readline()' which performs
+might write a function called 'initialize_readline()' which performs
this and other desired initializations, such as installing custom
completers (*note Custom Completers::).
@@ -1549,25 +1576,24 @@ File: readline.info, Node: Custom Functions, Next: Readline Variables, Prev:
Readline provides many functions for manipulating the text of the line,
but it isn't possible to anticipate the needs of all programs. This
-section describes the various functions and variables defined within
-the Readline library which allow a user program to add customized
+section describes the various functions and variables defined within the
+Readline library which allow a user program to add customized
functionality to Readline.
Before declaring any functions that customize Readline's behavior, or
using any functionality Readline provides in other code, an application
-writer should include the file `' in any file that
-uses Readline's features. Since some of the definitions in
-`readline.h' use the `stdio' library, the file `' should be
-included before `readline.h'.
-
- `readline.h' defines a C preprocessor variable that should be
-treated as an integer, `RL_READLINE_VERSION', which may be used to
-conditionally compile application code depending on the installed
-Readline version. The value is a hexadecimal encoding of the major and
-minor version numbers of the library, of the form 0xMMMM. MM is the
-two-digit major version number; MM is the two-digit minor version
-number. For Readline 4.2, for example, the value of
-`RL_READLINE_VERSION' would be `0x0402'.
+writer should include the file '' in any file that
+uses Readline's features. Since some of the definitions in 'readline.h'
+use the 'stdio' library, the file '' should be included before
+'readline.h'.
+
+ 'readline.h' defines a C preprocessor variable that should be treated
+as an integer, 'RL_READLINE_VERSION', which may be used to conditionally
+compile application code depending on the installed Readline version.
+The value is a hexadecimal encoding of the major and minor version
+numbers of the library, of the form 0xMMMM. MM is the two-digit major
+version number; MM is the two-digit minor version number. For Readline
+4.2, for example, the value of 'RL_READLINE_VERSION' would be '0x0402'.
* Menu:
@@ -1588,57 +1614,51 @@ write code describing pointers to C functions with appropriately
prototyped arguments and return values.
For instance, say we want to declare a variable FUNC as a pointer to
-a function which takes two `int' arguments and returns an `int' (this
-is the type of all of the Readline bindable functions). Instead of the
+a function which takes two 'int' arguments and returns an 'int' (this is
+the type of all of the Readline bindable functions). Instead of the
classic C declaration
- `int (*func)();'
+ 'int (*func)();'
or the ANSI-C style declaration
- `int (*func)(int, int);'
+ 'int (*func)(int, int);'
we may write
- `rl_command_func_t *func;'
+ 'rl_command_func_t *func;'
The full list of function pointer types available is
-`typedef int rl_command_func_t (int, int);'
+'typedef int rl_command_func_t (int, int);'
-`typedef char *rl_compentry_func_t (const char *, int);'
+'typedef char *rl_compentry_func_t (const char *, int);'
-`typedef char **rl_completion_func_t (const char *, int, int);'
+'typedef char **rl_completion_func_t (const char *, int, int);'
-`typedef char *rl_quote_func_t (char *, int, char *);'
+'typedef char *rl_quote_func_t (char *, int, char *);'
-`typedef char *rl_dequote_func_t (char *, int);'
+'typedef char *rl_dequote_func_t (char *, int);'
-`typedef int rl_compignore_func_t (char **);'
+'typedef int rl_compignore_func_t (char **);'
-`typedef void rl_compdisp_func_t (char **, int, int);'
+'typedef void rl_compdisp_func_t (char **, int, int);'
-`typedef int rl_hook_func_t (void);'
+'typedef int rl_hook_func_t (void);'
-`typedef int rl_getc_func_t (FILE *);'
+'typedef int rl_getc_func_t (FILE *);'
-`typedef int rl_linebuf_func_t (char *, int);'
+'typedef int rl_linebuf_func_t (char *, int);'
-`typedef int rl_intfunc_t (int);'
+'typedef int rl_intfunc_t (int);'
+'#define rl_ivoidfunc_t rl_hook_func_t'
+'typedef int rl_icpfunc_t (char *);'
+'typedef int rl_icppfunc_t (char **);'
-`#define rl_ivoidfunc_t rl_hook_func_t'
-
-`typedef int rl_icpfunc_t (char *);'
-
-`typedef int rl_icppfunc_t (char **);'
-
-`typedef void rl_voidfunc_t (void);'
-
-`typedef void rl_vintfunc_t (int);'
-
-`typedef void rl_vcpfunc_t (char *);'
-
-`typedef void rl_vcppfunc_t (char **);'
+'typedef void rl_voidfunc_t (void);'
+'typedef void rl_vintfunc_t (int);'
+'typedef void rl_vcpfunc_t (char *);'
+'typedef void rl_vcppfunc_t (char **);'
File: readline.info, Node: Function Writing, Prev: Readline Typedefs, Up: Custom Functions
@@ -1650,9 +1670,9 @@ In order to write new functions for Readline, you need to know the
calling conventions for keyboard-invoked functions, and the names of the
variables that describe the current state of the line read so far.
- The calling sequence for a command `foo' looks like
+ The calling sequence for a command 'foo' looks like
- `int foo (int count, int key)'
+ int foo (int count, int key)
where COUNT is the numeric argument (or 1 if defaulted) and KEY is the
key that invoked this function.
@@ -1667,8 +1687,8 @@ negative and positive arguments. At the very least, it should be aware
that it can be passed a negative argument.
A command function should return 0 if its action completes
-successfully, and a non-zero value if some error occurs. This is the
-convention obeyed by all of the builtin Readline bindable command
+successfully, and a value greater than zero if some error occurs. This
+is the convention obeyed by all of the builtin Readline bindable command
functions.
@@ -1682,16 +1702,16 @@ These variables are available to function writers.
-- Variable: char * rl_line_buffer
This is the line gathered so far. You are welcome to modify the
contents of the line, but see *note Allowing Undoing::. The
- function `rl_extend_line_buffer' is available to increase the
- memory allocated to `rl_line_buffer'.
+ function 'rl_extend_line_buffer' is available to increase the
+ memory allocated to 'rl_line_buffer'.
-- Variable: int rl_point
- The offset of the current cursor position in `rl_line_buffer' (the
+ The offset of the current cursor position in 'rl_line_buffer' (the
_point_).
-- Variable: int rl_end
- The number of characters present in `rl_line_buffer'. When
- `rl_point' is at the end of the line, `rl_point' and `rl_end' are
+ The number of characters present in 'rl_line_buffer'. When
+ 'rl_point' is at the end of the line, 'rl_point' and 'rl_end' are
equal.
-- Variable: int rl_mark
@@ -1703,9 +1723,9 @@ These variables are available to function writers.
current line immediately.
-- Variable: int rl_num_chars_to_read
- Setting this to a positive value before calling `readline()' causes
+ Setting this to a positive value before calling 'readline()' causes
Readline to return after accepting that many characters, rather
- than reading up to a character bound to `accept-line'.
+ than reading up to a character bound to 'accept-line'.
-- Variable: int rl_pending_input
Setting this to a value makes it the next keystroke read. This is
@@ -1719,27 +1739,27 @@ These variables are available to function writers.
-- Variable: int rl_erase_empty_line
Setting this to a non-zero value causes Readline to completely
- erase the current line, including any prompt, any time a newline
- is typed as the only character on an otherwise-empty line. The
- cursor is moved to the beginning of the newly-blank line.
+ erase the current line, including any prompt, any time a newline is
+ typed as the only character on an otherwise-empty line. The cursor
+ is moved to the beginning of the newly-blank line.
-- Variable: char * rl_prompt
The prompt Readline uses. This is set from the argument to
- `readline()', and should not be assigned to directly. The
- `rl_set_prompt()' function (*note Redisplay::) may be used to
- modify the prompt string after calling `readline()'.
+ 'readline()', and should not be assigned to directly. The
+ 'rl_set_prompt()' function (*note Redisplay::) may be used to
+ modify the prompt string after calling 'readline()'.
-- Variable: char * rl_display_prompt
The string displayed as the prompt. This is usually identical to
- RL_PROMPT, but may be changed temporarily by functions that use
- the prompt string as a message area, such as incremental search.
+ RL_PROMPT, but may be changed temporarily by functions that use the
+ prompt string as a message area, such as incremental search.
-- Variable: int rl_already_prompted
If an application wishes to display the prompt itself, rather than
- have Readline do it the first time `readline()' is called, it
+ have Readline do it the first time 'readline()' is called, it
should set this variable to a non-zero value after displaying the
prompt. The prompt must also be passed as the argument to
- `readline()' so the redisplay functions can update the display
+ 'readline()' so the redisplay functions can update the display
properly. The calling application is responsible for managing the
value; Readline never sets it.
@@ -1750,7 +1770,7 @@ These variables are available to function writers.
An integer encoding the current version of the library. The
encoding is of the form 0xMMMM, where MM is the two-digit major
version number, and MM is the two-digit minor version number. For
- example, for Readline-4.2, `rl_readline_version' would have the
+ example, for Readline-4.2, 'rl_readline_version' would have the
value 0x0402.
-- Variable: int rl_gnu_readline_p
@@ -1759,7 +1779,7 @@ These variables are available to function writers.
-- Variable: const char * rl_terminal_name
The terminal type, used for initialization. If not set by the
- application, Readline sets this to the value of the `TERM'
+ application, Readline sets this to the value of the 'TERM'
environment variable the first time it is called.
-- Variable: const char * rl_readline_name
@@ -1768,89 +1788,88 @@ These variables are available to function writers.
(*note Conditional Init Constructs::).
-- Variable: FILE * rl_instream
- The stdio stream from which Readline reads input. If `NULL',
+ The stdio stream from which Readline reads input. If 'NULL',
Readline defaults to STDIN.
-- Variable: FILE * rl_outstream
- The stdio stream to which Readline performs output. If `NULL',
+ The stdio stream to which Readline performs output. If 'NULL',
Readline defaults to STDOUT.
-- Variable: int rl_prefer_env_winsize
- If non-zero, Readline gives values found in the `LINES' and
- `COLUMNS' environment variables greater precedence than values
+ If non-zero, Readline gives values found in the 'LINES' and
+ 'COLUMNS' environment variables greater precedence than values
fetched from the kernel when computing the screen dimensions.
-- Variable: rl_command_func_t * rl_last_func
- The address of the last command function Readline executed. May
- be used to test whether or not a function is being executed twice
- in succession, for example.
+ The address of the last command function Readline executed. May be
+ used to test whether or not a function is being executed twice in
+ succession, for example.
-- Variable: rl_hook_func_t * rl_startup_hook
If non-zero, this is the address of a function to call just before
- `readline' prints the first prompt.
+ 'readline' prints the first prompt.
-- Variable: rl_hook_func_t * rl_pre_input_hook
If non-zero, this is the address of a function to call after the
- first prompt has been printed and just before `readline' starts
+ first prompt has been printed and just before 'readline' starts
reading input characters.
-- Variable: rl_hook_func_t * rl_event_hook
If non-zero, this is the address of a function to call periodically
- when Readline is waiting for terminal input. By default, this
- will be called at most ten times a second if there is no keyboard
- input.
+ when Readline is waiting for terminal input. By default, this will
+ be called at most ten times a second if there is no keyboard input.
-- Variable: rl_getc_func_t * rl_getc_function
If non-zero, Readline will call indirectly through this pointer to
get a character from the input stream. By default, it is set to
- `rl_getc', the default Readline character input function (*note
+ 'rl_getc', the default Readline character input function (*note
Character Input::). In general, an application that sets
- RL_GETC_FUNCTION should consider setting RL_INPUT_AVAILABLE_HOOK
- as well.
+ RL_GETC_FUNCTION should consider setting RL_INPUT_AVAILABLE_HOOK as
+ well.
-- Variable: rl_hook_func_t * rl_signal_event_hook
If non-zero, this is the address of a function to call if a read
system call is interrupted when Readline is reading terminal input.
-- Variable: rl_hook_func_t * rl_input_available_hook
- If non-zero, Readline will use this function's return value when
- it needs to determine whether or not there is available input on
- the current input source. The default hook checks `rl_instream';
- if an application is using a different input source, it should set
- the hook appropriately. Readline queries for available input when
+ If non-zero, Readline will use this function's return value when it
+ needs to determine whether or not there is available input on the
+ current input source. The default hook checks 'rl_instream'; if an
+ application is using a different input source, it should set the
+ hook appropriately. Readline queries for available input when
implementing intra-key-sequence timeouts during input and
- incremental searches. This may use an application-specific
- timeout before returning a value; Readline uses the value passed
- to `rl_set_keyboard_input_timeout()' or the value of the
- user-settable KEYSEQ-TIMEOUT variable. This is designed for use
- by applications using Readline's callback interface (*note
- Alternate Interface::), which may not use the traditional
- `read(2)' and file descriptor interface, or other applications
- using a different input mechanism. If an application uses an
- input mechanism or hook that can potentially exceed the value of
- KEYSEQ-TIMEOUT, it should increase the timeout or set this hook
- appropriately even when not using the callback interface. In
- general, an application that sets RL_GETC_FUNCTION should consider
- setting RL_INPUT_AVAILABLE_HOOK as well.
+ incremental searches. This may use an application-specific timeout
+ before returning a value; Readline uses the value passed to
+ 'rl_set_keyboard_input_timeout()' or the value of the user-settable
+ KEYSEQ-TIMEOUT variable. This is designed for use by applications
+ using Readline's callback interface (*note Alternate Interface::),
+ which may not use the traditional 'read(2)' and file descriptor
+ interface, or other applications using a different input mechanism.
+ If an application uses an input mechanism or hook that can
+ potentially exceed the value of KEYSEQ-TIMEOUT, it should increase
+ the timeout or set this hook appropriately even when not using the
+ callback interface. In general, an application that sets
+ RL_GETC_FUNCTION should consider setting RL_INPUT_AVAILABLE_HOOK as
+ well.
-- Variable: rl_voidfunc_t * rl_redisplay_function
If non-zero, Readline will call indirectly through this pointer to
update the display with the current contents of the editing buffer.
- By default, it is set to `rl_redisplay', the default Readline
+ By default, it is set to 'rl_redisplay', the default Readline
redisplay function (*note Redisplay::).
-- Variable: rl_vintfunc_t * rl_prep_term_function
If non-zero, Readline will call indirectly through this pointer to
initialize the terminal. The function takes a single argument, an
- `int' flag that says whether or not to use eight-bit characters.
- By default, this is set to `rl_prep_terminal' (*note Terminal
+ 'int' flag that says whether or not to use eight-bit characters.
+ By default, this is set to 'rl_prep_terminal' (*note Terminal
Management::).
-- Variable: rl_voidfunc_t * rl_deprep_term_function
If non-zero, Readline will call indirectly through this pointer to
reset the terminal. This function should undo the effects of
- `rl_prep_term_function'. By default, this is set to
- `rl_deprep_terminal' (*note Terminal Management::).
+ 'rl_prep_term_function'. By default, this is set to
+ 'rl_deprep_terminal' (*note Terminal Management::).
-- Variable: Keymap rl_executing_keymap
This variable is set to the keymap (*note Keymaps::) in which the
@@ -1876,98 +1895,73 @@ These variables are available to function writers.
-- Variable: int rl_readline_state
A variable with bit values that encapsulate the current Readline
- state. A bit is set with the `RL_SETSTATE' macro, and unset with
- the `RL_UNSETSTATE' macro. Use the `RL_ISSTATE' macro to test
+ state. A bit is set with the 'RL_SETSTATE' macro, and unset with
+ the 'RL_UNSETSTATE' macro. Use the 'RL_ISSTATE' macro to test
whether a particular state bit is set. Current state bits include:
- `RL_STATE_NONE'
+ 'RL_STATE_NONE'
Readline has not yet been called, nor has it begun to
initialize.
-
- `RL_STATE_INITIALIZING'
+ 'RL_STATE_INITIALIZING'
Readline is initializing its internal data structures.
-
- `RL_STATE_INITIALIZED'
+ 'RL_STATE_INITIALIZED'
Readline has completed its initialization.
-
- `RL_STATE_TERMPREPPED'
+ 'RL_STATE_TERMPREPPED'
Readline has modified the terminal modes to do its own input
and redisplay.
-
- `RL_STATE_READCMD'
+ 'RL_STATE_READCMD'
Readline is reading a command from the keyboard.
-
- `RL_STATE_METANEXT'
+ 'RL_STATE_METANEXT'
Readline is reading more input after reading the meta-prefix
character.
-
- `RL_STATE_DISPATCHING'
+ 'RL_STATE_DISPATCHING'
Readline is dispatching to a command.
-
- `RL_STATE_MOREINPUT'
+ 'RL_STATE_MOREINPUT'
Readline is reading more input while executing an editing
command.
-
- `RL_STATE_ISEARCH'
+ 'RL_STATE_ISEARCH'
Readline is performing an incremental history search.
-
- `RL_STATE_NSEARCH'
+ 'RL_STATE_NSEARCH'
Readline is performing a non-incremental history search.
-
- `RL_STATE_SEARCH'
+ 'RL_STATE_SEARCH'
Readline is searching backward or forward through the history
for a string.
-
- `RL_STATE_NUMERICARG'
+ 'RL_STATE_NUMERICARG'
Readline is reading a numeric argument.
-
- `RL_STATE_MACROINPUT'
+ 'RL_STATE_MACROINPUT'
Readline is currently getting its input from a
previously-defined keyboard macro.
-
- `RL_STATE_MACRODEF'
+ 'RL_STATE_MACRODEF'
Readline is currently reading characters defining a keyboard
macro.
-
- `RL_STATE_OVERWRITE'
+ 'RL_STATE_OVERWRITE'
Readline is in overwrite mode.
-
- `RL_STATE_COMPLETING'
+ 'RL_STATE_COMPLETING'
Readline is performing word completion.
-
- `RL_STATE_SIGHANDLER'
+ 'RL_STATE_SIGHANDLER'
Readline is currently executing the readline signal handler.
-
- `RL_STATE_UNDOING'
+ 'RL_STATE_UNDOING'
Readline is performing an undo.
-
- `RL_STATE_INPUTPENDING'
+ 'RL_STATE_INPUTPENDING'
Readline has input pending due to a call to
- `rl_execute_next()'.
-
- `RL_STATE_TTYCSAVED'
+ 'rl_execute_next()'.
+ 'RL_STATE_TTYCSAVED'
Readline has saved the values of the terminal's special
characters.
-
- `RL_STATE_CALLBACK'
+ 'RL_STATE_CALLBACK'
Readline is currently using the alternate (callback) interface
(*note Alternate Interface::).
-
- `RL_STATE_VIMOTION'
+ 'RL_STATE_VIMOTION'
Readline is reading the argument to a vi-mode "motion"
command.
-
- `RL_STATE_MULTIKEY'
+ 'RL_STATE_MULTIKEY'
Readline is reading a multiple-keystroke command.
-
- `RL_STATE_VICMDONCE'
+ 'RL_STATE_VICMDONCE'
Readline has entered vi command (movement) mode at least one
- time during the current call to `readline()'.
-
- `RL_STATE_DONE'
- Readline has read a key sequence bound to `accept-line' and
- is about to return the line to the caller.
-
+ time during the current call to 'readline()'.
+ 'RL_STATE_DONE'
+ Readline has read a key sequence bound to 'accept-line' and is
+ about to return the line to the caller.
-- Variable: int rl_explicit_arg
Set to a non-zero value if an explicit numeric argument was
@@ -1998,12 +1992,12 @@ File: readline.info, Node: Readline Convenience Functions, Next: Readline Sign
key sequences.
* Allowing Undoing:: How to make your functions undoable.
* Redisplay:: Functions to control line display.
-* Modifying Text:: Functions to modify `rl_line_buffer'.
+* Modifying Text:: Functions to modify 'rl_line_buffer'.
* Character Input:: Functions to read keyboard input.
* Terminal Management:: Functions to manage terminal settings.
* Utility Functions:: Generally useful functions and hooks.
* Miscellaneous Functions:: Functions that don't fall into any category.
-* Alternate Interface:: Using Readline in a `callback' fashion.
+* Alternate Interface:: Using Readline in a 'callback' fashion.
* A Readline Example:: An example Readline function.
* Alternate Interface Example:: An example program using the alternate interface.
@@ -2021,7 +2015,7 @@ the function. Thus, in an init file, one might find
Meta-Rubout: backward-kill-word
This binds the keystroke to the function
-_descriptively_ named `backward-kill-word'. You, as the programmer,
+_descriptively_ named 'backward-kill-word'. You, as the programmer,
should bind the functions you write to descriptive names as well.
Readline provides a function for doing that:
@@ -2029,13 +2023,13 @@ Readline provides a function for doing that:
*function, int key)
Add NAME to the list of named functions. Make FUNCTION be the
function that gets called. If KEY is not -1, then bind it to
- FUNCTION using `rl_bind_key()'.
+ FUNCTION using 'rl_bind_key()'.
- Using this function alone is sufficient for most applications. It
-is the recommended way to add a few functions to the default functions
-that Readline has built in. If you need to do something other than
-adding a function to Readline, you may need to use the underlying
-functions described below.
+ Using this function alone is sufficient for most applications. It is
+the recommended way to add a few functions to the default functions that
+Readline has built in. If you need to do something other than adding a
+function to Readline, you may need to use the underlying functions
+described below.
File: readline.info, Node: Keymaps, Next: Binding Keys, Prev: Function Naming, Up: Readline Convenience Functions
@@ -2049,9 +2043,9 @@ You can make your own keymaps, copy existing keymaps, and tell Readline
which keymap to use.
-- Function: Keymap rl_make_bare_keymap (void)
- Returns a new, empty keymap. The space for the keymap is
- allocated with `malloc()'; the caller should free it by calling
- `rl_free_keymap()' when done.
+ Returns a new, empty keymap. The space for the keymap is allocated
+ with 'malloc()'; the caller should free it by calling
+ 'rl_free_keymap()' when done.
-- Function: Keymap rl_copy_keymap (Keymap map)
Return a new keymap which is a copy of MAP.
@@ -2068,7 +2062,7 @@ which keymap to use.
-- Function: void rl_free_keymap (Keymap keymap)
Free all storage associated with KEYMAP. This calls
- `rl_discard_keymap' to free subordindate keymaps and macros.
+ 'rl_discard_keymap' to free subordindate keymaps and macros.
Readline has several internal keymaps. These functions allow you to
change which keymap is active.
@@ -2081,12 +2075,12 @@ change which keymap is active.
-- Function: Keymap rl_get_keymap_by_name (const char *name)
Return the keymap matching NAME. NAME is one which would be
- supplied in a `set keymap' inputrc line (*note Readline Init
+ supplied in a 'set keymap' inputrc line (*note Readline Init
File::).
-- Function: char * rl_get_keymap_name (Keymap keymap)
Return the name matching KEYMAP. NAME is one which would be
- supplied in a `set keymap' inputrc line (*note Readline Init
+ supplied in a 'set keymap' inputrc line (*note Readline Init
File::).
@@ -2095,17 +2089,17 @@ File: readline.info, Node: Binding Keys, Next: Associating Function Names and
2.4.3 Binding Keys
------------------
-Key sequences are associate with functions through the keymap.
-Readline has several internal keymaps: `emacs_standard_keymap',
-`emacs_meta_keymap', `emacs_ctlx_keymap', `vi_movement_keymap', and
-`vi_insertion_keymap'. `emacs_standard_keymap' is the default, and the
+Key sequences are associate with functions through the keymap. Readline
+has several internal keymaps: 'emacs_standard_keymap',
+'emacs_meta_keymap', 'emacs_ctlx_keymap', 'vi_movement_keymap', and
+'vi_insertion_keymap'. 'emacs_standard_keymap' is the default, and the
examples in this manual assume that.
- Since `readline()' installs a set of default key bindings the first
+ Since 'readline()' installs a set of default key bindings the first
time it is called, there is always the danger that a custom binding
-installed before the first call to `readline()' will be overridden. An
+installed before the first call to 'readline()' will be overridden. An
alternate mechanism is to install custom key bindings in an
-initialization function assigned to the `rl_startup_hook' variable
+initialization function assigned to the 'rl_startup_hook' variable
(*note Readline Variables::).
These functions manage key bindings.
@@ -2149,9 +2143,9 @@ initialization function assigned to the `rl_startup_hook' variable
-- Function: int rl_bind_keyseq (const char *keyseq, rl_command_func_t
*function)
Bind the key sequence represented by the string KEYSEQ to the
- function FUNCTION, beginning in the current keymap. This makes
- new keymaps as necessary. The return value is non-zero if KEYSEQ
- is invalid.
+ function FUNCTION, beginning in the current keymap. This makes new
+ keymaps as necessary. The return value is non-zero if KEYSEQ is
+ invalid.
-- Function: int rl_bind_keyseq_in_map (const char *keyseq,
rl_command_func_t *function, Keymap map)
@@ -2162,7 +2156,7 @@ initialization function assigned to the `rl_startup_hook' variable
-- Function: int rl_set_key (const char *keyseq, rl_command_func_t
*function, Keymap map)
- Equivalent to `rl_bind_keyseq_in_map'.
+ Equivalent to 'rl_bind_keyseq_in_map'.
-- Function: int rl_bind_keyseq_if_unbound (const char *keyseq,
rl_command_func_t *function)
@@ -2180,12 +2174,12 @@ initialization function assigned to the `rl_startup_hook' variable
*data, Keymap map)
Bind the key sequence represented by the string KEYSEQ to the
arbitrary pointer DATA. TYPE says what kind of data is pointed to
- by DATA; this can be a function (`ISFUNC'), a macro (`ISMACR'), or
- a keymap (`ISKMAP'). This makes new keymaps as necessary. The
+ by DATA; this can be a function ('ISFUNC'), a macro ('ISMACR'), or
+ a keymap ('ISKMAP'). This makes new keymaps as necessary. The
initial keymap in which to do bindings is MAP.
-- Function: int rl_parse_and_bind (char *line)
- Parse LINE as if it had been read from the `inputrc' file and
+ Parse LINE as if it had been read from the 'inputrc' file and
perform any key bindings and variable assignments found (*note
Readline Init File::).
@@ -2209,9 +2203,9 @@ associate a new function name with an arbitrary function.
-- Function: rl_command_func_t * rl_function_of_keyseq (const char
*keyseq, Keymap map, int *type)
Return the function invoked by KEYSEQ in keymap MAP. If MAP is
- `NULL', the current keymap is used. If TYPE is not `NULL', the
- type of the object is returned in the `int' variable it points to
- (one of `ISFUNC', `ISKMAP', or `ISMACR').
+ 'NULL', the current keymap is used. If TYPE is not 'NULL', the
+ type of the object is returned in the 'int' variable it points to
+ (one of 'ISFUNC', 'ISKMAP', or 'ISMACR').
-- Function: char ** rl_invoking_keyseqs (rl_command_func_t *function)
Return an array of strings representing the key sequences used to
@@ -2224,19 +2218,19 @@ associate a new function name with an arbitrary function.
-- Function: void rl_function_dumper (int readable)
Print the readline function names and the key sequences currently
- bound to them to `rl_outstream'. If READABLE is non-zero, the
- list is formatted in such a way that it can be made part of an
- `inputrc' file and re-read.
+ bound to them to 'rl_outstream'. If READABLE is non-zero, the list
+ is formatted in such a way that it can be made part of an 'inputrc'
+ file and re-read.
-- Function: void rl_list_funmap_names (void)
Print the names of all bindable Readline functions to
- `rl_outstream'.
+ 'rl_outstream'.
-- Function: const char ** rl_funmap_names (void)
Return a NULL terminated array of known function names. The array
is sorted. The array itself is allocated, but not the strings
inside. You should free the array, but not the pointers, using
- `free' or `rl_free' when you are done.
+ 'free' or 'rl_free' when you are done.
-- Function: int rl_add_funmap_entry (const char *name,
rl_command_func_t *function)
@@ -2254,36 +2248,36 @@ functions much more useful. It is certainly easy to try something if
you know you can undo it.
If your function simply inserts text once, or deletes text once, and
-uses `rl_insert_text()' or `rl_delete_text()' to do it, then undoing is
+uses 'rl_insert_text()' or 'rl_delete_text()' to do it, then undoing is
already done for you automatically.
If you do multiple insertions or multiple deletions, or any
-combination of these operations, you should group them together into
-one operation. This is done with `rl_begin_undo_group()' and
-`rl_end_undo_group()'.
+combination of these operations, you should group them together into one
+operation. This is done with 'rl_begin_undo_group()' and
+'rl_end_undo_group()'.
The types of events that can be undone are:
enum undo_code { UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END };
- Notice that `UNDO_DELETE' means to insert some text, and
-`UNDO_INSERT' means to delete some text. That is, the undo code tells
-what to undo, not how to undo it. `UNDO_BEGIN' and `UNDO_END' are tags
-added by `rl_begin_undo_group()' and `rl_end_undo_group()'.
+ Notice that 'UNDO_DELETE' means to insert some text, and
+'UNDO_INSERT' means to delete some text. That is, the undo code tells
+what to undo, not how to undo it. 'UNDO_BEGIN' and 'UNDO_END' are tags
+added by 'rl_begin_undo_group()' and 'rl_end_undo_group()'.
-- Function: int rl_begin_undo_group (void)
Begins saving undo information in a group construct. The undo
- information usually comes from calls to `rl_insert_text()' and
- `rl_delete_text()', but could be the result of calls to
- `rl_add_undo()'.
+ information usually comes from calls to 'rl_insert_text()' and
+ 'rl_delete_text()', but could be the result of calls to
+ 'rl_add_undo()'.
-- Function: int rl_end_undo_group (void)
- Closes the current undo group started with `rl_begin_undo_group
- ()'. There should be one call to `rl_end_undo_group()' for each
- call to `rl_begin_undo_group()'.
+ Closes the current undo group started with 'rl_begin_undo_group
+ ()'. There should be one call to 'rl_end_undo_group()' for each
+ call to 'rl_begin_undo_group()'.
- -- Function: void rl_add_undo (enum undo_code what, int start, int
- end, char *text)
+ -- Function: void rl_add_undo (enum undo_code what, int start, int end,
+ char *text)
Remember how to undo an event (according to WHAT). The affected
text runs from START to END, and encompasses TEXT.
@@ -2291,11 +2285,11 @@ added by `rl_begin_undo_group()' and `rl_end_undo_group()'.
Free the existing undo list.
-- Function: int rl_do_undo (void)
- Undo the first thing on the undo list. Returns `0' if there was
+ Undo the first thing on the undo list. Returns '0' if there was
nothing to undo, non-zero if something was undone.
Finally, if you neither insert nor delete text, but directly modify
-the existing text (e.g., change its case), call `rl_modifying()' once,
+the existing text (e.g., change its case), call 'rl_modifying()' once,
just before you modify the text. You must supply the indices of the
text range that you are going to modify.
@@ -2312,7 +2306,7 @@ File: readline.info, Node: Redisplay, Next: Modifying Text, Prev: Allowing Un
-- Function: void rl_redisplay (void)
Change what's displayed on the screen to reflect the current
- contents of `rl_line_buffer'.
+ contents of 'rl_line_buffer'.
-- Function: int rl_forced_update_display (void)
Force the line to be updated and redisplayed, whether or not
@@ -2326,8 +2320,12 @@ File: readline.info, Node: Redisplay, Next: Modifying Text, Prev: Allowing Un
Tell the update functions that we have moved onto a new line, with
RL_PROMPT already displayed. This could be used by applications
that want to output the prompt string themselves, but still need
- Readline to know the prompt string length for redisplay. It
- should be used after setting RL_ALREADY_PROMPTED.
+ Readline to know the prompt string length for redisplay. It should
+ be used after setting RL_ALREADY_PROMPTED.
+
+ -- Function: int rl_clear_visible_line (void)
+ Clear the screen lines corresponding to the current line's
+ contents.
-- Function: int rl_reset_line_state (void)
Reset the display state to a clean state and redisplay the current
@@ -2337,53 +2335,52 @@ File: readline.info, Node: Redisplay, Next: Modifying Text, Prev: Allowing Un
Move the cursor to the start of the next screen line.
-- Function: int rl_show_char (int c)
- Display character C on `rl_outstream'. If Readline has not been
+ Display character C on 'rl_outstream'. If Readline has not been
set to display meta characters directly, this will convert meta
characters to a meta-prefixed key sequence. This is intended for
use by applications which wish to do their own redisplay.
-- Function: int rl_message (const char *, ...)
- The arguments are a format string as would be supplied to `printf',
- possibly containing conversion specifications such as `%d', and
- any additional arguments necessary to satisfy the conversion
+ The arguments are a format string as would be supplied to 'printf',
+ possibly containing conversion specifications such as '%d', and any
+ additional arguments necessary to satisfy the conversion
specifications. The resulting string is displayed in the "echo
- area". The echo area is also used to display numeric arguments
- and search strings. You should call `rl_save_prompt' to save the
+ area". The echo area is also used to display numeric arguments and
+ search strings. You should call 'rl_save_prompt' to save the
prompt information before calling this function.
-- Function: int rl_clear_message (void)
- Clear the message in the echo area. If the prompt was saved with
- a call to `rl_save_prompt' before the last call to `rl_message',
- call `rl_restore_prompt' before calling this function.
+ Clear the message in the echo area. If the prompt was saved with a
+ call to 'rl_save_prompt' before the last call to 'rl_message', call
+ 'rl_restore_prompt' before calling this function.
-- Function: void rl_save_prompt (void)
Save the local Readline prompt display state in preparation for
- displaying a new message in the message area with `rl_message()'.
+ displaying a new message in the message area with 'rl_message()'.
-- Function: void rl_restore_prompt (void)
Restore the local Readline prompt display state saved by the most
- recent call to `rl_save_prompt'. if `rl_save_prompt' was called
- to save the prompt before a call to `rl_message', this function
- should be called before the corresponding call to
- `rl_clear_message'.
+ recent call to 'rl_save_prompt'. if 'rl_save_prompt' was called to
+ save the prompt before a call to 'rl_message', this function should
+ be called before the corresponding call to 'rl_clear_message'.
-- Function: int rl_expand_prompt (char *prompt)
Expand any special character sequences in PROMPT and set up the
- local Readline prompt redisplay variables. This function is
- called by `readline()'. It may also be called to expand the
- primary prompt if the `rl_on_new_line_with_prompt()' function or
- `rl_already_prompted' variable is used. It returns the number of
+ local Readline prompt redisplay variables. This function is called
+ by 'readline()'. It may also be called to expand the primary
+ prompt if the 'rl_on_new_line_with_prompt()' function or
+ 'rl_already_prompted' variable is used. It returns the number of
visible characters on the last line of the (possibly multi-line)
prompt. Applications may indicate that the prompt contains
characters that take up no physical screen space when displayed by
bracketing a sequence of such characters with the special markers
- `RL_PROMPT_START_IGNORE' and `RL_PROMPT_END_IGNORE' (declared in
- `readline.h'. This may be used to embed terminal-specific escape
+ 'RL_PROMPT_START_IGNORE' and 'RL_PROMPT_END_IGNORE' (declared in
+ 'readline.h'). This may be used to embed terminal-specific escape
sequences in prompts.
-- Function: int rl_set_prompt (const char *prompt)
Make Readline use PROMPT for subsequent redisplay. This calls
- `rl_expand_prompt()' to expand the prompt and sets `rl_prompt' to
+ 'rl_expand_prompt()' to expand the prompt and sets 'rl_prompt' to
the result.
@@ -2397,24 +2394,24 @@ File: readline.info, Node: Modifying Text, Next: Character Input, Prev: Redis
the number of characters inserted.
-- Function: int rl_delete_text (int start, int end)
- Delete the text between START and END in the current line.
- Returns the number of characters deleted.
+ Delete the text between START and END in the current line. Returns
+ the number of characters deleted.
-- Function: char * rl_copy_text (int start, int end)
Return a copy of the text between START and END in the current
line.
-- Function: int rl_kill_text (int start, int end)
- Copy the text between START and END in the current line to the
- kill ring, appending or prepending to the last kill if the last
- command was a kill command. The text is deleted. If START is
- less than END, the text is appended, otherwise prepended. If the
- last command was not a kill, a new kill ring slot is used.
+ Copy the text between START and END in the current line to the kill
+ ring, appending or prepending to the last kill if the last command
+ was a kill command. The text is deleted. If START is less than
+ END, the text is appended, otherwise prepended. If the last
+ command was not a kill, a new kill ring slot is used.
-- Function: int rl_push_macro_input (char *macro)
Cause MACRO to be inserted into the line, as if it had been invoked
by a key bound to a macro. Not especially useful; use
- `rl_insert_text()' instead.
+ 'rl_insert_text()' instead.
File: readline.info, Node: Character Input, Next: Terminal Management, Prev: Modifying Text, Up: Readline Convenience Functions
@@ -2426,9 +2423,9 @@ File: readline.info, Node: Character Input, Next: Terminal Management, Prev:
Return the next character available from Readline's current input
stream. This handles input inserted into the input stream via
RL_PENDING_INPUT (*note Readline Variables::) and
- `rl_stuff_char()', macros, and characters read from the keyboard.
+ 'rl_stuff_char()', macros, and characters read from the keyboard.
While waiting for input, this function will call any function
- assigned to the `rl_event_hook' variable.
+ assigned to the 'rl_event_hook' variable.
-- Function: int rl_getc (FILE *stream)
Return the next character available from STREAM, which is assumed
@@ -2437,23 +2434,23 @@ File: readline.info, Node: Character Input, Next: Terminal Management, Prev:
-- Function: int rl_stuff_char (int c)
Insert C into the Readline input stream. It will be "read" before
Readline attempts to read characters from the terminal with
- `rl_read_key()'. Up to 512 characters may be pushed back.
- `rl_stuff_char' returns 1 if the character was successfully
+ 'rl_read_key()'. Up to 512 characters may be pushed back.
+ 'rl_stuff_char' returns 1 if the character was successfully
inserted; 0 otherwise.
-- Function: int rl_execute_next (int c)
- Make C be the next command to be executed when `rl_read_key()' is
+ Make C be the next command to be executed when 'rl_read_key()' is
called. This sets RL_PENDING_INPUT.
-- Function: int rl_clear_pending_input (void)
Unset RL_PENDING_INPUT, effectively negating the effect of any
- previous call to `rl_execute_next()'. This works only if the
- pending input has not already been read with `rl_read_key()'.
+ previous call to 'rl_execute_next()'. This works only if the
+ pending input has not already been read with 'rl_read_key()'.
-- Function: int rl_set_keyboard_input_timeout (int u)
- While waiting for keyboard input in `rl_read_key()', Readline will
+ While waiting for keyboard input in 'rl_read_key()', Readline will
wait for U microseconds for input before calling any function
- assigned to `rl_event_hook'. U must be greater than or equal to
+ assigned to 'rl_event_hook'. U must be greater than or equal to
zero (a zero-length timeout is equivalent to a poll). The default
waiting period is one-tenth of a second. Returns the old timeout
value.
@@ -2465,30 +2462,37 @@ File: readline.info, Node: Terminal Management, Next: Utility Functions, Prev
-------------------------
-- Function: void rl_prep_terminal (int meta_flag)
- Modify the terminal settings for Readline's use, so `readline()'
+ Modify the terminal settings for Readline's use, so 'readline()'
can read a single character at a time from the keyboard. The
META_FLAG argument should be non-zero if Readline should read
eight-bit input.
-- Function: void rl_deprep_terminal (void)
- Undo the effects of `rl_prep_terminal()', leaving the terminal in
+ Undo the effects of 'rl_prep_terminal()', leaving the terminal in
the state in which it was before the most recent call to
- `rl_prep_terminal()'.
+ 'rl_prep_terminal()'.
-- Function: void rl_tty_set_default_bindings (Keymap kmap)
Read the operating system's terminal editing characters (as would
- be displayed by `stty') to their Readline equivalents. The
+ be displayed by 'stty') to their Readline equivalents. The
bindings are performed in KMAP.
-- Function: void rl_tty_unset_default_bindings (Keymap kmap)
- Reset the bindings manipulated by `rl_tty_set_default_bindings' so
- that the terminal editing characters are bound to `rl_insert'.
- The bindings are performed in KMAP.
+ Reset the bindings manipulated by 'rl_tty_set_default_bindings' so
+ that the terminal editing characters are bound to 'rl_insert'. The
+ bindings are performed in KMAP.
+
+ -- Function: int rl_tty_set_echoing (int value)
+ Set Readline's idea of whether or not it is echoing output to its
+ output stream (RL_OUTSTREAM). If VALUE is 0, Readline does not
+ display output to RL_OUTSTREAM; any other value enables output.
+ The initial value is set when Readline initializes the terminal
+ settings. This function returns the previous value.
-- Function: int rl_reset_terminal (const char *terminal_name)
Reinitialize Readline's idea of the terminal settings using
- TERMINAL_NAME as the terminal type (e.g., `vt100'). If
- TERMINAL_NAME is `NULL', the value of the `TERM' environment
+ TERMINAL_NAME as the terminal type (e.g., 'vt100'). If
+ TERMINAL_NAME is 'NULL', the value of the 'TERM' environment
variable is used.
@@ -2499,54 +2503,54 @@ File: readline.info, Node: Utility Functions, Next: Miscellaneous Functions,
-- Function: int rl_save_state (struct readline_state *sp)
Save a snapshot of Readline's internal state to SP. The contents
- of the READLINE_STATE structure are documented in `readline.h'.
+ of the READLINE_STATE structure are documented in 'readline.h'.
The caller is responsible for allocating the structure.
-- Function: int rl_restore_state (struct readline_state *sp)
Restore Readline's internal state to that stored in SP, which must
- have been saved by a call to `rl_save_state'. The contents of the
- READLINE_STATE structure are documented in `readline.h'. The
+ have been saved by a call to 'rl_save_state'. The contents of the
+ READLINE_STATE structure are documented in 'readline.h'. The
caller is responsible for freeing the structure.
-- Function: void rl_free (void *mem)
Deallocate the memory pointed to by MEM. MEM must have been
- allocated by `malloc'.
+ allocated by 'malloc'.
-- Function: void rl_replace_line (const char *text, int clear_undo)
- Replace the contents of `rl_line_buffer' with TEXT. The point and
+ Replace the contents of 'rl_line_buffer' with TEXT. The point and
mark are preserved, if possible. If CLEAR_UNDO is non-zero, the
undo list associated with the current line is cleared.
-- Function: void rl_extend_line_buffer (int len)
- Ensure that `rl_line_buffer' has enough space to hold LEN
+ Ensure that 'rl_line_buffer' has enough space to hold LEN
characters, possibly reallocating it if necessary.
-- Function: int rl_initialize (void)
Initialize or re-initialize Readline's internal state. It's not
- strictly necessary to call this; `readline()' calls it before
+ strictly necessary to call this; 'readline()' calls it before
reading any input.
-- Function: int rl_ding (void)
- Ring the terminal bell, obeying the setting of `bell-style'.
+ Ring the terminal bell, obeying the setting of 'bell-style'.
-- Function: int rl_alphabetic (int c)
Return 1 if C is an alphabetic character.
-- Function: void rl_display_match_list (char **matches, int len, int
max)
- A convenience function for displaying a list of strings in
- columnar format on Readline's output stream. `matches' is the list
- of strings, in argv format, such as a list of completion matches.
- `len' is the number of strings in `matches', and `max' is the
- length of the longest string in `matches'. This function uses the
- setting of `print-completions-horizontally' to select how the
+ A convenience function for displaying a list of strings in columnar
+ format on Readline's output stream. 'matches' is the list of
+ strings, in argv format, such as a list of completion matches.
+ 'len' is the number of strings in 'matches', and 'max' is the
+ length of the longest string in 'matches'. This function uses the
+ setting of 'print-completions-horizontally' to select how the
matches are displayed (*note Readline Init File Syntax::). When
displaying completions, this function sets the number of columns
- used for display to the value of `completion-display-width', the
- value of the environment variable `COLUMNS', or the screen width,
+ used for display to the value of 'completion-display-width', the
+ value of the environment variable 'COLUMNS', or the screen width,
in that order.
- The following are implemented as macros, defined in `chardefs.h'.
+ The following are implemented as macros, defined in 'chardefs.h'.
Applications should refrain from using them.
-- Function: int _rl_uppercase_p (int c)
@@ -2580,34 +2584,34 @@ File: readline.info, Node: Miscellaneous Functions, Next: Alternate Interface,
Bind the key sequence KEYSEQ to invoke the macro MACRO. The
binding is performed in MAP. When KEYSEQ is invoked, the MACRO
will be inserted into the line. This function is deprecated; use
- `rl_generic_bind()' instead.
+ 'rl_generic_bind()' instead.
-- Function: void rl_macro_dumper (int readable)
- Print the key sequences bound to macros and their values, using
- the current keymap, to `rl_outstream'. If READABLE is non-zero,
- the list is formatted in such a way that it can be made part of an
- `inputrc' file and re-read.
+ Print the key sequences bound to macros and their values, using the
+ current keymap, to 'rl_outstream'. If READABLE is non-zero, the
+ list is formatted in such a way that it can be made part of an
+ 'inputrc' file and re-read.
-- Function: int rl_variable_bind (const char *variable, const char
*value)
- Make the Readline variable VARIABLE have VALUE. This behaves as
- if the readline command `set VARIABLE VALUE' had been executed in
- an `inputrc' file (*note Readline Init File Syntax::).
+ Make the Readline variable VARIABLE have VALUE. This behaves as if
+ the readline command 'set VARIABLE VALUE' had been executed in an
+ 'inputrc' file (*note Readline Init File Syntax::).
-- Function: char * rl_variable_value (const char *variable)
Return a string representing the value of the Readline variable
- VARIABLE. For boolean variables, this string is either `on' or
- `off'.
+ VARIABLE. For boolean variables, this string is either 'on' or
+ 'off'.
-- Function: void rl_variable_dumper (int readable)
Print the readline variable names and their current values to
- `rl_outstream'. If READABLE is non-zero, the list is formatted in
- such a way that it can be made part of an `inputrc' file and
+ 'rl_outstream'. If READABLE is non-zero, the list is formatted in
+ such a way that it can be made part of an 'inputrc' file and
re-read.
-- Function: int rl_set_paren_blink_timeout (int u)
Set the time interval (in microseconds) that Readline waits when
- showing a balancing character when `blink-matching-paren' has been
+ showing a balancing character when 'blink-matching-paren' has been
enabled.
-- Function: char * rl_get_termcap (const char *cap)
@@ -2620,9 +2624,9 @@ File: readline.info, Node: Miscellaneous Functions, Next: Alternate Interface,
-- Function: void rl_clear_history (void)
Clear the history list by deleting all of the entries, in the same
- manner as the History library's `clear_history()' function. This
- differs from `clear_history' because it frees private data
- Readline saves in the history list.
+ manner as the History library's 'clear_history()' function. This
+ differs from 'clear_history' because it frees private data Readline
+ saves in the history list.
File: readline.info, Node: Alternate Interface, Next: A Readline Example, Prev: Miscellaneous Functions, Up: Readline Convenience Functions
@@ -2630,11 +2634,11 @@ File: readline.info, Node: Alternate Interface, Next: A Readline Example, Pre
2.4.12 Alternate Interface
--------------------------
-An alternate interface is available to plain `readline()'. Some
+An alternate interface is available to plain 'readline()'. Some
applications need to interleave keyboard I/O with file, device, or
-window system I/O, typically by using a main loop to `select()' on
+window system I/O, typically by using a main loop to 'select()' on
various file descriptors. To accommodate this need, readline can also
-be invoked as a `callback' function from an event loop. There are
+be invoked as a 'callback' function from an event loop. There are
functions available to make this easy.
-- Function: void rl_callback_handler_install (const char *prompt,
@@ -2643,29 +2647,37 @@ functions available to make this easy.
expanded value of PROMPT. Save the value of LHANDLER to use as a
handler function to call when a complete line of input has been
entered. The handler function receives the text of the line as an
- argument.
+ argument. As with 'readline()', the handler function should 'free'
+ the line when it it finished with it.
-- Function: void rl_callback_read_char (void)
Whenever an application determines that keyboard input is
- available, it should call `rl_callback_read_char()', which will
+ available, it should call 'rl_callback_read_char()', which will
read the next character from the current input source. If that
- character completes the line, `rl_callback_read_char' will invoke
- the LHANDLER function installed by `rl_callback_handler_install'
- to process the line. Before calling the LHANDLER function, the
+ character completes the line, 'rl_callback_read_char' will invoke
+ the LHANDLER function installed by 'rl_callback_handler_install' to
+ process the line. Before calling the LHANDLER function, the
terminal settings are reset to the values they had before calling
- `rl_callback_handler_install'. If the LHANDLER function returns,
+ 'rl_callback_handler_install'. If the LHANDLER function returns,
and the line handler remains installed, the terminal settings are
- modified for Readline's use again. `EOF' is indicated by calling
- LHANDLER with a `NULL' line.
+ modified for Readline's use again. 'EOF' is indicated by calling
+ LHANDLER with a 'NULL' line.
+
+ -- Function: void rl_callback_sigcleanup (void)
+ Clean up any internal state the callback interface uses to maintain
+ state between calls to rl_callback_read_char (e.g., the state of
+ any active incremental searches). This is intended to be used by
+ applications that wish to perform their own signal handling;
+ Readline's internal signal handler calls this when appropriate.
-- Function: void rl_callback_handler_remove (void)
Restore the terminal to its initial state and remove the line
- handler. This may be called from within a callback as well as
- independently. If the LHANDLER installed by
- `rl_callback_handler_install' does not exit the program, either
+ handler. You may call this function from within a callback as well
+ as independently. If the LHANDLER installed by
+ 'rl_callback_handler_install' does not exit the program, either
this function or the function referred to by the value of
- `rl_deprep_term_function' should be called before the program
- exits to reset the terminal settings.
+ 'rl_deprep_term_function' should be called before the program exits
+ to reset the terminal settings.
File: readline.info, Node: A Readline Example, Next: Alternate Interface Example, Prev: Alternate Interface, Up: Readline Convenience Functions
@@ -2675,8 +2687,8 @@ File: readline.info, Node: A Readline Example, Next: Alternate Interface Examp
Here is a function which changes lowercase characters to their uppercase
equivalents, and uppercase characters to lowercase. If this function
-was bound to `M-c', then typing `M-c' would change the case of the
-character under point. Typing `M-1 0 M-c' would change the case of the
+was bound to 'M-c', then typing 'M-c' would change the case of the
+character under point. Typing 'M-1 0 M-c' would change the case of the
following 10 characters, leaving the cursor on the last character
changed.
@@ -2748,12 +2760,16 @@ understands the EOF character or "exit" to exit the program.
/* Standard include files. stdio.h is required. */
#include
+ #include
#include
+ #include
/* Used for select(2) */
#include
#include
+ #include
+
#include
/* Standard readline include files. */
@@ -2761,10 +2777,20 @@ understands the EOF character or "exit" to exit the program.
#include
static void cb_linehandler (char *);
+ static void sighandler (int);
int running;
+ int sigwinch_received;
const char *prompt = "rltest$ ";
+ /* Handle SIGWINCH and window size changes when readline is not active and
+ reading a character. */
+ static void
+ sighandler (int sig)
+ {
+ sigwinch_received = 1;
+ }
+
/* Callback function called for each line when accept-line executed, EOF
seen, or EOF character read. This sets a flag and returns; it could
also call exit(3). */
@@ -2799,6 +2825,13 @@ understands the EOF character or "exit" to exit the program.
fd_set fds;
int r;
+ /* Set the default locale values according to environment variables. */
+ setlocale (LC_ALL, "");
+
+ /* Handle window size changes when readline is not active and reading
+ characters. */
+ signal (SIGWINCH, sighandler);
+
/* Install the line handler. */
rl_callback_handler_install (prompt, cb_linehandler);
@@ -2813,12 +2846,19 @@ understands the EOF character or "exit" to exit the program.
FD_SET (fileno (rl_instream), &fds);
r = select (FD_SETSIZE, &fds, NULL, NULL, NULL);
- if (r < 0)
+ if (r < 0 && errno != EINTR)
{
perror ("rltest: select");
rl_callback_handler_remove ();
break;
}
+ if (sigwinch_received)
+ {
+ rl_resize_terminal ();
+ sigwinch_received = 0;
+ }
+ if (r < 0)
+ continue;
if (FD_ISSET (fileno (rl_instream), &fds))
rl_callback_read_char ();
@@ -2838,96 +2878,131 @@ Signals are asynchronous events sent to a process by the Unix kernel,
sometimes on behalf of another process. They are intended to indicate
exceptional events, like a user pressing the interrupt key on his
terminal, or a network connection being broken. There is a class of
-signals that can be sent to the process currently reading input from
-the keyboard. Since Readline changes the terminal attributes when it
-is called, it needs to perform special processing when such a signal is
+signals that can be sent to the process currently reading input from the
+keyboard. Since Readline changes the terminal attributes when it is
+called, it needs to perform special processing when such a signal is
received in order to restore the terminal to a sane state, or provide
application writers with functions to do so manually.
Readline contains an internal signal handler that is installed for a
-number of signals (`SIGINT', `SIGQUIT', `SIGTERM', `SIGHUP', `SIGALRM',
-`SIGTSTP', `SIGTTIN', and `SIGTTOU'). When one of these signals is
-received, the signal handler will reset the terminal attributes to
-those that were in effect before `readline()' was called, reset the
-signal handling to what it was before `readline()' was called, and
-resend the signal to the calling application. If and when the calling
+number of signals ('SIGINT', 'SIGQUIT', 'SIGTERM', 'SIGHUP', 'SIGALRM',
+'SIGTSTP', 'SIGTTIN', and 'SIGTTOU'). When one of these signals is
+received, the signal handler will reset the terminal attributes to those
+that were in effect before 'readline()' was called, reset the signal
+handling to what it was before 'readline()' was called, and resend the
+signal to the calling application. If and when the calling
application's signal handler returns, Readline will reinitialize the
-terminal and continue to accept input. When a `SIGINT' is received,
-the Readline signal handler performs some additional work, which will
-cause any partially-entered line to be aborted (see the description of
-`rl_free_line_state()' below).
+terminal and continue to accept input. When a 'SIGINT' is received, the
+Readline signal handler performs some additional work, which will cause
+any partially-entered line to be aborted (see the description of
+'rl_free_line_state()' below).
- There is an additional Readline signal handler, for `SIGWINCH', which
+ There is an additional Readline signal handler, for 'SIGWINCH', which
the kernel sends to a process whenever the terminal's size changes (for
-example, if a user resizes an `xterm'). The Readline `SIGWINCH'
-handler updates Readline's internal screen size information, and then
-calls any `SIGWINCH' signal handler the calling application has
-installed. Readline calls the application's `SIGWINCH' signal handler
-without resetting the terminal to its original state. If the
-application's signal handler does more than update its idea of the
-terminal size and return (for example, a `longjmp' back to a main
-processing loop), it _must_ call `rl_cleanup_after_signal()' (described
-below), to restore the terminal state.
+example, if a user resizes an 'xterm'). The Readline 'SIGWINCH' handler
+updates Readline's internal screen size information, and then calls any
+'SIGWINCH' signal handler the calling application has installed.
+Readline calls the application's 'SIGWINCH' signal handler without
+resetting the terminal to its original state. If the application's
+signal handler does more than update its idea of the terminal size and
+return (for example, a 'longjmp' back to a main processing loop), it
+_must_ call 'rl_cleanup_after_signal()' (described below), to restore
+the terminal state.
+
+ When an application is using the callback interface (*note Alternate
+Interface::), Readline installs signal handlers only for the duration of
+the call to 'rl_callback_read_char'. Applications using the callback
+interface should be prepared to clean up Readline's state if they wish
+to handle the signal before the line handler completes and restores the
+terminal state.
+
+ If an application using the callback interface wishes to have
+Readline install its signal handlers at the time the application calls
+'rl_callback_handler_install' and remove them only when a complete line
+of input has been read, it should set the
+'rl_persistent_signal_handlers' variable to a non-zero value. This
+allows an application to defer all of the handling of the signals
+Readline catches to Readline. Applications should use this variable
+with care; it can result in Readline catching signals and not acting on
+them (or allowing the application to react to them) until the
+application calls 'rl_callback_read_char'. This can result in an
+application becoming less responsive to keyboard signals like SIGINT. If
+an application does not want or need to perform any signal handling, or
+does not need to do any processing between calls to
+'rl_callback_read_char', setting this variable may be desirable.
Readline provides two variables that allow application writers to
control whether or not it will catch certain signals and act on them
when they are received. It is important that applications change the
-values of these variables only when calling `readline()', not in a
+values of these variables only when calling 'readline()', not in a
signal handler, so Readline's internal signal state is not corrupted.
-- Variable: int rl_catch_signals
- If this variable is non-zero, Readline will install signal
- handlers for `SIGINT', `SIGQUIT', `SIGTERM', `SIGHUP', `SIGALRM',
- `SIGTSTP', `SIGTTIN', and `SIGTTOU'.
+ If this variable is non-zero, Readline will install signal handlers
+ for 'SIGINT', 'SIGQUIT', 'SIGTERM', 'SIGHUP', 'SIGALRM', 'SIGTSTP',
+ 'SIGTTIN', and 'SIGTTOU'.
- The default value of `rl_catch_signals' is 1.
+ The default value of 'rl_catch_signals' is 1.
-- Variable: int rl_catch_sigwinch
If this variable is set to a non-zero value, Readline will install
- a signal handler for `SIGWINCH'.
+ a signal handler for 'SIGWINCH'.
+
+ The default value of 'rl_catch_sigwinch' is 1.
+
+ -- Variable: int rl_persistent_signal_handlers
+ If an application using the callback interface wishes Readline's
+ signal handlers to be installed and active during the set of calls
+ to 'rl_callback_read_char' that constitutes an entire single line,
+ it should set this variable to a non-zero value.
- The default value of `rl_catch_sigwinch' is 1.
+ The default value of 'rl_persistent_signal_handlers' is 0.
-- Variable: int rl_change_environment
If this variable is set to a non-zero value, and Readline is
- handling `SIGWINCH', Readline will modify the LINES and COLUMNS
- environment variables upon receipt of a `SIGWINCH'
+ handling 'SIGWINCH', Readline will modify the LINES and COLUMNS
+ environment variables upon receipt of a 'SIGWINCH'
- The default value of `rl_change_environment' is 1.
+ The default value of 'rl_change_environment' is 1.
If an application does not wish to have Readline catch any signals,
-or to handle signals other than those Readline catches (`SIGHUP', for
+or to handle signals other than those Readline catches ('SIGHUP', for
example), Readline provides convenience functions to do the necessary
terminal and internal state cleanup upon receipt of a signal.
+ -- Function: int rl_pending_signal (void)
+ Return the signal number of the most recent signal Readline
+ received but has not yet handled, or 0 if there is no pending
+ signal.
+
-- Function: void rl_cleanup_after_signal (void)
This function will reset the state of the terminal to what it was
- before `readline()' was called, and remove the Readline signal
+ before 'readline()' was called, and remove the Readline signal
handlers for all signals, depending on the values of
- `rl_catch_signals' and `rl_catch_sigwinch'.
+ 'rl_catch_signals' and 'rl_catch_sigwinch'.
-- Function: void rl_free_line_state (void)
This will free any partial state associated with the current input
line (undo information, any partial history entry, any
- partially-entered keyboard macro, and any partially-entered
- numeric argument). This should be called before
- `rl_cleanup_after_signal()'. The Readline signal handler for
- `SIGINT' calls this to abort the current input line.
+ partially-entered keyboard macro, and any partially-entered numeric
+ argument). This should be called before
+ 'rl_cleanup_after_signal()'. The Readline signal handler for
+ 'SIGINT' calls this to abort the current input line.
-- Function: void rl_reset_after_signal (void)
This will reinitialize the terminal and reinstall any Readline
- signal handlers, depending on the values of `rl_catch_signals' and
- `rl_catch_sigwinch'.
+ signal handlers, depending on the values of 'rl_catch_signals' and
+ 'rl_catch_sigwinch'.
- If an application does not wish Readline to catch `SIGWINCH', it may
-call `rl_resize_terminal()' or `rl_set_screen_size()' to force Readline
-to update its idea of the terminal size when a `SIGWINCH' is received.
+ If an application does not wish Readline to catch 'SIGWINCH', it may
+call 'rl_resize_terminal()' or 'rl_set_screen_size()' to force Readline
+to update its idea of the terminal size when a 'SIGWINCH' is received.
-- Function: void rl_echo_signal_char (int sig)
If an application wishes to install its own signal handlers, but
still have readline display characters that generate signals,
- calling this function with SIG set to `SIGINT', `SIGQUIT', or
- `SIGTSTP' will display the character generating that signal.
+ calling this function with SIG set to 'SIGINT', 'SIGQUIT', or
+ 'SIGTSTP' will display the character generating that signal.
-- Function: void rl_resize_terminal (void)
Update Readline's internal screen size by reading values from the
@@ -2938,7 +3013,7 @@ to update its idea of the terminal size when a `SIGWINCH' is received.
columns. If either ROWS or COLUMNS is less than or equal to 0,
Readline's idea of that terminal dimension is unchanged.
- If an application does not want to install a `SIGWINCH' handler, but
+ If an application does not want to install a 'SIGWINCH' handler, but
is still interested in the screen dimensions, Readline's idea of the
screen size may be queried.
@@ -2954,14 +3029,14 @@ screen size may be queried.
handlers.
-- Function: int rl_set_signals (void)
- Install Readline's signal handler for `SIGINT', `SIGQUIT',
- `SIGTERM', `SIGHUP', `SIGALRM', `SIGTSTP', `SIGTTIN', `SIGTTOU',
- and `SIGWINCH', depending on the values of `rl_catch_signals' and
- `rl_catch_sigwinch'.
+ Install Readline's signal handler for 'SIGINT', 'SIGQUIT',
+ 'SIGTERM', 'SIGHUP', 'SIGALRM', 'SIGTSTP', 'SIGTTIN', 'SIGTTOU',
+ and 'SIGWINCH', depending on the values of 'rl_catch_signals' and
+ 'rl_catch_sigwinch'.
-- Function: int rl_clear_signals (void)
Remove all of the Readline signal handlers installed by
- `rl_set_signals()'.
+ 'rl_set_signals()'.
File: readline.info, Node: Custom Completers, Prev: Readline Signal Handling, Up: Programming with GNU Readline
@@ -2992,58 +3067,56 @@ In order to complete some text, the full list of possible completions
must be available. That is, it is not possible to accurately expand a
partial word without knowing all of the possible words which make sense
in that context. The Readline library provides the user interface to
-completion, and two of the most common completion functions: filename
+completion, and two of the most common completion functions: filename
and username. For completing other types of text, you must write your
own completion function. This section describes exactly what such
functions must do, and provides an example.
There are three major functions used to perform completion:
- 1. The user-interface function `rl_complete()'. This function is
+ 1. The user-interface function 'rl_complete()'. This function is
called with the same arguments as other bindable Readline
functions: COUNT and INVOKING_KEY. It isolates the word to be
- completed and calls `rl_completion_matches()' to generate a list
- of possible completions. It then either lists the possible
- completions, inserts the possible completions, or actually
- performs the completion, depending on which behavior is desired.
+ completed and calls 'rl_completion_matches()' to generate a list of
+ possible completions. It then either lists the possible
+ completions, inserts the possible completions, or actually performs
+ the completion, depending on which behavior is desired.
- 2. The internal function `rl_completion_matches()' uses an
+ 2. The internal function 'rl_completion_matches()' uses an
application-supplied "generator" function to generate the list of
- possible matches, and then returns the array of these matches.
- The caller should place the address of its generator function in
- `rl_completion_entry_function'.
+ possible matches, and then returns the array of these matches. The
+ caller should place the address of its generator function in
+ 'rl_completion_entry_function'.
3. The generator function is called repeatedly from
- `rl_completion_matches()', returning a string each time. The
+ 'rl_completion_matches()', returning a string each time. The
arguments to the generator function are TEXT and STATE. TEXT is
- the partial word to be completed. STATE is zero the first time
- the function is called, allowing the generator to perform any
- necessary initialization, and a positive non-zero integer for each
- subsequent call. The generator function returns `(char *)NULL' to
- inform `rl_completion_matches()' that there are no more
- possibilities left. Usually the generator function computes the
- list of possible completions when STATE is zero, and returns them
- one at a time on subsequent calls. Each string the generator
- function returns as a match must be allocated with `malloc()';
- Readline frees the strings when it has finished with them. Such a
- generator function is referred to as an "application-specific
- completion function".
-
+ the partial word to be completed. STATE is zero the first time the
+ function is called, allowing the generator to perform any necessary
+ initialization, and a positive non-zero integer for each subsequent
+ call. The generator function returns '(char *)NULL' to inform
+ 'rl_completion_matches()' that there are no more possibilities
+ left. Usually the generator function computes the list of possible
+ completions when STATE is zero, and returns them one at a time on
+ subsequent calls. Each string the generator function returns as a
+ match must be allocated with 'malloc()'; Readline frees the strings
+ when it has finished with them. Such a generator function is
+ referred to as an "application-specific completion function".
-- Function: int rl_complete (int ignore, int invoking_key)
Complete the word at or before point. You have supplied the
function that does the initial simple matching selection algorithm
- (see `rl_completion_matches()'). The default is to do filename
+ (see 'rl_completion_matches()'). The default is to do filename
completion.
-- Variable: rl_compentry_func_t * rl_completion_entry_function
This is a pointer to the generator function for
- `rl_completion_matches()'. If the value of
- `rl_completion_entry_function' is `NULL' then the default filename
- generator function, `rl_filename_completion_function()', is used.
+ 'rl_completion_matches()'. If the value of
+ 'rl_completion_entry_function' is 'NULL' then the default filename
+ generator function, 'rl_filename_completion_function()', is used.
An "application-specific completion function" is a function whose
- address is assigned to `rl_completion_entry_function' and whose
- return values are used to generate possible completions.
+ address is assigned to 'rl_completion_entry_function' and whose
+ return values are used to generate possible completions.
File: readline.info, Node: Completion Functions, Next: Completion Variables, Prev: How Completing Works, Up: Custom Completers
@@ -3056,51 +3129,51 @@ Readline.
-- Function: int rl_complete_internal (int what_to_do)
Complete the word at or before point. WHAT_TO_DO says what to do
- with the completion. A value of `?' means list the possible
- completions. `TAB' means do standard completion. `*' means
- insert all of the possible completions. `!' means to display all
- of the possible completions, if there is more than one, as well as
- performing partial completion. `@' is similar to `!', but
- possible completions are not listed if the possible completions
- share a common prefix.
+ with the completion. A value of '?' means list the possible
+ completions. 'TAB' means do standard completion. '*' means insert
+ all of the possible completions. '!' means to display all of the
+ possible completions, if there is more than one, as well as
+ performing partial completion. '@' is similar to '!', but possible
+ completions are not listed if the possible completions share a
+ common prefix.
-- Function: int rl_complete (int ignore, int invoking_key)
Complete the word at or before point. You have supplied the
function that does the initial simple matching selection algorithm
- (see `rl_completion_matches()' and `rl_completion_entry_function').
+ (see 'rl_completion_matches()' and 'rl_completion_entry_function').
The default is to do filename completion. This calls
- `rl_complete_internal()' with an argument depending on
+ 'rl_complete_internal()' with an argument depending on
INVOKING_KEY.
-- Function: int rl_possible_completions (int count, int invoking_key)
- List the possible completions. See description of `rl_complete
- ()'. This calls `rl_complete_internal()' with an argument of `?'.
+ List the possible completions. See description of 'rl_complete
+ ()'. This calls 'rl_complete_internal()' with an argument of '?'.
-- Function: int rl_insert_completions (int count, int invoking_key)
Insert the list of possible completions into the line, deleting the
- partially-completed word. See description of `rl_complete()'.
- This calls `rl_complete_internal()' with an argument of `*'.
+ partially-completed word. See description of 'rl_complete()'.
+ This calls 'rl_complete_internal()' with an argument of '*'.
-- Function: int rl_completion_mode (rl_command_func_t *cfunc)
- Returns the appropriate value to pass to `rl_complete_internal()'
+ Returns the appropriate value to pass to 'rl_complete_internal()'
depending on whether CFUNC was called twice in succession and the
- values of the `show-all-if-ambiguous' and `show-all-if-unmodified'
+ values of the 'show-all-if-ambiguous' and 'show-all-if-unmodified'
variables. Application-specific completion functions may use this
- function to present the same interface as `rl_complete()'.
+ function to present the same interface as 'rl_complete()'.
-- Function: char ** rl_completion_matches (const char *text,
rl_compentry_func_t *entry_func)
Returns an array of strings which is a list of completions for
- TEXT. If there are no completions, returns `NULL'. The first
+ TEXT. If there are no completions, returns 'NULL'. The first
entry in the returned array is the substitution for TEXT. The
remaining entries are the possible completions. The array is
- terminated with a `NULL' pointer.
+ terminated with a 'NULL' pointer.
- ENTRY_FUNC is a function of two args, and returns a `char *'. The
- first argument is TEXT. The second is a state argument; it is
- zero on the first call, and non-zero on subsequent calls.
- ENTRY_FUNC returns a `NULL' pointer to the caller when there are
- no more matches.
+ ENTRY_FUNC is a function of two args, and returns a 'char *'. The
+ first argument is TEXT. The second is a state argument; it is zero
+ on the first call, and non-zero on subsequent calls. ENTRY_FUNC
+ returns a 'NULL' pointer to the caller when there are no more
+ matches.
-- Function: char * rl_filename_completion_function (const char *text,
int state)
@@ -3112,7 +3185,7 @@ Readline.
-- Function: char * rl_username_completion_function (const char *text,
int state)
A completion generator for usernames. TEXT contains a partial
- username preceded by a random character (usually `~'). As with all
+ username preceded by a random character (usually '~'). As with all
completion generators, STATE is zero on the first call and non-zero
for subsequent calls.
@@ -3123,31 +3196,31 @@ File: readline.info, Node: Completion Variables, Next: A Short Completion Exam
--------------------------
-- Variable: rl_compentry_func_t * rl_completion_entry_function
- A pointer to the generator function for `rl_completion_matches()'.
- `NULL' means to use `rl_filename_completion_function()', the
+ A pointer to the generator function for 'rl_completion_matches()'.
+ 'NULL' means to use 'rl_filename_completion_function()', the
default filename completer.
-- Variable: rl_completion_func_t * rl_attempted_completion_function
A pointer to an alternative function to create matches. The
function is called with TEXT, START, and END. START and END are
- indices in `rl_line_buffer' defining the boundaries of TEXT, which
- is a character string. If this function exists and returns
- `NULL', or if this variable is set to `NULL', then `rl_complete()'
- will call the value of `rl_completion_entry_function' to generate
+ indices in 'rl_line_buffer' defining the boundaries of TEXT, which
+ is a character string. If this function exists and returns 'NULL',
+ or if this variable is set to 'NULL', then 'rl_complete()' will
+ call the value of 'rl_completion_entry_function' to generate
matches, otherwise the array of strings returned will be used. If
- this function sets the `rl_attempted_completion_over' variable to
- a non-zero value, Readline will not perform its default completion
+ this function sets the 'rl_attempted_completion_over' variable to a
+ non-zero value, Readline will not perform its default completion
even if this function returns no matches.
-- Variable: rl_quote_func_t * rl_filename_quoting_function
A pointer to a function that will quote a filename in an
application-specific fashion. This is called if filename
completion is being attempted and one of the characters in
- `rl_filename_quote_characters' appears in a completed filename.
+ 'rl_filename_quote_characters' appears in a completed filename.
The function is called with TEXT, MATCH_TYPE, and QUOTE_POINTER.
The TEXT is the filename to be quoted. The MATCH_TYPE is either
- `SINGLE_MATCH', if there is only one completion match, or
- `MULT_MATCH'. Some functions use this to decide whether or not to
+ 'SINGLE_MATCH', if there is only one completion match, or
+ 'MULT_MATCH'. Some functions use this to decide whether or not to
insert a closing quote character. The QUOTE_POINTER is a pointer
to any opening quote character the user typed. Some functions
choose to reset this character.
@@ -3155,11 +3228,11 @@ File: readline.info, Node: Completion Variables, Next: A Short Completion Exam
-- Variable: rl_dequote_func_t * rl_filename_dequoting_function
A pointer to a function that will remove application-specific
quoting characters from a filename before completion is attempted,
- so those characters do not interfere with matching the text
- against names in the filesystem. It is called with TEXT, the text
- of the word to be dequoted, and QUOTE_CHAR, which is the quoting
- character that delimits the filename (usually `'' or `"'). If
- QUOTE_CHAR is zero, the filename was not in an embedded string.
+ so those characters do not interfere with matching the text against
+ names in the filesystem. It is called with TEXT, the text of the
+ word to be dequoted, and QUOTE_CHAR, which is the quoting character
+ that delimits the filename (usually ''' or '"'). If QUOTE_CHAR is
+ zero, the filename was not in an embedded string.
-- Variable: rl_linebuf_func_t * rl_char_is_quoted_p
A pointer to a function to call that determines whether or not a
@@ -3168,30 +3241,30 @@ File: readline.info, Node: Completion Variables, Next: A Short Completion Exam
function is called with two arguments: TEXT, the text of the line,
and INDEX, the index of the character in the line. It is used to
decide whether a character found in
- `rl_completer_word_break_characters' should be used to break words
+ 'rl_completer_word_break_characters' should be used to break words
for the completer.
-- Variable: rl_compignore_func_t * rl_ignore_some_completions_function
This function, if defined, is called by the completer when real
- filename completion is done, after all the matching names have
- been generated. It is passed a `NULL' terminated array of matches.
- The first element (`matches[0]') is the maximal substring common
- to all matches. This function can re-arrange the list of matches
- as required, but each element deleted from the array must be freed.
+ filename completion is done, after all the matching names have been
+ generated. It is passed a 'NULL' terminated array of matches. The
+ first element ('matches[0]') is the maximal substring common to all
+ matches. This function can re-arrange the list of matches as
+ required, but each element deleted from the array must be freed.
-- Variable: rl_icppfunc_t * rl_directory_completion_hook
This function, if defined, is allowed to modify the directory
portion of filenames Readline completes. It could be used to
expand symbolic links or shell variables in pathnames. It is
- called with the address of a string (the current directory name)
- as an argument, and may modify that string. If the string is
- replaced with a new string, the old value should be freed. Any
- modified directory name should have a trailing slash. The
- modified value will be used as part of the completion, replacing
- the directory portion of the pathname the user typed. At the
- least, even if no other expansion is performed, this function
- should remove any quote characters from the directory name,
- because its result will be passed directly to `opendir()'.
+ called with the address of a string (the current directory name) as
+ an argument, and may modify that string. If the string is replaced
+ with a new string, the old value should be freed. Any modified
+ directory name should have a trailing slash. The modified value
+ will be used as part of the completion, replacing the directory
+ portion of the pathname the user typed. At the least, even if no
+ other expansion is performed, this function should remove any quote
+ characters from the directory name, because its result will be
+ passed directly to 'opendir()'.
The directory completion hook returns an integer that should be
non-zero if the function modifies its directory argument. The
@@ -3201,13 +3274,13 @@ File: readline.info, Node: Completion Variables, Next: A Short Completion Exam
If non-zero, this is the address of a function to call when
completing a directory name. This function takes the address of
the directory name to be modified as an argument. Unlike
- `rl_directory_completion_hook', it only modifies the directory
- name used in `opendir', not what is displayed when the possible
+ 'rl_directory_completion_hook', it only modifies the directory name
+ used in 'opendir', not what is displayed when the possible
completions are printed or inserted. It is called before
rl_directory_completion_hook. At the least, even if no other
expansion is performed, this function should remove any quote
characters from the directory name, because its result will be
- passed directly to `opendir()'.
+ passed directly to 'opendir()'.
The directory rewrite hook returns an integer that should be
non-zero if the function modfies its directory argument. The
@@ -3216,9 +3289,9 @@ File: readline.info, Node: Completion Variables, Next: A Short Completion Exam
-- Variable: rl_icppfunc_t * rl_filename_stat_hook
If non-zero, this is the address of a function for the completer to
call before deciding which character to append to a completed name.
- This function modifies its filename name argument, and the
- modified value is passed to `stat()' to determine the file's type
- and characteristics. This function does not need to remove quote
+ This function modifies its filename name argument, and the modified
+ value is passed to 'stat()' to determine the file's type and
+ characteristics. This function does not need to remove quote
characters from the filename.
The stat hook returns an integer that should be non-zero if the
@@ -3244,19 +3317,19 @@ File: readline.info, Node: Completion Variables, Next: A Short Completion Exam
If non-zero, then this is the address of a function to call when
completing a word would normally display the list of possible
matches. This function is called in lieu of Readline displaying
- the list. It takes three arguments: (`char **'MATCHES, `int'
- NUM_MATCHES, `int' MAX_LENGTH) where MATCHES is the array of
+ the list. It takes three arguments: ('char **'MATCHES, 'int'
+ NUM_MATCHES, 'int' MAX_LENGTH) where MATCHES is the array of
matching strings, NUM_MATCHES is the number of strings in that
array, and MAX_LENGTH is the length of the longest string in that
array. Readline provides a convenience function,
- `rl_display_match_list', that takes care of doing the display to
- Readline's output stream. That function may be called from this
+ 'rl_display_match_list', that takes care of doing the display to
+ Readline's output stream. You may call that function from this
hook.
-- Variable: const char * rl_basic_word_break_characters
The basic list of characters that signal a break between words for
the completer routine. The default value of this variable is the
- characters which break words for completion in Bash: `"
+ characters which break words for completion in Bash: '"
\t\n\"\\'`@$><=;|&{("'.
-- Variable: const char * rl_basic_quote_characters
@@ -3264,28 +3337,28 @@ File: readline.info, Node: Completion Variables, Next: A Short Completion Exam
-- Variable: const char * rl_completer_word_break_characters
The list of characters that signal a break between words for
- `rl_complete_internal()'. The default list is the value of
- `rl_basic_word_break_characters'.
+ 'rl_complete_internal()'. The default list is the value of
+ 'rl_basic_word_break_characters'.
-- Variable: rl_cpvfunc_t * rl_completion_word_break_hook
If non-zero, this is the address of a function to call when
Readline is deciding where to separate words for word completion.
It should return a character string like
- `rl_completer_word_break_characters' to be used to perform the
+ 'rl_completer_word_break_characters' to be used to perform the
current completion. The function may choose to set
- `rl_completer_word_break_characters' itself. If the function
- returns `NULL', `rl_completer_word_break_characters' is used.
+ 'rl_completer_word_break_characters' itself. If the function
+ returns 'NULL', 'rl_completer_word_break_characters' is used.
-- Variable: const char * rl_completer_quote_characters
A list of characters which can be used to quote a substring of the
line. Completion occurs on the entire substring, and within the
- substring `rl_completer_word_break_characters' are treated as any
+ substring 'rl_completer_word_break_characters' are treated as any
other character, unless they also appear within this list.
-- Variable: const char * rl_filename_quote_characters
A list of characters that cause a filename to be quoted by the
- completer when they appear in a completed filename. The default
- is the null string.
+ completer when they appear in a completed filename. The default is
+ the null string.
-- Variable: const char * rl_special_prefixes
The list of characters that are word break characters, but should
@@ -3302,13 +3375,13 @@ File: readline.info, Node: Completion Variables, Next: A Short Completion Exam
-- Variable: int rl_completion_append_character
When a single completion alternative matches at the end of the
- command line, this character is appended to the inserted
- completion text. The default is a space character (` '). Setting
- this to the null character (`\0') prevents anything being appended
+ command line, this character is appended to the inserted completion
+ text. The default is a space character (' '). Setting this to the
+ null character ('\0') prevents anything being appended
automatically. This can be changed in application-specific
completion functions to provide the "most sensible word separator
- character" according to an application-specific command line
- syntax specification.
+ character" according to an application-specific command line syntax
+ specification.
-- Variable: int rl_completion_suppress_append
If non-zero, RL_COMPLETION_APPEND_CHARACTER is not appended to
@@ -3329,11 +3402,10 @@ File: readline.info, Node: Completion Variables, Next: A Short Completion Exam
may only be changed within such a function.
-- Variable: int rl_completion_found_quote
- When Readline is completing quoted text, it sets this variable to
- a non-zero value if the word being completed contains or is
- delimited by any quoting characters, including backslashes. This
- is set before any application-specific completion function is
- called.
+ When Readline is completing quoted text, it sets this variable to a
+ non-zero value if the word being completed contains or is delimited
+ by any quoting characters, including backslashes. This is set
+ before any application-specific completion function is called.
-- Variable: int rl_completion_mark_symlink_dirs
If non-zero, a slash will be appended to completed filenames that
@@ -3343,8 +3415,8 @@ File: readline.info, Node: Completion Variables, Next: A Short Completion Exam
user's global preference (set via the MARK-SYMLINKED-DIRECTORIES
Readline variable) if appropriate. This variable is set to the
user's preference before any application-specific completion
- function is called, so unless that function modifies the value,
- the user's preferences are honored.
+ function is called, so unless that function modifies the value, the
+ user's preferences are honored.
-- Variable: int rl_ignore_completion_duplicates
If non-zero, then duplicates in the matches are removed. The
@@ -3352,27 +3424,27 @@ File: readline.info, Node: Completion Variables, Next: A Short Completion Exam
-- Variable: int rl_filename_completion_desired
Non-zero means that the results of the matches are to be treated as
- filenames. This is _always_ zero when completion is attempted,
- and can only be changed within an application-specific completion
+ filenames. This is _always_ zero when completion is attempted, and
+ can only be changed within an application-specific completion
function. If it is set to a non-zero value by such a function,
directory names have a slash appended and Readline attempts to
quote completed filenames if they contain any characters in
- `rl_filename_quote_characters' and `rl_filename_quoting_desired'
- is set to a non-zero value.
+ 'rl_filename_quote_characters' and 'rl_filename_quoting_desired' is
+ set to a non-zero value.
-- Variable: int rl_filename_quoting_desired
Non-zero means that the results of the matches are to be quoted
using double quotes (or an application-specific quoting mechanism)
if the completed filename contains any characters in
- `rl_filename_quote_chars'. This is _always_ non-zero when
+ 'rl_filename_quote_chars'. This is _always_ non-zero when
completion is attempted, and can only be changed within an
application-specific completion function. The quoting is effected
via a call to the function pointed to by
- `rl_filename_quoting_function'.
+ 'rl_filename_quoting_function'.
-- Variable: int rl_attempted_completion_over
If an application-specific completion function assigned to
- `rl_attempted_completion_function' sets this variable to a non-zero
+ 'rl_attempted_completion_function' sets this variable to a non-zero
value, Readline will not perform its default filename completion
even if the application's completion function returns no matches.
It should be set only by an application's completion function.
@@ -3382,27 +3454,27 @@ File: readline.info, Node: Completion Variables, Next: A Short Completion Exam
the list of completions (which implies that it cannot remove any
duplicate completions). The default value is 1, which means that
Readline will sort the completions and, depending on the value of
- `rl_ignore_completion_duplicates', will attempt to remove duplicate
+ 'rl_ignore_completion_duplicates', will attempt to remove duplicate
matches.
-- Variable: int rl_completion_type
Set to a character describing the type of completion Readline is
currently attempting; see the description of
- `rl_complete_internal()' (*note Completion Functions::) for the
+ 'rl_complete_internal()' (*note Completion Functions::) for the
list of characters. This is set to the appropriate value before
any application-specific completion function is called, allowing
- such functions to present the same interface as `rl_complete()'.
+ such functions to present the same interface as 'rl_complete()'.
-- Variable: int rl_completion_invoking_key
Set to the final character in the key sequence that invoked one of
- the completion functions that call `rl_complete_internal()'. This
+ the completion functions that call 'rl_complete_internal()'. This
is set to the appropriate value before any application-specific
completion function is called.
-- Variable: int rl_inhibit_completion
If this variable is non-zero, completion is inhibited. The
completion character will be inserted as any other bound to
- `self-insert'.
+ 'self-insert'.
File: readline.info, Node: A Short Completion Example, Prev: Completion Variables, Up: Custom Completers
@@ -3411,8 +3483,8 @@ File: readline.info, Node: A Short Completion Example, Prev: Completion Variab
--------------------------------
Here is a small application demonstrating the use of the GNU Readline
-library. It is called `fileman', and the source code resides in
-`examples/fileman.c'. This sample application provides completion of
+library. It is called 'fileman', and the source code resides in
+'examples/fileman.c'. This sample application provides completion of
command names, line editing features, and access to the history list.
/* fileman.c -- A tiny application which demonstrates how to use the
@@ -3887,7 +3959,7 @@ Appendix A GNU Free Documentation License
Version 1.3, 3 November 2008
Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
- `http://fsf.org/'
+
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -3912,21 +3984,21 @@ Appendix A GNU Free Documentation License
free program should come with manuals providing the same freedoms
that the software does. But this License is not limited to
software manuals; it can be used for any textual work, regardless
- of subject matter or whether it is published as a printed book.
- We recommend this License principally for works whose purpose is
+ of subject matter or whether it is published as a printed book. We
+ recommend this License principally for works whose purpose is
instruction or reference.
1. APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium,
- that contains a notice placed by the copyright holder saying it
- can be distributed under the terms of this License. Such a notice
+ that contains a notice placed by the copyright holder saying it can
+ be distributed under the terms of this License. Such a notice
grants a world-wide, royalty-free license, unlimited in duration,
to use that work under the conditions stated herein. The
"Document", below, refers to any such manual or work. Any member
- of the public is a licensee, and is addressed as "you". You
- accept the license if you copy, modify or distribute the work in a
- way requiring permission under copyright law.
+ of the public is a licensee, and is addressed as "you". You accept
+ the license if you copy, modify or distribute the work in a way
+ requiring permission under copyright law.
A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
@@ -3944,12 +4016,12 @@ Appendix A GNU Free Documentation License
regarding them.
The "Invariant Sections" are certain Secondary Sections whose
- titles are designated, as being those of Invariant Sections, in
- the notice that says that the Document is released under this
- License. If a section does not fit the above definition of
- Secondary then it is not allowed to be designated as Invariant.
- The Document may contain zero Invariant Sections. If the Document
- does not identify any Invariant Sections then there are none.
+ titles are designated, as being those of Invariant Sections, in the
+ notice that says that the Document is released under this License.
+ If a section does not fit the above definition of Secondary then it
+ is not allowed to be designated as Invariant. The Document may
+ contain zero Invariant Sections. If the Document does not identify
+ any Invariant Sections then there are none.
The "Cover Texts" are certain short passages of text that are
listed, as Front-Cover Texts or Back-Cover Texts, in the notice
@@ -3960,27 +4032,27 @@ Appendix A GNU Free Documentation License
A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, that is suitable for revising the document
- straightforwardly with generic text editors or (for images
- composed of pixels) generic paint programs or (for drawings) some
- widely available drawing editor, and that is suitable for input to
- text formatters or for automatic translation to a variety of
- formats suitable for input to text formatters. A copy made in an
- otherwise Transparent file format whose markup, or absence of
- markup, has been arranged to thwart or discourage subsequent
- modification by readers is not Transparent. An image format is
- not Transparent if used for any substantial amount of text. A
- copy that is not "Transparent" is called "Opaque".
+ straightforwardly with generic text editors or (for images composed
+ of pixels) generic paint programs or (for drawings) some widely
+ available drawing editor, and that is suitable for input to text
+ formatters or for automatic translation to a variety of formats
+ suitable for input to text formatters. A copy made in an otherwise
+ Transparent file format whose markup, or absence of markup, has
+ been arranged to thwart or discourage subsequent modification by
+ readers is not Transparent. An image format is not Transparent if
+ used for any substantial amount of text. A copy that is not
+ "Transparent" is called "Opaque".
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format,
- SGML or XML using a publicly available DTD, and
- standard-conforming simple HTML, PostScript or PDF designed for
- human modification. Examples of transparent image formats include
- PNG, XCF and JPG. Opaque formats include proprietary formats that
- can be read and edited only by proprietary word processors, SGML or
- XML for which the DTD and/or processing tools are not generally
- available, and the machine-generated HTML, PostScript or PDF
- produced by some word processors for output purposes only.
+ SGML or XML using a publicly available DTD, and standard-conforming
+ simple HTML, PostScript or PDF designed for human modification.
+ Examples of transparent image formats include PNG, XCF and JPG.
+ Opaque formats include proprietary formats that can be read and
+ edited only by proprietary word processors, SGML or XML for which
+ the DTD and/or processing tools are not generally available, and
+ the machine-generated HTML, PostScript or PDF produced by some word
+ processors for output purposes only.
The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the
@@ -4018,8 +4090,8 @@ Appendix A GNU Free Documentation License
may not use technical measures to obstruct or control the reading
or further copying of the copies you make or distribute. However,
you may accept compensation in exchange for copies. If you
- distribute a large enough number of copies you must also follow
- the conditions in section 3.
+ distribute a large enough number of copies you must also follow the
+ conditions in section 3.
You may also lend copies, under the same conditions stated above,
and you may publicly display copies.
@@ -4033,12 +4105,11 @@ Appendix A GNU Free Documentation License
these Cover Texts: Front-Cover Texts on the front cover, and
Back-Cover Texts on the back cover. Both covers must also clearly
and legibly identify you as the publisher of these copies. The
- front cover must present the full title with all words of the
- title equally prominent and visible. You may add other material
- on the covers in addition. Copying with changes limited to the
- covers, as long as they preserve the title of the Document and
- satisfy these conditions, can be treated as verbatim copying in
- other respects.
+ front cover must present the full title with all words of the title
+ equally prominent and visible. You may add other material on the
+ covers in addition. Copying with changes limited to the covers, as
+ long as they preserve the title of the Document and satisfy these
+ conditions, can be treated as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
@@ -4046,40 +4117,39 @@ Appendix A GNU Free Documentation License
adjacent pages.
If you publish or distribute Opaque copies of the Document
- numbering more than 100, you must either include a
- machine-readable Transparent copy along with each Opaque copy, or
- state in or with each Opaque copy a computer-network location from
- which the general network-using public has access to download
- using public-standard network protocols a complete Transparent
- copy of the Document, free of added material. If you use the
- latter option, you must take reasonably prudent steps, when you
- begin distribution of Opaque copies in quantity, to ensure that
- this Transparent copy will remain thus accessible at the stated
- location until at least one year after the last time you
- distribute an Opaque copy (directly or through your agents or
- retailers) of that edition to the public.
+ numbering more than 100, you must either include a machine-readable
+ Transparent copy along with each Opaque copy, or state in or with
+ each Opaque copy a computer-network location from which the general
+ network-using public has access to download using public-standard
+ network protocols a complete Transparent copy of the Document, free
+ of added material. If you use the latter option, you must take
+ reasonably prudent steps, when you begin distribution of Opaque
+ copies in quantity, to ensure that this Transparent copy will
+ remain thus accessible at the stated location until at least one
+ year after the last time you distribute an Opaque copy (directly or
+ through your agents or retailers) of that edition to the public.
It is requested, but not required, that you contact the authors of
- the Document well before redistributing any large number of
- copies, to give them a chance to provide you with an updated
- version of the Document.
+ the Document well before redistributing any large number of copies,
+ to give them a chance to provide you with an updated version of the
+ Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document
under the conditions of sections 2 and 3 above, provided that you
- release the Modified Version under precisely this License, with
- the Modified Version filling the role of the Document, thus
- licensing distribution and modification of the Modified Version to
- whoever possesses a copy of it. In addition, you must do these
- things in the Modified Version:
+ release the Modified Version under precisely this License, with the
+ Modified Version filling the role of the Document, thus licensing
+ distribution and modification of the Modified Version to whoever
+ possesses a copy of it. In addition, you must do these things in
+ the Modified Version:
A. Use in the Title Page (and on the covers, if any) a title
- distinct from that of the Document, and from those of
- previous versions (which should, if there were any, be listed
- in the History section of the Document). You may use the
- same title as a previous version if the original publisher of
- that version gives permission.
+ distinct from that of the Document, and from those of previous
+ versions (which should, if there were any, be listed in the
+ History section of the Document). You may use the same title
+ as a previous version if the original publisher of that
+ version gives permission.
B. List on the Title Page, as authors, one or more persons or
entities responsible for authorship of the modifications in
@@ -4109,31 +4179,30 @@ Appendix A GNU Free Documentation License
I. Preserve the section Entitled "History", Preserve its Title,
and add to it an item stating at least the title, year, new
- authors, and publisher of the Modified Version as given on
- the Title Page. If there is no section Entitled "History" in
- the Document, create one stating the title, year, authors,
- and publisher of the Document as given on its Title Page,
- then add an item describing the Modified Version as stated in
- the previous sentence.
+ authors, and publisher of the Modified Version as given on the
+ Title Page. If there is no section Entitled "History" in the
+ Document, create one stating the title, year, authors, and
+ publisher of the Document as given on its Title Page, then add
+ an item describing the Modified Version as stated in the
+ previous sentence.
J. Preserve the network location, if any, given in the Document
for public access to a Transparent copy of the Document, and
likewise the network locations given in the Document for
- previous versions it was based on. These may be placed in
- the "History" section. You may omit a network location for a
- work that was published at least four years before the
- Document itself, or if the original publisher of the version
- it refers to gives permission.
+ previous versions it was based on. These may be placed in the
+ "History" section. You may omit a network location for a work
+ that was published at least four years before the Document
+ itself, or if the original publisher of the version it refers
+ to gives permission.
K. For any section Entitled "Acknowledgements" or "Dedications",
- Preserve the Title of the section, and preserve in the
- section all the substance and tone of each of the contributor
+ Preserve the Title of the section, and preserve in the section
+ all the substance and tone of each of the contributor
acknowledgements and/or dedications given therein.
- L. Preserve all the Invariant Sections of the Document,
- unaltered in their text and in their titles. Section numbers
- or the equivalent are not considered part of the section
- titles.
+ L. Preserve all the Invariant Sections of the Document, unaltered
+ in their text and in their titles. Section numbers or the
+ equivalent are not considered part of the section titles.
M. Delete any section Entitled "Endorsements". Such a section
may not be included in the Modified Version.
@@ -4146,11 +4215,11 @@ Appendix A GNU Free Documentation License
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no
- material copied from the Document, you may at your option
- designate some or all of these sections as invariant. To do this,
- add their titles to the list of Invariant Sections in the Modified
- Version's license notice. These titles must be distinct from any
- other section titles.
+ material copied from the Document, you may at your option designate
+ some or all of these sections as invariant. To do this, add their
+ titles to the list of Invariant Sections in the Modified Version's
+ license notice. These titles must be distinct from any other
+ section titles.
You may add a section Entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various
@@ -4159,15 +4228,15 @@ Appendix A GNU Free Documentation License
definition of a standard.
You may add a passage of up to five words as a Front-Cover Text,
- and a passage of up to 25 words as a Back-Cover Text, to the end
- of the list of Cover Texts in the Modified Version. Only one
- passage of Front-Cover Text and one of Back-Cover Text may be
- added by (or through arrangements made by) any one entity. If the
- Document already includes a cover text for the same cover,
- previously added by you or by arrangement made by the same entity
- you are acting on behalf of, you may not add another; but you may
- replace the old one, on explicit permission from the previous
- publisher that added the old one.
+ and a passage of up to 25 words as a Back-Cover Text, to the end of
+ the list of Cover Texts in the Modified Version. Only one passage
+ of Front-Cover Text and one of Back-Cover Text may be added by (or
+ through arrangements made by) any one entity. If the Document
+ already includes a cover text for the same cover, previously added
+ by you or by arrangement made by the same entity you are acting on
+ behalf of, you may not add another; but you may replace the old
+ one, on explicit permission from the previous publisher that added
+ the old one.
The author(s) and publisher(s) of the Document do not by this
License give permission to use their names for publicity for or to
@@ -4177,8 +4246,8 @@ Appendix A GNU Free Documentation License
You may combine the Document with other documents released under
this License, under the terms defined in section 4 above for
- modified versions, provided that you include in the combination
- all of the Invariant Sections of all of the original documents,
+ modified versions, provided that you include in the combination all
+ of the Invariant Sections of all of the original documents,
unmodified, and list them all as Invariant Sections of your
combined work in its license notice, and that you preserve all
their Warranty Disclaimers.
@@ -4205,20 +4274,20 @@ Appendix A GNU Free Documentation License
documents released under this License, and replace the individual
copies of this License in the various documents with a single copy
that is included in the collection, provided that you follow the
- rules of this License for verbatim copying of each of the
- documents in all other respects.
+ rules of this License for verbatim copying of each of the documents
+ in all other respects.
You may extract a single document from such a collection, and
distribute it individually under this License, provided you insert
- a copy of this License into the extracted document, and follow
- this License in all other respects regarding verbatim copying of
- that document.
+ a copy of this License into the extracted document, and follow this
+ License in all other respects regarding verbatim copying of that
+ document.
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other
- separate and independent documents or works, in or on a volume of
- a storage or distribution medium, is called an "aggregate" if the
+ separate and independent documents or works, in or on a volume of a
+ storage or distribution medium, is called an "aggregate" if the
copyright resulting from the compilation is not used to limit the
legal rights of the compilation's users beyond what the individual
works permit. When the Document is included in an aggregate, this
@@ -4263,8 +4332,8 @@ Appendix A GNU Free Documentation License
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
- provisionally, unless and until the copyright holder explicitly
- and finally terminates your license, and (b) permanently, if the
+ provisionally, unless and until the copyright holder explicitly and
+ finally terminates your license, and (b) permanently, if the
copyright holder fails to notify you of the violation by some
reasonable means prior to 60 days after the cessation.
@@ -4276,33 +4345,33 @@ Appendix A GNU Free Documentation License
after your receipt of the notice.
Termination of your rights under this section does not terminate
- the licenses of parties who have received copies or rights from
- you under this License. If your rights have been terminated and
- not permanently reinstated, receipt of a copy of some or all of
- the same material does not give you any rights to use it.
+ the licenses of parties who have received copies or rights from you
+ under this License. If your rights have been terminated and not
+ permanently reinstated, receipt of a copy of some or all of the
+ same material does not give you any rights to use it.
- 10. FUTURE REVISIONS OF THIS LICENSE
+ 10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions of
the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
- `http://www.gnu.org/copyleft/'.
+ .
Each version of the License is given a distinguishing version
number. If the Document specifies that a particular numbered
version of this License "or any later version" applies to it, you
have the option of following the terms and conditions either of
that specified version or of any later version that has been
- published (not as a draft) by the Free Software Foundation. If
- the Document does not specify a version number of this License,
- you may choose any version ever published (not as a draft) by the
- Free Software Foundation. If the Document specifies that a proxy
- can decide which future versions of this License can be used, that
+ published (not as a draft) by the Free Software Foundation. If the
+ Document does not specify a version number of this License, you may
+ choose any version ever published (not as a draft) by the Free
+ Software Foundation. If the Document specifies that a proxy can
+ decide which future versions of this License can be used, that
proxy's public statement of acceptance of a version permanently
authorizes you to choose that version for the Document.
- 11. RELICENSING
+ 11. RELICENSING
"Massive Multiauthor Collaboration Site" (or "MMC Site") means any
World Wide Web server that publishes copyrightable works and also
@@ -4332,7 +4401,6 @@ Appendix A GNU Free Documentation License
site under CC-BY-SA on the same site at any time before August 1,
2009, provided the MMC is eligible for relicensing.
-
ADDENDUM: How to use this License for your documents
====================================================
@@ -4349,7 +4417,7 @@ notices just after the title page:
Free Documentation License''.
If you have Invariant Sections, Front-Cover Texts and Back-Cover
-Texts, replace the "with...Texts." line with this:
+Texts, replace the "with...Texts." line with this:
with the Invariant Sections being LIST THEIR TITLES, with
the Front-Cover Texts being LIST, and with the Back-Cover Texts
@@ -4360,9 +4428,9 @@ combination of the three, merge those two alternatives to suit the
situation.
If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License, to
-permit their use in free software.
+recommend releasing these examples in parallel under your choice of free
+software license, such as the GNU General Public License, to permit
+their use in free software.
File: readline.info, Node: Concept Index, Next: Function and Variable Index, Prev: GNU Free Documentation License, Up: Top
@@ -4382,7 +4450,7 @@ Concept Index
* initialization file, readline: Readline Init File. (line 6)
* interaction, readline: Readline Interaction. (line 6)
* kill ring: Readline Killing Commands.
- (line 19)
+ (line 18)
* killing text: Readline Killing Commands.
(line 6)
* notation, readline: Readline Bare Essentials.
@@ -4402,12 +4470,12 @@ Function and Variable Index
[index ]
* Menu:
-* _rl_digit_p: Utility Functions. (line 65)
-* _rl_digit_value: Utility Functions. (line 76)
-* _rl_lowercase_p: Utility Functions. (line 62)
-* _rl_to_lower: Utility Functions. (line 72)
-* _rl_to_upper: Utility Functions. (line 68)
-* _rl_uppercase_p: Utility Functions. (line 59)
+* _rl_digit_p: Utility Functions. (line 64)
+* _rl_digit_value: Utility Functions. (line 75)
+* _rl_lowercase_p: Utility Functions. (line 61)
+* _rl_to_lower: Utility Functions. (line 71)
+* _rl_to_upper: Utility Functions. (line 67)
+* _rl_uppercase_p: Utility Functions. (line 58)
* abort (C-g): Miscellaneous Commands.
(line 10)
* accept-line (Newline or Return): Commands For History.
@@ -4426,31 +4494,36 @@ Function and Variable Index
(line 35)
* bind-tty-special-chars: Readline Init File Syntax.
(line 42)
+* blink-matching-paren: Readline Init File Syntax.
+ (line 47)
+* bracketed-paste-begin (): Commands For Text. (line 36)
* call-last-kbd-macro (C-x e): Keyboard Macros. (line 13)
-* capitalize-word (M-c): Commands For Text. (line 55)
+* capitalize-word (M-c): Commands For Text. (line 64)
* character-search (C-]): Miscellaneous Commands.
(line 41)
* character-search-backward (M-C-]): Miscellaneous Commands.
(line 46)
* clear-screen (C-l): Commands For Moving. (line 26)
+* colored-completion-prefix: Readline Init File Syntax.
+ (line 52)
* colored-stats: Readline Init File Syntax.
- (line 47)
+ (line 59)
* comment-begin: Readline Init File Syntax.
- (line 53)
+ (line 65)
* complete (): Commands For Completion.
(line 6)
* completion-display-width: Readline Init File Syntax.
- (line 58)
+ (line 70)
* completion-ignore-case: Readline Init File Syntax.
- (line 65)
+ (line 77)
* completion-map-case: Readline Init File Syntax.
- (line 70)
+ (line 82)
* completion-prefix-display-length: Readline Init File Syntax.
- (line 76)
+ (line 88)
* completion-query-items: Readline Init File Syntax.
- (line 83)
+ (line 95)
* convert-meta: Readline Init File Syntax.
- (line 93)
+ (line 105)
* copy-backward-word (): Commands For Killing.
(line 49)
* copy-forward-word (): Commands For Killing.
@@ -4464,20 +4537,28 @@ Function and Variable Index
(line 37)
* digit-argument (M-0, M-1, ... M--): Numeric Arguments. (line 6)
* disable-completion: Readline Init File Syntax.
- (line 99)
+ (line 113)
* do-uppercase-version (M-a, M-b, M-X, ...): Miscellaneous Commands.
(line 14)
-* downcase-word (M-l): Commands For Text. (line 51)
+* downcase-word (M-l): Commands For Text. (line 60)
* dump-functions (): Miscellaneous Commands.
- (line 70)
+ (line 69)
* dump-macros (): Miscellaneous Commands.
- (line 82)
+ (line 81)
* dump-variables (): Miscellaneous Commands.
- (line 76)
+ (line 75)
+* echo-control-characters: Readline Init File Syntax.
+ (line 118)
* editing-mode: Readline Init File Syntax.
- (line 104)
+ (line 123)
+* emacs-editing-mode (C-e): Miscellaneous Commands.
+ (line 87)
+* emacs-mode-string: Readline Init File Syntax.
+ (line 129)
+* enable-bracketed-paste: Readline Init File Syntax.
+ (line 139)
* enable-keypad: Readline Init File Syntax.
- (line 115)
+ (line 147)
* end-kbd-macro (C-x )): Keyboard Macros. (line 9)
* end-of-file (usually C-d): Commands For Text. (line 6)
* end-of-history (M->): Commands For History.
@@ -4486,36 +4567,36 @@ Function and Variable Index
* exchange-point-and-mark (C-x C-x): Miscellaneous Commands.
(line 36)
* expand-tilde: Readline Init File Syntax.
- (line 126)
+ (line 158)
* forward-backward-delete-char (): Commands For Text. (line 21)
* forward-char (C-f): Commands For Moving. (line 12)
* forward-search-history (C-s): Commands For History.
(line 30)
* forward-word (M-f): Commands For Moving. (line 18)
* history-preserve-point: Readline Init File Syntax.
- (line 130)
+ (line 162)
* history-search-backward (): Commands For History.
- (line 51)
+ (line 52)
* history-search-forward (): Commands For History.
- (line 45)
+ (line 46)
* history-size: Readline Init File Syntax.
- (line 136)
+ (line 168)
* history-substr-search-backward (): Commands For History.
- (line 63)
+ (line 64)
* history-substr-search-forward (): Commands For History.
- (line 57)
+ (line 58)
* horizontal-scroll-mode: Readline Init File Syntax.
- (line 143)
+ (line 177)
* input-meta: Readline Init File Syntax.
- (line 150)
+ (line 184)
* insert-comment (M-#): Miscellaneous Commands.
(line 60)
* insert-completions (M-*): Commands For Completion.
(line 18)
* isearch-terminators: Readline Init File Syntax.
- (line 157)
+ (line 192)
* keymap: Readline Init File Syntax.
- (line 164)
+ (line 199)
* kill-line (C-k): Commands For Killing.
(line 6)
* kill-region (): Commands For Killing.
@@ -4525,30 +4606,30 @@ Function and Variable Index
* kill-word (M-d): Commands For Killing.
(line 19)
* mark-modified-lines: Readline Init File Syntax.
- (line 193)
+ (line 229)
* mark-symlinked-directories: Readline Init File Syntax.
- (line 198)
+ (line 234)
* match-hidden-files: Readline Init File Syntax.
- (line 203)
+ (line 239)
* menu-complete (): Commands For Completion.
(line 22)
* menu-complete-backward (): Commands For Completion.
(line 34)
* menu-complete-display-prefix: Readline Init File Syntax.
- (line 210)
+ (line 246)
* meta-flag: Readline Init File Syntax.
- (line 150)
+ (line 184)
* next-history (C-n): Commands For History.
(line 16)
* non-incremental-forward-search-history (M-n): Commands For History.
(line 40)
* non-incremental-reverse-search-history (M-p): Commands For History.
- (line 35)
+ (line 34)
* output-meta: Readline Init File Syntax.
- (line 215)
-* overwrite-mode (): Commands For Text. (line 59)
+ (line 251)
+* overwrite-mode (): Commands For Text. (line 68)
* page-completions: Readline Init File Syntax.
- (line 220)
+ (line 257)
* possible-completions (M-?): Commands For Completion.
(line 11)
* prefix-meta (): Miscellaneous Commands.
@@ -4564,282 +4645,292 @@ Function and Variable Index
* reverse-search-history (C-r): Commands For History.
(line 26)
* revert-all-at-newline: Readline Init File Syntax.
- (line 230)
+ (line 267)
* revert-line (M-r): Miscellaneous Commands.
(line 25)
-* rl_add_defun: Function Naming. (line 20)
+* rl_add_defun: Function Naming. (line 18)
* rl_add_funmap_entry: Associating Function Names and Bindings.
- (line 47)
-* rl_add_undo: Allowing Undoing. (line 41)
-* rl_alphabetic: Utility Functions. (line 39)
-* rl_already_prompted: Readline Variables. (line 64)
+ (line 45)
+* rl_add_undo: Allowing Undoing. (line 39)
+* rl_alphabetic: Utility Functions. (line 38)
+* rl_already_prompted: Readline Variables. (line 63)
* rl_attempted_completion_function: Completion Variables.
- (line 12)
+ (line 11)
* rl_attempted_completion_over: Completion Variables.
- (line 255)
+ (line 253)
* rl_basic_quote_characters: Completion Variables.
- (line 144)
+ (line 143)
* rl_basic_word_break_characters: Completion Variables.
- (line 138)
-* rl_begin_undo_group: Allowing Undoing. (line 29)
-* rl_bind_key: Binding Keys. (line 22)
-* rl_bind_key_if_unbound: Binding Keys. (line 32)
-* rl_bind_key_if_unbound_in_map: Binding Keys. (line 38)
-* rl_bind_key_in_map: Binding Keys. (line 27)
-* rl_bind_keyseq: Binding Keys. (line 59)
-* rl_bind_keyseq_if_unbound: Binding Keys. (line 77)
-* rl_bind_keyseq_if_unbound_in_map: Binding Keys. (line 83)
-* rl_bind_keyseq_in_map: Binding Keys. (line 66)
-* rl_binding_keymap: Readline Variables. (line 186)
-* rl_callback_handler_install: Alternate Interface. (line 15)
-* rl_callback_handler_remove: Alternate Interface. (line 35)
+ (line 137)
+* rl_begin_undo_group: Allowing Undoing. (line 28)
+* rl_binding_keymap: Readline Variables. (line 184)
+* rl_bind_key: Binding Keys. (line 21)
+* rl_bind_keyseq: Binding Keys. (line 57)
+* rl_bind_keyseq_if_unbound: Binding Keys. (line 75)
+* rl_bind_keyseq_if_unbound_in_map: Binding Keys. (line 81)
+* rl_bind_keyseq_in_map: Binding Keys. (line 64)
+* rl_bind_key_if_unbound: Binding Keys. (line 30)
+* rl_bind_key_if_unbound_in_map: Binding Keys. (line 36)
+* rl_bind_key_in_map: Binding Keys. (line 25)
+* rl_callback_handler_install: Alternate Interface. (line 13)
+* rl_callback_handler_remove: Alternate Interface. (line 42)
* rl_callback_read_char: Alternate Interface. (line 22)
+* rl_callback_sigcleanup: Alternate Interface. (line 35)
* rl_catch_signals: Readline Signal Handling.
- (line 48)
+ (line 69)
* rl_catch_sigwinch: Readline Signal Handling.
- (line 55)
+ (line 76)
* rl_change_environment: Readline Signal Handling.
- (line 61)
+ (line 90)
* rl_char_is_quoted_p: Completion Variables.
- (line 46)
+ (line 45)
* rl_cleanup_after_signal: Readline Signal Handling.
- (line 73)
+ (line 107)
* rl_clear_history: Miscellaneous Functions.
- (line 50)
-* rl_clear_message: Redisplay. (line 48)
-* rl_clear_pending_input: Character Input. (line 30)
-* rl_clear_signals: Readline Signal Handling.
- (line 132)
-* rl_complete <1>: How Completing Works.
(line 49)
-* rl_complete: Completion Functions.
- (line 20)
-* rl_complete_internal: Completion Functions.
- (line 10)
+* rl_clear_message: Redisplay. (line 51)
+* rl_clear_pending_input: Character Input. (line 29)
+* rl_clear_signals: Readline Signal Handling.
+ (line 166)
+* rl_clear_visible_line: Redisplay. (line 25)
+* rl_complete: How Completing Works.
+ (line 46)
+* rl_complete <1>: Completion Functions.
+ (line 19)
* rl_completer_quote_characters: Completion Variables.
- (line 161)
+ (line 160)
* rl_completer_word_break_characters: Completion Variables.
- (line 147)
+ (line 146)
+* rl_complete_internal: Completion Functions.
+ (line 9)
* rl_completion_append_character: Completion Variables.
- (line 185)
+ (line 184)
* rl_completion_display_matches_hook: Completion Variables.
- (line 125)
-* rl_completion_entry_function <1>: How Completing Works.
- (line 55)
-* rl_completion_entry_function: Completion Variables.
- (line 7)
+ (line 124)
+* rl_completion_entry_function: How Completing Works.
+ (line 52)
+* rl_completion_entry_function <1>: Completion Variables.
+ (line 6)
* rl_completion_found_quote: Completion Variables.
- (line 213)
+ (line 212)
* rl_completion_invoking_key: Completion Variables.
- (line 278)
+ (line 276)
* rl_completion_mark_symlink_dirs: Completion Variables.
- (line 220)
+ (line 218)
* rl_completion_matches: Completion Functions.
- (line 45)
+ (line 43)
* rl_completion_mode: Completion Functions.
- (line 37)
+ (line 36)
* rl_completion_query_items: Completion Variables.
- (line 179)
+ (line 178)
* rl_completion_quote_character: Completion Variables.
- (line 201)
+ (line 200)
* rl_completion_suppress_append: Completion Variables.
- (line 195)
+ (line 194)
* rl_completion_suppress_quote: Completion Variables.
- (line 207)
+ (line 206)
* rl_completion_type: Completion Variables.
- (line 270)
+ (line 268)
* rl_completion_word_break_hook: Completion Variables.
- (line 152)
-* rl_copy_keymap: Keymaps. (line 17)
-* rl_copy_text: Modifying Text. (line 15)
-* rl_crlf: Redisplay. (line 30)
-* rl_delete_text: Modifying Text. (line 11)
-* rl_deprep_term_function: Readline Variables. (line 176)
-* rl_deprep_terminal: Terminal Management. (line 13)
-* rl_ding: Utility Functions. (line 36)
+ (line 151)
+* rl_copy_keymap: Keymaps. (line 16)
+* rl_copy_text: Modifying Text. (line 14)
+* rl_crlf: Redisplay. (line 33)
+* rl_delete_text: Modifying Text. (line 10)
+* rl_deprep_terminal: Terminal Management. (line 12)
+* rl_deprep_term_function: Readline Variables. (line 174)
+* rl_ding: Utility Functions. (line 35)
* rl_directory_completion_hook: Completion Variables.
- (line 64)
+ (line 63)
* rl_directory_rewrite_hook;: Completion Variables.
- (line 82)
-* rl_discard_keymap: Keymaps. (line 26)
-* rl_dispatching: Readline Variables. (line 41)
-* rl_display_match_list: Utility Functions. (line 43)
-* rl_display_prompt: Readline Variables. (line 59)
-* rl_do_undo: Allowing Undoing. (line 48)
-* rl_done: Readline Variables. (line 28)
+ (line 81)
+* rl_discard_keymap: Keymaps. (line 25)
+* rl_dispatching: Readline Variables. (line 40)
+* rl_display_match_list: Utility Functions. (line 41)
+* rl_display_prompt: Readline Variables. (line 58)
+* rl_done: Readline Variables. (line 27)
+* rl_do_undo: Allowing Undoing. (line 47)
* rl_echo_signal_char: Readline Signal Handling.
- (line 96)
-* rl_editing_mode: Readline Variables. (line 308)
-* rl_end: Readline Variables. (line 19)
-* rl_end_undo_group: Allowing Undoing. (line 35)
-* rl_erase_empty_line: Readline Variables. (line 47)
-* rl_event_hook: Readline Variables. (line 124)
-* rl_execute_next: Character Input. (line 26)
-* rl_executing_key: Readline Variables. (line 193)
-* rl_executing_keymap: Readline Variables. (line 182)
-* rl_executing_keyseq: Readline Variables. (line 197)
-* rl_executing_macro: Readline Variables. (line 190)
-* rl_expand_prompt: Redisplay. (line 64)
-* rl_explicit_arg: Readline Variables. (line 299)
-* rl_extend_line_buffer: Utility Functions. (line 27)
+ (line 130)
+* rl_editing_mode: Readline Variables. (line 281)
+* rl_end: Readline Variables. (line 18)
+* rl_end_undo_group: Allowing Undoing. (line 34)
+* rl_erase_empty_line: Readline Variables. (line 46)
+* rl_event_hook: Readline Variables. (line 123)
+* rl_execute_next: Character Input. (line 25)
+* rl_executing_key: Readline Variables. (line 191)
+* rl_executing_keymap: Readline Variables. (line 180)
+* rl_executing_keyseq: Readline Variables. (line 195)
+* rl_executing_macro: Readline Variables. (line 188)
+* rl_expand_prompt: Redisplay. (line 66)
+* rl_explicit_arg: Readline Variables. (line 272)
+* rl_extend_line_buffer: Utility Functions. (line 26)
* rl_filename_completion_desired: Completion Variables.
- (line 235)
+ (line 233)
* rl_filename_completion_function: Completion Functions.
- (line 59)
+ (line 57)
* rl_filename_dequoting_function: Completion Variables.
- (line 37)
+ (line 36)
* rl_filename_quote_characters: Completion Variables.
- (line 167)
+ (line 166)
* rl_filename_quoting_desired: Completion Variables.
- (line 245)
+ (line 243)
* rl_filename_quoting_function: Completion Variables.
- (line 24)
+ (line 23)
* rl_filename_rewrite_hook: Completion Variables.
- (line 110)
+ (line 109)
* rl_filename_stat_hook: Completion Variables.
- (line 98)
-* rl_forced_update_display: Redisplay. (line 11)
-* rl_free: Utility Functions. (line 18)
-* rl_free_keymap: Keymaps. (line 30)
+ (line 97)
+* rl_forced_update_display: Redisplay. (line 10)
+* rl_free: Utility Functions. (line 17)
+* rl_free_keymap: Keymaps. (line 29)
* rl_free_line_state: Readline Signal Handling.
- (line 79)
-* rl_free_undo_list: Allowing Undoing. (line 45)
+ (line 113)
+* rl_free_undo_list: Allowing Undoing. (line 44)
* rl_function_dumper: Associating Function Names and Bindings.
- (line 30)
+ (line 29)
* rl_function_of_keyseq: Associating Function Names and Bindings.
- (line 15)
+ (line 13)
* rl_funmap_names: Associating Function Names and Bindings.
- (line 40)
-* rl_generic_bind: Binding Keys. (line 89)
-* rl_get_keymap: Keymaps. (line 37)
-* rl_get_keymap_by_name: Keymaps. (line 43)
-* rl_get_keymap_name: Keymaps. (line 48)
+ (line 39)
+* rl_generic_bind: Binding Keys. (line 87)
+* rl_getc: Character Input. (line 14)
+* rl_getc_function: Readline Variables. (line 128)
+* rl_get_keymap: Keymaps. (line 36)
+* rl_get_keymap_by_name: Keymaps. (line 42)
+* rl_get_keymap_name: Keymaps. (line 47)
* rl_get_screen_size: Readline Signal Handling.
- (line 115)
+ (line 149)
* rl_get_termcap: Miscellaneous Functions.
- (line 42)
-* rl_getc: Character Input. (line 15)
-* rl_getc_function: Readline Variables. (line 130)
-* rl_gnu_readline_p: Readline Variables. (line 83)
+ (line 41)
+* rl_gnu_readline_p: Readline Variables. (line 82)
* rl_ignore_completion_duplicates: Completion Variables.
- (line 231)
+ (line 229)
* rl_ignore_some_completions_function: Completion Variables.
- (line 56)
+ (line 55)
* rl_inhibit_completion: Completion Variables.
- (line 284)
-* rl_initialize: Utility Functions. (line 31)
-* rl_input_available_hook: Readline Variables. (line 142)
+ (line 282)
+* rl_initialize: Utility Functions. (line 30)
+* rl_input_available_hook: Readline Variables. (line 140)
* rl_insert_completions: Completion Functions.
- (line 32)
-* rl_insert_text: Modifying Text. (line 7)
-* rl_instream: Readline Variables. (line 97)
+ (line 31)
+* rl_insert_text: Modifying Text. (line 6)
+* rl_instream: Readline Variables. (line 96)
* rl_invoking_keyseqs: Associating Function Names and Bindings.
- (line 21)
+ (line 20)
* rl_invoking_keyseqs_in_map: Associating Function Names and Bindings.
- (line 26)
-* rl_key_sequence_length: Readline Variables. (line 201)
-* rl_kill_text: Modifying Text. (line 19)
-* rl_last_func: Readline Variables. (line 110)
-* rl_library_version: Readline Variables. (line 73)
-* rl_line_buffer: Readline Variables. (line 9)
+ (line 24)
+* rl_key_sequence_length: Readline Variables. (line 199)
+* rl_kill_text: Modifying Text. (line 18)
+* rl_last_func: Readline Variables. (line 109)
+* rl_library_version: Readline Variables. (line 72)
+* rl_line_buffer: Readline Variables. (line 8)
* rl_list_funmap_names: Associating Function Names and Bindings.
- (line 36)
+ (line 35)
* rl_macro_bind: Miscellaneous Functions.
- (line 8)
+ (line 6)
* rl_macro_dumper: Miscellaneous Functions.
- (line 14)
-* rl_make_bare_keymap: Keymaps. (line 12)
-* rl_make_keymap: Keymaps. (line 20)
-* rl_mark: Readline Variables. (line 24)
-* rl_message: Redisplay. (line 39)
-* rl_modifying: Allowing Undoing. (line 57)
+ (line 13)
+* rl_make_bare_keymap: Keymaps. (line 11)
+* rl_make_keymap: Keymaps. (line 19)
+* rl_mark: Readline Variables. (line 23)
+* rl_message: Redisplay. (line 42)
+* rl_modifying: Allowing Undoing. (line 56)
* rl_named_function: Associating Function Names and Bindings.
- (line 11)
-* rl_num_chars_to_read: Readline Variables. (line 32)
-* rl_numeric_arg: Readline Variables. (line 303)
-* rl_on_new_line: Redisplay. (line 15)
-* rl_on_new_line_with_prompt: Redisplay. (line 19)
-* rl_outstream: Readline Variables. (line 101)
-* rl_parse_and_bind: Binding Keys. (line 96)
-* rl_pending_input: Readline Variables. (line 37)
-* rl_point: Readline Variables. (line 15)
+ (line 10)
+* rl_numeric_arg: Readline Variables. (line 276)
+* rl_num_chars_to_read: Readline Variables. (line 31)
+* rl_on_new_line: Redisplay. (line 14)
+* rl_on_new_line_with_prompt: Redisplay. (line 18)
+* rl_outstream: Readline Variables. (line 100)
+* rl_parse_and_bind: Binding Keys. (line 95)
+* rl_pending_input: Readline Variables. (line 36)
+* rl_pending_signal: Readline Signal Handling.
+ (line 102)
+* rl_persistent_signal_handlers: Readline Signal Handling.
+ (line 82)
+* rl_point: Readline Variables. (line 14)
* rl_possible_completions: Completion Functions.
- (line 28)
-* rl_pre_input_hook: Readline Variables. (line 119)
-* rl_prefer_env_winsize: Readline Variables. (line 105)
-* rl_prep_term_function: Readline Variables. (line 169)
-* rl_prep_terminal: Terminal Management. (line 7)
-* rl_prompt: Readline Variables. (line 53)
-* rl_push_macro_input: Modifying Text. (line 26)
-* rl_read_init_file: Binding Keys. (line 101)
-* rl_read_key: Character Input. (line 7)
-* rl_readline_name: Readline Variables. (line 92)
-* rl_readline_state: Readline Variables. (line 204)
-* rl_readline_version: Readline Variables. (line 76)
-* rl_redisplay: Redisplay. (line 7)
-* rl_redisplay_function: Readline Variables. (line 163)
-* rl_replace_line: Utility Functions. (line 22)
+ (line 27)
+* rl_prefer_env_winsize: Readline Variables. (line 104)
+* rl_prep_terminal: Terminal Management. (line 6)
+* rl_prep_term_function: Readline Variables. (line 167)
+* rl_pre_input_hook: Readline Variables. (line 118)
+* rl_prompt: Readline Variables. (line 52)
+* rl_push_macro_input: Modifying Text. (line 25)
+* rl_readline_name: Readline Variables. (line 91)
+* rl_readline_state: Readline Variables. (line 202)
+* rl_readline_version: Readline Variables. (line 75)
+* rl_read_init_file: Binding Keys. (line 100)
+* rl_read_key: Character Input. (line 6)
+* rl_redisplay: Redisplay. (line 6)
+* rl_redisplay_function: Readline Variables. (line 161)
+* rl_replace_line: Utility Functions. (line 21)
* rl_reset_after_signal: Readline Signal Handling.
- (line 87)
-* rl_reset_line_state: Redisplay. (line 26)
+ (line 121)
+* rl_reset_line_state: Redisplay. (line 29)
* rl_reset_screen_size: Readline Signal Handling.
- (line 119)
-* rl_reset_terminal: Terminal Management. (line 28)
+ (line 153)
+* rl_reset_terminal: Terminal Management. (line 34)
* rl_resize_terminal: Readline Signal Handling.
- (line 102)
-* rl_restore_prompt: Redisplay. (line 57)
-* rl_restore_state: Utility Functions. (line 12)
-* rl_save_prompt: Redisplay. (line 53)
-* rl_save_state: Utility Functions. (line 7)
-* rl_set_key: Binding Keys. (line 73)
-* rl_set_keyboard_input_timeout: Character Input. (line 35)
-* rl_set_keymap: Keymaps. (line 40)
+ (line 136)
+* rl_restore_prompt: Redisplay. (line 60)
+* rl_restore_state: Utility Functions. (line 11)
+* rl_save_prompt: Redisplay. (line 56)
+* rl_save_state: Utility Functions. (line 6)
+* rl_set_key: Binding Keys. (line 71)
+* rl_set_keyboard_input_timeout: Character Input. (line 34)
+* rl_set_keymap: Keymaps. (line 39)
* rl_set_paren_blink_timeout: Miscellaneous Functions.
- (line 37)
-* rl_set_prompt: Redisplay. (line 78)
+ (line 36)
+* rl_set_prompt: Redisplay. (line 80)
* rl_set_screen_size: Readline Signal Handling.
- (line 106)
+ (line 140)
* rl_set_signals: Readline Signal Handling.
- (line 126)
-* rl_show_char: Redisplay. (line 33)
-* rl_signal_event_hook: Readline Variables. (line 138)
+ (line 160)
+* rl_show_char: Redisplay. (line 36)
+* rl_signal_event_hook: Readline Variables. (line 136)
* rl_sort_completion_matches: Completion Variables.
- (line 262)
+ (line 260)
* rl_special_prefixes: Completion Variables.
- (line 172)
-* rl_startup_hook: Readline Variables. (line 115)
-* rl_stuff_char: Character Input. (line 19)
-* rl_terminal_name: Readline Variables. (line 87)
-* rl_tty_set_default_bindings: Terminal Management. (line 18)
-* rl_tty_unset_default_bindings: Terminal Management. (line 23)
-* rl_unbind_command_in_map: Binding Keys. (line 55)
-* rl_unbind_function_in_map: Binding Keys. (line 51)
-* rl_unbind_key: Binding Keys. (line 42)
-* rl_unbind_key_in_map: Binding Keys. (line 46)
+ (line 171)
+* rl_startup_hook: Readline Variables. (line 114)
+* rl_stuff_char: Character Input. (line 18)
+* rl_terminal_name: Readline Variables. (line 86)
+* rl_tty_set_default_bindings: Terminal Management. (line 17)
+* rl_tty_set_echoing: Terminal Management. (line 27)
+* rl_tty_unset_default_bindings: Terminal Management. (line 22)
+* rl_unbind_command_in_map: Binding Keys. (line 53)
+* rl_unbind_function_in_map: Binding Keys. (line 49)
+* rl_unbind_key: Binding Keys. (line 41)
+* rl_unbind_key_in_map: Binding Keys. (line 45)
* rl_username_completion_function: Completion Functions.
- (line 66)
+ (line 64)
* rl_variable_bind: Miscellaneous Functions.
- (line 21)
+ (line 19)
* rl_variable_dumper: Miscellaneous Functions.
- (line 31)
+ (line 30)
* rl_variable_value: Miscellaneous Functions.
- (line 26)
+ (line 25)
* self-insert (a, b, A, 1, !, ...): Commands For Text. (line 33)
* set-mark (C-@): Miscellaneous Commands.
(line 32)
* show-all-if-ambiguous: Readline Init File Syntax.
- (line 236)
+ (line 273)
* show-all-if-unmodified: Readline Init File Syntax.
- (line 242)
+ (line 279)
* show-mode-in-prompt: Readline Init File Syntax.
- (line 251)
+ (line 288)
* skip-completed-text: Readline Init File Syntax.
- (line 256)
+ (line 294)
* skip-csi-sequence (): Miscellaneous Commands.
(line 51)
* start-kbd-macro (C-x (): Keyboard Macros. (line 6)
-* transpose-chars (C-t): Commands For Text. (line 36)
-* transpose-words (M-t): Commands For Text. (line 42)
+* tab-insert (M-): Commands For Text. (line 30)
+* tilde-expand (M-~): Miscellaneous Commands.
+ (line 29)
+* transpose-chars (C-t): Commands For Text. (line 45)
+* transpose-words (M-t): Commands For Text. (line 51)
* undo (C-_ or C-x C-u): Miscellaneous Commands.
(line 22)
* universal-argument (): Numeric Arguments. (line 10)
@@ -4849,73 +4940,79 @@ Function and Variable Index
(line 12)
* unix-word-rubout (C-w): Commands For Killing.
(line 28)
-* upcase-word (M-u): Commands For Text. (line 47)
+* upcase-word (M-u): Commands For Text. (line 56)
+* vi-cmd-mode-string: Readline Init File Syntax.
+ (line 307)
+* vi-editing-mode (M-C-j): Miscellaneous Commands.
+ (line 91)
+* vi-ins-mode-string: Readline Init File Syntax.
+ (line 317)
* visible-stats: Readline Init File Syntax.
- (line 269)
+ (line 327)
* yank (C-y): Commands For Killing.
(line 59)
* yank-last-arg (M-. or M-_): Commands For History.
- (line 78)
+ (line 79)
* yank-nth-arg (M-C-y): Commands For History.
- (line 69)
+ (line 70)
* yank-pop (M-y): Commands For Killing.
(line 62)
Tag Table:
-Node: Top907
-Node: Command Line Editing1632
-Node: Introduction and Notation2284
-Node: Readline Interaction3907
-Node: Readline Bare Essentials5099
-Node: Readline Movement Commands6889
-Node: Readline Killing Commands7855
-Node: Readline Arguments9776
-Node: Searching10821
-Node: Readline Init File12973
-Node: Readline Init File Syntax14127
-Node: Conditional Init Constructs30832
-Node: Sample Init File33366
-Node: Bindable Readline Commands36485
-Node: Commands For Moving37543
-Node: Commands For History38405
-Node: Commands For Text42560
-Node: Commands For Killing45543
-Node: Numeric Arguments47686
-Node: Commands For Completion48826
-Node: Keyboard Macros50796
-Node: Miscellaneous Commands51485
-Node: Readline vi Mode55342
-Node: Programming with GNU Readline57159
-Node: Basic Behavior58145
-Node: Custom Functions61562
-Node: Readline Typedefs63046
-Node: Function Writing64686
-Node: Readline Variables65993
-Node: Readline Convenience Functions78671
-Node: Function Naming79743
-Node: Keymaps81005
-Node: Binding Keys82998
-Node: Associating Function Names and Bindings87545
-Node: Allowing Undoing89830
-Node: Redisplay92380
-Node: Modifying Text96281
-Node: Character Input97527
-Node: Terminal Management99425
-Node: Utility Functions100861
-Node: Miscellaneous Functions104189
-Node: Alternate Interface106778
-Node: A Readline Example109012
-Node: Alternate Interface Example110951
-Node: Readline Signal Handling113724
-Node: Custom Completers120246
-Node: How Completing Works120966
-Node: Completion Functions124280
-Node: Completion Variables127854
-Node: A Short Completion Example143502
-Node: GNU Free Documentation License156281
-Node: Concept Index181474
-Node: Function and Variable Index182995
+Node: Top861
+Node: Command Line Editing1586
+Node: Introduction and Notation2238
+Node: Readline Interaction3862
+Node: Readline Bare Essentials5054
+Node: Readline Movement Commands6838
+Node: Readline Killing Commands7799
+Node: Readline Arguments9718
+Node: Searching10763
+Node: Readline Init File12916
+Node: Readline Init File Syntax14070
+Node: Conditional Init Constructs33977
+Node: Sample Init File36503
+Node: Bindable Readline Commands39621
+Node: Commands For Moving40676
+Node: Commands For History41537
+Node: Commands For Text45796
+Node: Commands For Killing49239
+Node: Numeric Arguments51406
+Node: Commands For Completion52546
+Node: Keyboard Macros54515
+Node: Miscellaneous Commands55203
+Node: Readline vi Mode59054
+Node: Programming with GNU Readline60871
+Node: Basic Behavior61857
+Node: Custom Functions65261
+Node: Readline Typedefs66744
+Node: Function Writing68378
+Node: Readline Variables69692
+Node: Readline Convenience Functions82364
+Node: Function Naming83436
+Node: Keymaps84698
+Node: Binding Keys86691
+Node: Associating Function Names and Bindings91239
+Node: Allowing Undoing93524
+Node: Redisplay96074
+Node: Modifying Text100098
+Node: Character Input101345
+Node: Terminal Management103243
+Node: Utility Functions105066
+Node: Miscellaneous Functions108394
+Node: Alternate Interface110983
+Node: A Readline Example113725
+Node: Alternate Interface Example115664
+Node: Readline Signal Handling119196
+Node: Custom Completers127579
+Node: How Completing Works128299
+Node: Completion Functions131606
+Node: Completion Variables135180
+Node: A Short Completion Example150824
+Node: GNU Free Documentation License163603
+Node: Concept Index188777
+Node: Function and Variable Index190298
End Tag Table
diff --git a/doc/readline.pdf b/doc/readline.pdf
index 0667918dac72db7e75e131a7566ccf0655cb760c..01d26a6ef33c3c756ceb4c908f12b14bc1e8e39e 100644
GIT binary patch
literal 389589
zc-ox1W3cc{_wKoE-`lor+xEV-w$q
zy3z@Wys#(@11$>_$=uTL8WaOQJ-)4h1r#?o6rHrOjj59vJ_|b={{Pyb=tRw}oQxgt
z=|rvcos5Nz4Q-8#p?G-mtK1f>y(@9PeY
zm@~U6n`py<0J-08TXmDqrcB@y)M|BImn&}^?hXyPA|5XE#7)d8+8TSs
zGP5xy$X!HSU8v*~*@>}{n!YAktre1O1-m6FaOx=^+dA?lRPZmv&uaI5N|N8FccT6La?E_b;d$|P=
zZV7rs29I6O;~a8#-_of@<)Y$3cWPP(m;AK{RZre**)eTdPbIqyR-_e1FM^&;dFQia
z+OcQ%NtO(bP0tJ_I_X11oS#D6V6XB)BRf#mo(-0o(xQSDu+D_$Lg`3=maOkcV6=z;p3`4$
z_&R1z8igJYaMq2^{H(x85Yy%wN(b3pN$E}Pii(8CGeV-#0QRF`4g7dH!WQM(a=JC}
za}m(+jn&HpBzm6-mN~?;sR-PzSN+K-!{K}FQtBk0N<3|J$L|%aZPM?uf3r|cpcVig
z1Na3!>S}}8#>5QDoRS`1#2hbBLyg5{K9;oWca*Hq&^PWA5ks1(fnFEX9GD{fr=hfIy5<^GtdO61&@>KYjnvHMx?
zYgjOeWNo^ZtDWj;>zb+k?XLhU)7fdL6RMhBKWkH*J$sOB>JSUlA!!%85`A=OH^&
z-&j_z=ACF_=FS4H&Sp~$c4`Rdgs%n}P37ZE`C3Iuu_9w!H8eNt?)&N-^jEkTk#x4!
zf&&2PoCQLHE;(TPYxh99R$>s7D#LNwbhbB9gjV+ok?c*B;}
z4qi=Vw1v!B5t~>WqSejMAA{ky_V~|*o5~hJrK&X%)#H}x*L3Tb<8hDpBuB*H%68Mq
zuiRz|Q|y>o#qv7_CMMS*7&n0-gA0gjt}0-J1${AT99AjPJbJ27Z&K_RLO#HFr2RTH
zP;!KYk_CM_sC+oXE9zu|!tUbm8yXYemuRMWeSsPgoAK-Qnnt`<+
zA^051F4`1q1xCY;z5Ow2uv~0g6{btlf!>i&*!U!>sl-%&DqP+DEydrc>gv7Z;c5R*
zNSXcxQbv~l9#W-#n*(};?o+BRaAJ?VH8_Ma!lF38A$=*8f@K{c?m6*2VOjRO*XJpO
z2vtw~Rf(`X*tuaC7@BqcmOe@PVdY!HSz$LN&AUe2w
zjLXR&-MYS_x*dsTYwg~Hd8YDw;4yP
z<>fE9J@rT~@0!bvXpBz4{S1a(GEX=G$HUam2D543g&^2uF}>Xr*89#*By`xlBT=lp
zk0rmE29=A#3fM*oc|XbvhyeAm;?TSah9ArCP)U|OJFisnfNmQ^YR+GL*)Z{woH_I*
zCgP&eoHS4FZF>I*49Wr)L|nsVpI`ac=ZV^Z_iYxn0cH$F9fBNs9ikiu`*63Bv@DSz
zrf9dBFPM8M*a}dOL<++NQ!56+sT-t)y60rR+`smp1P>9i0-$@5jiT7Um;Idd?eEuENh(xzshQb
zzC813mGw0#JyE?#HAs)(d#f8iin@|E+5GOdy#^)(V!8}|
zpWh)3tr@yra?|^|;G`%l3^l&}?1R@1OnL@v0=gKsg&M+R`)6L|8#=PzA%}lgEwAWv
zHii4?=nlRiOWBcztH(ZBYpTgW(M}~JLFICHK23#9Vud
zHj_;EQ|aX|O@euHm-iyLmwr2Nb7*0e6p%N4J_5Xox1Sx
zc?Ab^XUY?T()2L7=w&v1#ZX=dj0PftM9m=F6q1qNOKF`5+(}f&BuvT7ZD<8|URrVc
zf*VOI$!oqF=-kvjjOiswCJ2cJzS&shEd$zA=cb&USvTS+{fP6zVzoNutND
z+$(RRkx{OIM;=sBPC*NJaM$PYmuHC6@Q3y0P|_8i;2ck?PDtiGVvA
zC!bhgge%Yfw9WRtS5V=LO&DiOWyj{U?IpMX6DW2KUR$%9&M(^WdOh)f%E`d|pL(*f
zF#gwidMiuGZP6q2+}4J9I1nRUt+|(%3PJ>iTx0s-aO7u5{%2byO
z9-r0*bu6na`X`^WP}odOsJckidFDKnBH*me!|+f%rseigph+7UIr0=n(r6>mGS>aU
zRf<3(spKw7sG^FeAJT4H0SRFzI8oVCQb3qK
zyq74M$eT(hoED7{&LjZ@iy&W(E;}U@yotum&xiaBV~eLd
z>Y!cFilubvv-DS5p~2P+Ts7cbM(~v|g*S&p{do!Gbwefb<>L^?i|BFGeL1~;IHw|^
zG1;|1a^Dp^DOA7k!)y%{7OT0Y?YnL_R3RhzYF(P9{R})nyPZ0BfEiTj%k?cC=|XnZ
zj7M<4+)3287M6rbezw3-gSi3`oz$U4*zboWA1&QZlnV?#4S1q);`(AX(EcX6G0;9L
zQnLZxsG&5ib3aU>18hIP(0v|s{K!bx)e$(_yYTYObHExOzV4YwMOH%&g2{Q~7xyMu
zIYumu=MKX5_W&`&9k<&NtM#o(>kDufrc&}>9*6%@5HhmTv;4RDbDgE_xY>pha{EZ-
zM4^pN(j%Vd>O#8S(mC$LD$A8EOV@^E?MSJBD=B;6tBWv%W(>fqzUjQOautkxOuYkf
zOSHFl7w4v0_IoFd+8CiooSsI*W()Og?#qF-`}MJiWpyB{yeEO+?(%aYcgvBx4>T@#
zu>L+AW$15o9KxkL{ljC6_RI0Rndy3JgDndoZx_~8_&1qJiy(jl3wgP>92rJ`LbUlY
z*y!=2)wz*9A0^k8Ze+D}(?;OlYd4CnbAOi^ZWzIs1S3RoHwICeo-rl}jSM|;-*?;U
z!iFX0QED?iez$tVds90Gct0SBNM9nZPdd6x?4uF0ylN!X;h_}V=dCOdmJVE&fdx-m
zMv-GGlK8dFxKJ*@?ldhoYfxa?2v716$bKY$f%GHh30Y2yJ{T!8IjArJ%YYs;i#EdG
zXVpev$ZOXYjqJkNxpAu%D)W!zxmPcaZuD=G%s1V+a7j@Z{TJ7@uai=)#6Fyq74y>6
zw>LF|VHtcZx(B;i0!dj_M3>kCLlEQvXfq7r;9RXtw+5DY8HwaKcB3z5Hd_l}7BAu>vrM|Bs8U;Q6g5K@R)048TTFc^6k08+YhKSUBj5ddkgxaSe06(Xy@rg~s-nX{
zDPkTRYROS^Uw6aQP$EPvRWzPkc@HbQ7#v&T=mcQIr7fc&Y?dlvl-D)8
z!0FPGn^a&@H5-QZwHHIl0~h3Pd&^igHB!TOsm@K?&rNh~;o{@3P$?C~kr*Xl=M|CD
zDp(V)8yaz?%*@3`aO@hNY0BxkmxUp~((TxpZrfFhT(g4901vr!%Qe!RT6sfsh8%(R
z$9;}FL4?0a+-X&!bX4c6sEYU|&|wkXLlR^~a{aBWkz=Ks_K6j}!?E0ywluoCh+M%@
z=@#US|L7rori+d7&t;@k=W!I2!bW~kJeOVDE<)uto6DCJEJ6{R*Dv4GjPWx`C<6&S
zN5+?P=#=w!$JbgrhB4v1kOPL&*f5-!$g`IE9hebSCBXp_C5#IbLi(=ta?d9o*;*n6
zo@p9E5vdMa-XHx)M(RR-Mxgr`4JEW<<3Ja1M#n7HE<-^d(kUs_o(7zjoyqMVMPpE|
zR4H^N%IGS!=LrH4@J!Y6yk2fGvEgdQN$_bkCq$L!s<_SW5GU_;7*kIGPd)@^Uffvi
zoLUzZNR>-Fk}<^_6!a!J`F;OLNdM>Yps&w~gUpmhOwvp
zrTB+iqxpvmB+W83iwnWendv4nkjY6N#6QCV%Eu`RBLrAnhA?8m0TNjwDn=lO1?pw?
z>^+x@#W)STYz2!S3n^5~xR!~4>VL!YPL@zm@Y5K_MiHq=zOtK(k2o{-&Z{XQtTZpr
z6D(sg;}LMflvMWRA88EFyfcNiYRi`7et1&JigF_SBObFyd0YJ|Jw;Ia1l$HMD%adh?&3*4}3ItNBXDF)9o
zz1`5CvlFHG6YkZWUNjeEzn=6hP+&A%zns=BujM*`Z%Ov+%RZc*6$NQm+C%mBis7KD
zy&|-xkFHu0m#Ej1BCc%cUjE|@s$8Xy9ZVa{%gqKSO%I{_FZ9wfm4NDEe(8hOIVzs+
zMc4XuYv$gR!{WIoy-PWjLj&^Y*E1w7fTnL=-aq1+{aJKJW=^XCqp37^)FfP@DuHVf
zCK^AQ>aw6c=tGP^=h?};-yV--0Tfq4$jLXquxjdoU&1k)u;k33bgrQQ&bS(Qp4G3v
z2*nyeb@SmcnQAVdWYLvz>=&f(%p3kp2(b$3{^%jTtWCEhXXfPwpC0OCXQtPNl~G;1
zaV{zfGxRKyds6rjO8xzGIl~dZa=Fmb!TprW0bw~rKxV;9Ob)
z^h;?8i!(dKvk7)-{dBTkq`@*9A*tH{&~@s`B^;8bPC~%TAtH8)6qVxT*On1iUA)$F
zYIENCbMTNK`#hp8SLTm}S}yNQjqeLDYVwkg{!a`<^NS&)^g1vLt4apL=#`Ul2oG+)
z{<2Me6NvM%wPt>B#>9CE(7^tp1&ySKA{`Yt0)U#3z5#|?csT^b3Mt;maN|#t36^#3yg$dCWIfA(
zX2Nr{sAP*iU%|}%E=XYzI;CA!QoBEGQ^VIU&IZg&7H}Jx7;joI0|hVR`kTJ$qzV->
zA?QYR?Od_=tnoVOwg({LnV<<$66L%a=rimvcz|lq4FvyhLpt@+U
zTs{b0%Pm&Sg;Tw;{oJua(udAfz^_6OtHzNdNg$HL03(?LKO2vx$X{6MkXJ)WS9v~m
z2sBTx*>cT^Hx*biz}jO4Y?t3N1pn0*jE6jntUH2AuFK0ks&>W_?ScvH%%ZCi7CdrxhxY-gebX^JJNT7q|z`X%!itF(1
zx0-IJhQ6;(aNy5-(nOCPpU5AU4Qg^+4>=v!VAYGG@4&YHLf)XbkHl%f6x<0KK!0GN
z2mJ2{W>G5(oUpy9Q;b_0t|P0MxEPKp?%z^IAXy65EIl2hn_GfExN4eb(F}
z(vav-S_sUvYJ~F5k9o~HK(YNur&>csF4y^qkPoVWVYlhTViGHwq!!c@8s1v6GIIds
zA+Svr(0Y<#?++HRC#0xe?-#1G`?|Y=-dDQZc(8QX#h8z2=&bxwsRpH5Xc}xQyK>RM
z#PB44@Vvbyqb6O*S*y1~Wm!Ps}i+R1lP&`qRI>DwRwdE%ujghIYknGzz^#8u%LtINDiR-qo*#p4S4Gs
z1kk&h79CE5LBXKVp$+3SCDEG!5EAnG{z7t+`_qU&x@Bfkp$^|?PI!$xZaV9b&aD~S
z+yfqW8swz1#UKTkucq58#9ksK4z?a+D*VlPDa3X+EX{E_;<5EcZ^HFQhVLrox7&hl
zYB@kO9c%r^tcp~fOQ_5|PS2QpG-w^Uc8?Rjx!#n{n!oV$1K>@G#IUEx=!~8esQiNn
zuOM8&in&^qDJ@~YNLi~=tQ(eSUycR13D53U{A@r%GW2E}W9-%q?+C&$DXI6$?=dE2
zwUn5dxn_H9(>690?_Z7FSGpTgy_J8<(*IAAD!bbm7%xy^Nm{|CL4We&1N4IW
zAPk`-OD7p+ATASW68k8Mi19gM)S8%0WyqL$6viV!0VsEvVMXl$c_{r9y~w^Aka(D4
zBw^&le4tciZ0UoHeK04`;H(Z|PzUq~lx#oAe0F(~aD7q`1#&VOWc&eyV4MI76qhi5
zx%Fod2nN&G?p82xm}6LMtaDGK>I!8*bI418#s3Oycr=#HbZBg&Of
zDW~SPEPN2%Q|yfjkW`k5C?FHmHJRuZa%|bNa*U$CQn1$b^%
zY!&&i&9|nUh>%~D$U>M1X;p+nVIPPwDC3HNl9dp@>|ca|I>}5p%w$#&-AZvw01hQI
z3N!I^#I4G9eAPWU6>8l6{0bR&H+krR0D2{<6;w4@DuYP=!scO812sz}7}1nD19~-P
zhwOMT=Dj9V?BF_sB1qV_L_fILRtP#X=0s?M70t1Meh7~}ezG7e6BPW?60iVhf1yUx
zS(8ULU0#~)uh-#W2Ug$q?W@$x@8Zcdm0Hus)yc{0e
z+-bo+-X{V9COH
zJAG2B=6lt-+gruzJAFde()oBigN?V-I?ORxP=f3&7-mwF6JMJMLMP86^&|k|Fx&aY
z?)-??V%uW#Gw~hRW9fenGGT-q-)$!b>G2XDJ0UtRb+&GBC;l*6lnCY9B2+RTd}T>3
zR!p@%s^`S+({(|wofReg5V8@qT{9MKi*wR;cxfEha#
zdRM#rrbwZ~4EJ~({?^b}V&p~1E5b>OHv>4ILnjuC^wQ?_R$^98QhZ@Plxmk%dqczwFVp!%a{kBppm@IE_ltq)rG@A%U;on4tnQ$alrI(Ky2SZYTQ=abz35%67ZdBVuLCWl?uBO?c#oxFf2$@ddG=mjXFv
zd~x{Rs8YE>8r4brKp|w5dgKgN7w__w6nN?IVu}PaFa5e1IMkICxq&E2y`NY=3MxdtDkM-aDFv)lzh;|q9Zw3Q}z4P{GIeWruZy$;i1){d&}pmZ7u7U
ztOy`7_4;%6aoMN2{cNe*_6u%BF7w;Q)5p0**P2bHF86iQrPoXw%uUm**Bkle^7z1O
z8ye7{T{CN2F9voe@&U+HQq0{wywSM%ukH>gR$M#UQtdiPx=qDtQVf|hIKmL-B>q#wmKD78qU_t;SW2^4!Tz^kf-D47-qy##zB|LXnnQhLi+XkM
z4h^~&Z?A55{3tMdjSH+{-*^4`_O=n5fLMX6*K~hetB%u@n;lwKU)YUbESDu4XV$t$
zSw5OsRbQWTd$42NLi7#pA$(I(b9XX6WS>gBvhZ|6nYVHE9gc+e^(+Rl0rty;Jj(1;
z^L00!N{$%do>*Sq{+TFaW)8o9yKzzL1-tlo?d^i4Wdy8z-@+26ldz_
z46O*YJz!tcvBcs=9?idUGgN!otoiWjo>!NLn!A&KIB=X-)6^pE@1YJ+I>q1khL9L7
zweaX#QBPaP9?Ltt&0NHc=Y%9G#+hs3!G^~v=1Si%gwm_3o5h<#EWtzyP0o+m2xuYlk25|OPS5}9?|z=
zt=%eq_~)Wpuz8yaZ?u5wrt{!!u6E3u;H3lyiU6jE`?**=SUhOAhC6_C0?e7?ZiNU}
zgZH%$lg<+fK7v#ZDUTJlP+X>bdVlj_R$!^Lbc@97SI5(qEw*w)DPLg)Fy0$*qJ}zd
zjT;(j{r#!MxZ2se`+XGtApsfIc6JJW+~9+ec?Bk_nX1LA=I$n}B2Zgin}R$CcOqoJ
znO4qk;O*2DrRs-T3}l%;>BG%o)d-3Weo+D}?-R2806FVO8}NR^L}JRf
z;&za}PdOBE1XaE7vM{oR>8n40Ug0Fxi}c~w(A@qsn%39|8pGv$D9$ui@@^m+W3rWi
z%Afp`F|D5#YK-{CbYFglphpo~A(YEZr?;_jh6uEw%xn1y`Oic1YEdJk`VR#Lap6nA
z^@3TNeFe0y=nDd>F*{kXz&^K=C0E$J?sKVuURw`zlf9ltrGh<_=-KEvR_uk72Yyf3
ziN-bNpppq!oog7^7&Cx7;vEvm!5HMOCgDSMA$i*>ukgrp@Av$)-&61++pS#>;YfHb
z){mM+37%zQE?rCzYvh156ym4EfL=zBdlQM_@Ybyk4Y6)--|y~G7*0#LK_#f@7h$_*
zGiL$;`oZKAHz9+*z6X8d?S*kg@@+5<>|Llc6C=2sRe
zn3c5DR02n!9?c7dDEqXYbeF+95&$93{FjG+t!6}0Me^_UZ(j~I0Vhxsn9^|!3ne>z
z{{E?-Ag6)A&nT26AtEHnDoZDoV)l2hPDoCliy^Bq5%-(J1u~Se3fzof2{mn#)Q2`t
zaHV|rw$hj&M-nsuWdRCGH}?Y@eu#hHni*h!ReuNA*x}P9KZu5EWEj>Z#}&|`vriAT
z&!}3X{@fTb(FfW-ayJi+e>E^SEeCyW-VP?j&X_QY>LKSAo><1Ifm+|cu+a$T`@u(u
z_M@e;FPMpMFMF`FR5;#GNqdS=Wo?IaY$O*&ok)k)tI2}C5(2MgWWhuq-{jYX%zWGv
z#Q|D-w+Wp`%A~6M0)eTf<46RVq)u*wOZKilEk>G4fpR1wx=pyY`~IyHNWG~;Hu-Ti*!%e!Cl
z`a0eG1y{nex$TL^ygF^5*A234dS2GxYl{EVY!2%iSm%w$b>+k
z6H`GT6y$dS-F8S@dkVHs4&0IMQ!6o&DylkLkW+2|ASRvPgc>Pl^!Wx*kUZg*kNh2i
zIcIiLTbA|d-Mw3>Z=-WhrgmRs7YXD?6sm@D)7hIAuqEB2>Y|D7@DWnzt}0g*EGSmJ
zNNbTuH7b`nxbDb1dnd1!uh+p5_>k3g;HqjqgkDyVZp^DqMjQz`|Et-(?bYrU6zEZwlALybpWouK0&1Yfe?3&Rm)m?~c_>RAg)nch
zRqnp^4w!A`#FW_vXcoRvwsB(FD1+hk+ki)|h;arci^GOF;(#BZ%a6(B5Pj#^w{d~_5E#R;OduTG*JBOjHDZs^z9N2~8
zsLgCzBMXLpm?4I#UR?FZaI0^^jWbGmeqm4kxw}qbmHR|tBKlgI9@6gV{j}yR=Y78i
za}fwXBW$z|Aj;`gd@P5}h=1pCu}AxsHL`>==R(lr1i{Cs0e?|Pn!2a%z
z7r0hSxF!QDhXC28gJ!KXVz~gw@7Lktm^kS+muYM!_ryBSd5t2`Vse{Q5HL|Q+$2Zg
z#F3jV;ax0AV0+T6KTVXEkWDMRY#6*3qUWD^w~Zh0R$@TmWY0m7rJ2h7t~SU0c(ofK
zsufA$2E}pEdnc+%i0b)}gJDx?wU#QrmN4r=&%VkXRm8IoN1cV6*;wKQVA6WiIm@fu
zp^i|-5+8l_7+=?s!yof{(&ld#A(+ANQ5A-6^jiH8OG-%k^fczZ)`1xpA_y-s&dUmd
zzenA4jtK#m&!CX7mi@2w`$wpU1C!W-S}4&6SB-f~hsI1gdzA7IjYwg}O9?0BPvH0x
zj%Xu1*5nm1>Z6Vy1Ztc;XK)rAw2dS!*S#by6q=(=g3|?Y_6K=li4|yh`;-}+`yN;1
zVQ+zT**$Z+P({b^Inv=C8n~nwt_FaNwmW=#*@+7e3)PX7(Ctm_jQ&FTzAgPBnLF#F
zHFH=+`gS-8KSl{e1r%920yAt>2i7dR^f#zQ*>?7>JCc{sh`5>;k4~Y!XjMcvNa!4Tf?;u@`>&a3+_rOue1p6;Z>H1kxxV4!uJwr0DG8
zdCdNdjj@wFHVG-Jb}y2AzqJJU2q?%Qiil-KB?|JP;_*%BRne+>&%-@4)Jwu7)=yko
zib5x1VQ#_wq5eb-L+Z|Bl0-PV1pA+~V+&7=0+WSy{ZGvMVH-d2$V99@*#;adbH@xfV&nv&7ky~Y>q*sC8aSq@
zMyQUUsHTq{*+ofQ6UO+|(6p@vseFc6B~ILhGXZ~8T#$_}P!hbPr?<`9ag%Vd097716V)xD+*=FgyPILkzs
z`Yp>oxhTWyKjSPT>kYCz!cF^gzNrFD0d2=NhbPCE;d@F2^+Y=CafNJ6M9*(@Wt|wI
zqw=ez9^GyTe|^YTH;}SmKVAek5=^de&FsruIz8s2kqt8)8oLTZyv+*$u|&C_P$$IT
z>MiAG7Khgs-VW9E)OUhl_ILZ+a1v(%0k%SkP^JICDP0d&0y6T)O7Zed200L%5I+
zn?;evU;uu}Aa!qWG<;JaVp`Tlr*
z6df9aiVM?M_pZW0U2cohNh6{cCfT2+Z{0dh=twN&smM*T`zL(J}pI(dr
z>-{>9-gC!FYvag#A3V&w-4UCY1o1&NGI(y|Gks30{W<2reky00_8=;L8p2z_Dki+m
z=f!nS{&Rm?z{u>8il(i=Q_YqirL-S>>C5+XJl#2}|49yGoAk%Dht@2MQde9gz~o5XV%2|MCvqfK={gAE~&w+lPa;bV?W+pQ;FcUX3jX06C~Rz=t)GFYC6`fpXlc#7Lx^p1ZhjZIIzmjVC>`;p1-CMZC%_lVl|5!)ET@T!p>
zNtgHQV*-r+UMZooqF*v&IvN~z
zJM(9_QkM6|vy5hM%}@W&yX8f%%2>~YjFLbV&fkLOyO8rjc`4bu){;F0`y2SLM1MXJ
zSURC=NR1c6<%|+fZAKHH{2>A}r&q4zx7^Kd(+TSfKKM+!rr*Jm-ud7konyBecKv;Q
zc?)SN_JSxN7q@~}91@Q)1H__l-x{U6+#J63Dxg3gJ&1I9x8o>|VH}OqU
z_X=%X&zO9U9L@~ioX@o&v%q#unDKK%1W?;)$Om#^pX5ZxAgF@u96EBTZMLVDN~$V2
zIq$;Gf|{FnOwIn(1J-Eo^lj8Og(L7lj9hC>k9?X|V$ANQl0ttK0B%P#c6|^7zYI6-
z*SSU#>T4*<&^wg^(vp+BSw*OiDRoeYqgvr2Nw^_PG59~a0TF?&P1+tI3S6<&q(=&ZZfSd{u@NaLeKBbp`}U8bmz+6czl5Q`XZ5;PL|45A}f%zzE%;
zyM$$rnBm|cftt)kmjBty6
z5T$tIC@AQ&@FWPgbASRDMuwK9&J+jR@ytBMEa=VC48R|-G=nXIT>;H%p_FcBI-|6|
zz?nzxFc=Dpw0yzojB>W!h4Uzo%d@kfN9n%cZZ!oX9TumgSD?u$>rtehdkw4=Y;9kq
zyYqij8y_?IwO-po4^+2eS`svXV$ubdxR}wSmOWbZJ9A4VSO&7n
zd5lr^TV6IZtR9STZsgiZA4oi-0~3xY2UMhoc)(zNv>Uwvc!g0~-{cR?gVjO-4z5fo
z_{#Wn6&h68VszvL1q3whergw3uMg!!0{0h^y|J!D$VjQ8$K2X%S%=3P3e=-y-ts5ay=nL{5OD)z<2dqhVa3Z?;;=fH>+)aJ(^
zP-LS(U05tq?zXJ@#oXs1+lu1RUVcLU@!NU+?af)_^acByQvmPA*1TZH3@~Ls2r-KZ
z+Y$TMgYGtWe(qr_kMn1om!a;^xH3&{PCv^HDT}a2E;T(U$rfxiumy!unbMhxVb4Qd
zFuBvY68&F3`>u&OZ89iIIAHnW)Rd}CPST|4ao9Km5zE`KwRP?%&<9ypzN?AOC^y{J
zIqBmZ|JMsFrrl8*B9P-4*OaiZ#HXC8FG-Uw@a>pYSf_TT6+y`6H$(iQVZ6`JcB#MG#J_{tdi2vO%fXkiFgW*+%cW&_PFB@OI6o~l#xnQwspV=ee@Yd4+;DnWdFBcc$qpVdpmkudwx~R{ldG6q
z%e#oc>K;V_#>#EVhZ-0_9g(Jap6$qQV}M<#oU5*|b{W;WS7YXMVG)_(1=fXB*Eb^r
z$PV)|)jFDc_2n^QML3Xr_x6bEIrZh6SSNkaQM|AIm@}(WT+;QzDj&ig7$Vcb(Q<}f
zROj7|A5e}pzteArg6IHtjOVvUF@=pxzvGgm1KYOe0JPMWm6%>=`5$k71(;}rF3gp7
zkb*YL!7yTT3|6{<^w%uZV;ORBk
zB?L~URK!dASeYzdeZj$<+z%xQ6`HZ@;b_<>
zzAJTc?qE_+S#odQ%-t;lxyEzletU~$le{zFj{=_R-R^yV2`yMFXD(mVxW2&~D7=C1
z{1v{9d137Mp`B@o0SEh8Xo?ZLg`Zw)igm4@nUEA&-}b%r^?Cg9
zA=EYdmgGfz1Qk`u7_{i2s^nHspV|63^Vl!OxMPbQDFl$6rhh2&+$-kUHPAZ~B1`=$
z;i^S_
zUG3>rLYz`w+Bv60Quc$-*@YhKjOYL~+HG#=)zsc`H-7H~H!$CR0S&k9(5XoKgumZ+
zMq5&$Y3-kPJEGcKW0Jj_shuRW4+lO{R9o%}aIn(>fOv~Itl{$lUc?k*G&4FiMT)>e
zgte17(&MV0gK>dt8l-OXo9q`cNG7S+`{br;b6LndCDA{9d#;(VpLiRCnCol--(-`G
zTJWICmc_bKSGED~U4jMbfRk-|iz>=#SxPo`E>Jmnz9aBiQ%q(IuSgQxSn-5gt-bWB
z{^;%fJ#JpnmM+nH!$S2R2kQfb^=$ecQ$l@kSgdjd0r8k^NO+F96Lqn<|^HF{p$*h>}vhUf_R
zjLX~dU(IO^D8BazIX6eM0v}g!m9}Y)VX{>{ZE0#
z!&(^YIXHYnAUrIhE&4htO8<46|4yTl4qX)_+k9P;cqC#l;pLKG8pZh%md`xg^zy>l
zrjqtTx|f{<M<{{{{
zX>&rLO`^_Go-G3(Tg)C(IO`I-`HO)2H!oYy-Dw8RzS!x>w#f-!bR21QW~OCui2D1c
z6B_ICA<2;~ia|=yJo!kJrn}bFQ{n8KVkGDaj?P4CW(&!=*1xGWi&%U^jt+xmi-{lnZ;)RGgVPG-!2-M;nPVYr*Pp)XPfAl~G^Z`eMwm{jz}J>zfz^aQz1#f9
zrSW=wVMLyzQy}gqSdh3)>TdW;1$I3ldgF|w;(Ih7(MwJlN)>lv(q>+WF%x|VcMslBK^R8G`jLQ1
z@Z@W&!-;Q>^624wtIkgKgMCB|I_%B1FHwe`!~-iF^kG_Y0wJVSpu!LAtT2&RFeb5gnW
z(OCnw$Fz`m#j7;Rs%nt5Wl$NJW3NlXk06N)#)WZDn9`SzkIlww(EAD*u#Uc}eOYq4>gS0q4B5Hq+gX#%k{zsmdeaj)0B1S(<(q<9gM17K?IoLn&c1Uib#
zoQ|4XE@xkaYr?VQxj<|;Kvmor6b>4b-T-{e@R1IvKn{Z_-Y>8`vdz^c@W$3Wc?ZAEXHye}pe2%%a7Ij_&?N*R#~`{4
z%YyI@p#`yB;5Az{xXXL?<75C625?EEPVU*08xUqF7$PK?Ms5x4j|b=p1i%!|g|L|(
zm}aM~2E3@6Lna=J82?TsNmLAn+=OeEso`l~dUzf{MxtNeh656ZEQLa0(+GkB2`XWw
zbW;CLeS}Cf4q$|D1Ya2GpG)W4CT)kF#778hl`58(;h^U}t|o@QRnt<+Vdk0`OX7ye
ztJe@c4dg7kp?u3G?LbMEWdj>J%K2+U_{?N=*8&xX2^8)w5N<0Mhs5P(Qn(Lgx^pmi
zLgEo_St_0Na
zXseZz6OK?aO!xemTilSVW~^!Tr_VZa-B(NOi77TNIAhN!z$HdIPpNvO+a
z^F0+DtFhvW$-TjvKgpSJrZl7LxFugTTp+ZCul*cRdENqV4j=2%tFn)*dm=(ndqsWs
z8q>`Dgo(1~CXARXg4T;q3*yG5W`_rXBexN{=R9U#PbzRWid>J(I+jkjamrCsJ4j`K
z6eEz*0m}_|^&@MtH|HH<1$O4X!vUe`Uj?&L3wpEmS2>smnreVw_RjN-zF8L-oXRQF
z{QkAZn#n6teL|}<^xOUyNVe}DTleC21wLFfaja=hz?P_J11m`L6lBq|kZyAY)3hS63{U3-n^
z)3x#W0T_a4PF-F{BciDJx-LYqB)o>^;aL0Kpu;@%Fp;d>ut(wc(?z@mR>}J0(n_A~
zUB6E@i)l^?CC@UPni(Yc$L4xBe7#-^8$owa%H8&=R4R&eUvx{t>UE@&b0Awa+n+UP
zB1iOh1Qulh)h5{zrXzT{`dVm8JIP3Y+~a6@y+JbED2F)D{6DbCrn*Fqaou2cm=t$J
zgn#=fR9O~v)|6KVGYgAf+1HAkHt!YgFF%&`RqYq-;DkZwWIv=&dYSem5eQ`vLd+#u
zG+CCdGK-?fNZu`p_}*rTx7T5@bQ`tbFgz)%U6n-sFUtNQKohNL+D6N^ZQHhO+qP}9
z%Qo(Em+k7ZZQHi~=Zwx|58iLSMmfnVS42i4wNm-X1V!$o8XM8s3*fmVi`P}CiS3nQ
zy}yLSw|V#ovqBX4O84Xaat0Z!e;l77W-$XB1`>anQg+N3T#<#E7$&?92x~Z)F=q63
z329-E^G$^G#WncO_sQG!KDxKC;pFa8Xofv-ez>e3E-vH@8CDX6*2K<1_9>>vtEq9p
zOu+-HKd82vESxzwz8sVLfSi!-N&W-S+5U5}j+N{G4CvVF37cd0+lI_SAYmX9Z0nGT
z{!Ne`2SjUNFLohDO+s8MvLxvw=*iini0>~;%k(OuzVQ6@on4)soi{dRoX}qjIV>IH
zEeW!!TXqSKDB0JqoN#_WhdF9@D?#n~M!kK3k1r)HoYp8A(pfuOx85J~&I0^17pnhT&6;2>u
z3z}>>6C@FZSQ0y3X~iUob?#4_s$1csfh2JmvGMqpzuwQ6A^J>p2m$3Cw_*^4yf&U@6Be@JuiZlH8SF_1i0Jx8mbMfv0O
z8Jlsi3W4NtdJeNp+d$$4lcn+SwWr#JGRc^ii~0t{8P3rCsyI-OcOE7hOqveO2Nso8
z;Yk(Q*|+|tJ>%!>g_S07oc8uHN%3k~)nnj21^b&Aw()sfl{4SxWWVvZdaj}0S)
zNMDMG^N;OCNkZiX?0H*&0PSNIc5Xijo2U<^sOFU4uPvV2!dkprQ~pERhaTQ(fVQx)
z3E^RGXz6Gh=yLBft8j{JRw9sItMTFFHbEhBx~U{U+}55_zNDLh;n%c42a!nb|NbL7
z$G9mWn;r@4*H`tIgLEA7wDrbN+J=D(ixEZb6g3gxQpAk&1O+2`zhzQ51^@v5q6-_}
zpqHhR!-c)@)kKC%xe{!741kbb{I0cJYECp)=Hneh-D(9$~z&aXG%U}u;YpkqdIYAXn^1bw4ZB;F{W;l)EcQ^?@K
zR=3|qwWn!9$wA%5z0>?6g-9}J@jw|(9U!f1&8uTqy|HqkAuVB(
z5oNwP)o=`TR{ARqbB|vlx_5!|!%)k_%ZuuS6j@mlCp&J}@oY+E+r-gpf_-D;SxqI5LN78h1JglZXk`J2Bi|N$89M%7i
zQF#(+vDByE(Y3SoWcgS8R}E<5Cr5hg2tsV9WjOWGoRc8$13vB@1-AoxKV!U*QN$A7
zjnu{UPF%YR^=ee>6snUTSp}@h3Eq4i27Da9F?8g*N5Q7RXH+XTV9{OPe|JW9>)~N>
zrk2CKsTQBYlxN9lATwX+9C#6iKv|bPLQe88h5PGH+3$+#uRxh_6P1bDTo_2?JlZtP
z@%7pSB5WKZV2DRp;;+`7vMDA_|Heu1!^
z@-;bT?2v6DxQ45Q73DA7hlS=cGCab2_4os8L&grLINx8_phS@Bp*Mj*^kvukU5tSW
z@YUCV_|!l%`GWsQ6{hk!&P71CSo2tOS7-!f1~-%)m0I|_n^-PK%Zo)rHJ}ia92d5}
z$}j&+JgVs%Xz7jhJ@^3`AT&V%5Ao-VTo?A2-m8SbcAs
zh=p6BF#Qm*_0Y}#@h9(?BIHcAKV$68;Y>SfXdp)X{_*u5lCcWiPxEaiiG^=Jmn$sP
zdvUr_iDTE?kcey=-`jfjO;w@b@P^qo2X-HHEdnfpGomjrBTmG(3taO|{?{?xh|t>04OL
zst`MqS0^#($3{k}Ihwe%2_bpog1-8hHX-;OSP>DXLnvF|%1FMs)tZ=&3b+?T#+Hey
zrYsL!;9bv(g{CP+=5m>@uk~c)8zAl%5)*8*9lK8e48xM?tt|Bnu(=ak;M_aeo&gz`
z*+@`sAEo+GAwv>?7KIlwr{TfS9x9a;3FrRPvSWk{Kuk$@rIyh`uilGV3!&rx*k9bb
z1dBAA-+jMY=re;6MB4@?{U-s7Ah*n3hsgMlen;0q6RDS$+Vs$kQG$JOSm`WC2Z2K6
zM@>uCD+#ZeDTqTIUf4HiT90H$M^H&&*#3$m$46Oy2Q=;b3#J{p;4XoP_{V1eD4*6$
zxtx1EW6sY>qX@VqM#lBWpw^?afzsG0{mt_
zQH~|^Gv$(emgxSa&%j>=NzBhrgkX?SDV6O$4{cab?-t
zGk=NREA!?<#P=pG$LE^pTK!ID8`Dr6*{%q(mdnZBL&2MFxPl|5>|Qm;0=;-09rKs%$3Jye|m*Eh)E1XGC7S&({`_l
zoLAo`c>cv`U&Q!dKLma^SuOk*p0fX!-p$JPf7iRU6E`JL0$%?jH6oS={h1W-y51a-
z3IT(F;{tghhHk`bWG9;vC9Z6s>_c!{JdV4vebotqse{mCVD~k>ojD6`N3tRKt${0w2#1YAoI4NRjbBntduzm7;mPGRXx*2ipB1c?S;00rjvY1ikqfhZT5hNPuVrcL~7#$vfXnf(!KH4
z)G87}=(5;h0(zYzkb)zUVmX}Kv~$*|>F*MK=QhPFX>@&{U0jrD7+m~{>iJZdjh&&n
zO4X56Cn-ZPq(FSeVe5f!sGY*cDOFW0kNU%K>_i;&u#bKuNn_-Vw*hXT{8TFos~@j&6`$eh-^|G&Dg)
zffJC6Jv4s0VnNJM$k=#hm>!|x{5gZ!byC{idz9v
z!VQZL7V#jd!`@h*#vL0Lh>($NDz;ot4Dd;b648=4$sV)FqA3X~8F__isOs}iq>R#S
z8FQTX7Y=Nog|H#oFc5-j7PS1%X2h@qeSPy};Jr0U{c
z6XBOh(3p212aN=Z@zbn{q>q+KqO$%Y(qLNYw3b%EoQ4!e7r?<4eM)}?7gilY;Avas
z8oeR*)4aaN&XE8Zd??ddf5N7716OBn(_eg2end51Jv-5@IK@>2uzsfsP#8a
zRbcy%uQ>%4A2vDyONyo+1dME@!%LQvcJ&^yt!6(mOgLuE;2cgh(_Xy|r&egHpClxW
zv_`KfJBvz(nJh_`uoB%RhzmpF2ANe3)Y=HV?#Wo_+#NJlb`ilsUGq9?W+cMNKFA4f
zfM{Wc^cfzPUI;q
z*(dk2%RW-uQtLmZvqHNeXeoh~H53kTFwe;grj;}`x!12Ev`Qb4g>hWAPN^J
z;Z^{2Aa05ZgS`%+g&*)7*=HV=t-gu2PSk*cWH}PAR
ze(kw?23=qdIZ*T&t