From 8e6ccd0373d77b86ed37a9a7d232ccfea3d6670c Mon Sep 17 00:00:00 2001
From: Chet Ramey
Date: Mon, 7 Jan 2019 09:30:21 -0500
Subject: [PATCH] readline-8.0 distribution sources and documentation
---
CHANGELOG | 47 +
CHANGES | 142 +
INSTALL | 2 +-
MANIFEST | 1 +
Makefile.in | 33 +-
NEWS | 73 +
README | 2 +-
aclocal.m4 | 107 +-
bind.c | 683 +++--
callback.c | 22 +-
colors.c | 23 +-
compat.c | 29 +-
complete.c | 187 +-
config.h.in | 3 +
configure | 309 +-
configure.ac | 26 +-
display.c | 669 +++--
doc/history.0 | 30 +-
doc/history.3 | 21 +-
doc/history.dvi | Bin 69092 -> 71552 bytes
doc/history.html | 58 +-
doc/history.info | 117 +-
doc/history.pdf | Bin 201610 -> 203702 bytes
doc/history.ps | 2608 ++++++++--------
doc/history_3.ps | 458 +--
doc/hstech.texi | 36 +-
doc/hsuser.texi | 42 +-
doc/readline.0 | 252 +-
doc/readline.3 | 92 +-
doc/readline.dvi | Bin 310188 -> 318576 bytes
doc/readline.html | 1572 +++++-----
doc/readline.info | 410 ++-
doc/readline.pdf | Bin 389589 -> 395448 bytes
doc/readline.ps | 6016 +++++++++++++++++++------------------
doc/readline_3.ps | 1560 +++++-----
doc/rltech.texi | 54 +
doc/rluser.texi | 143 +-
doc/rluserman.dvi | Bin 109432 -> 112756 bytes
doc/rluserman.html | 400 +--
doc/rluserman.info | 184 +-
doc/rluserman.pdf | Bin 226783 -> 230085 bytes
doc/rluserman.ps | 2121 ++++++-------
doc/version.texi | 12 +-
emacs_keymap.c | 2 +-
examples/Makefile.in | 29 +-
examples/hist_erasedups.c | 2 +
examples/hist_purgecmd.c | 2 +
examples/histexamp.c | 3 +
examples/rlcat.c | 2 +-
examples/rlevent.c | 7 +
examples/rlkeymaps.c | 61 +
examples/rltest.c | 1 +
funmap.c | 12 +-
histexpand.c | 165 +-
histfile.c | 64 +-
histlib.h | 14 +-
history.c | 138 +-
history.h | 10 +-
histsearch.c | 125 +-
input.c | 87 +-
isearch.c | 97 +-
keymaps.c | 30 +-
keymaps.h | 3 +
kill.c | 126 +-
macro.c | 67 +-
mbutil.c | 156 +-
misc.c | 83 +-
nls.c | 55 +-
parens.c | 15 +-
parse-colors.c | 6 +-
patchlevel | 2 +-
readline.c | 119 +-
readline.h | 14 +-
readline.pc.in | 2 +-
rlconf.h | 2 +-
rlmbutil.h | 10 +
rlprivate.h | 11 +-
rltty.c | 125 +-
savestring.c | 5 +-
search.c | 146 +-
shell.c | 16 +-
signals.c | 82 +-
support/config.guess | 914 +++---
support/config.rpath | 373 ++-
support/config.sub | 2501 ++++++++-------
support/shlib-install | 2 +-
support/shobj-conf | 4 +-
terminal.c | 76 +-
text.c | 319 +-
tilde.c | 43 +-
undo.c | 68 +-
util.c | 65 +-
vi_keymap.c | 2 +-
vi_mode.c | 544 ++--
xfree.c | 5 +-
xmalloc.c | 12 +-
96 files changed, 14035 insertions(+), 11333 deletions(-)
create mode 100644 examples/rlkeymaps.c
mode change 100644 => 100755 support/config.guess
mode change 100644 => 100755 support/config.rpath
mode change 100644 => 100755 support/config.sub
diff --git a/CHANGELOG b/CHANGELOG
index 6794591..18265ab 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1304,3 +1304,50 @@ configure.ac
----
configure.ac,Makefile.in,examples/Makefile.in
- remove references to purify
+
+ 11/21
+ -----
+configure.ac,config.h.in
+ - fnmatch: check for libc function, define HAVE_FNMATCH if found. Now
+ used by vi-mode history search functions
+
+ 7/12
+ ----
+Makefile.in,examples/Makefile.in
+ - add support for building with address sanitizer, using new target
+ `asan'
+
+ 4/23/2018
+ ---------
+configure.ac
+ - TERMCAP_PKG_CONFIG_LIB: new variable, defined from TERMCAP_LIB,
+ defaults to termcap
+
+readline.pc.in
+ - change Requires.private to use TERMCAP_PKG_CONFIG_LIB instead of
+ hardcoded `tinfo'. Report and fix from Thomas Petazzoni
+
+
+ 5/4
+ ---
+Makefile.in
+ - new targets to install and uninstall the `readline.pc' pkgconfig
+ file
+ - install-{static,shared}: add install-pc to the list of prereqs
+ - uninstall{,-shared}: add uninstall-pc to list of prereqs. Change
+ from Thomas Petazzoni
+
+configure.ac,Makefile.in
+ - add new configure option to optionally disable installing the
+ source code examples. From Thomas Petazzoni
+
+ 5/23
+ ----
+Makefile.in
+ - install-pc: make sure we install readline.pc into an existing
+ pkgconfig directory. Report from ilove zfs
+
+ 5/24
+ ----
+Makefile.in
+ - installdirs: create $(pkgconfigdir) if it doesn't exist
diff --git a/CHANGES b/CHANGES
index b5e16b7..09eab6e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,145 @@
+This document details the changes between this version, readline-8.0, and the
+previous version, readline-7.0.
+
+1. Changes to Readline
+
+a. Added a guard to prevent nested macros from causing an infinite expansion
+ loop.
+
+b. Instead of allocating enough history list entries to hold the maximum list
+ size, cap the number allocated initially.
+
+c. Added a strategy to avoid allocating huge amounts of memory if a block of
+ history entries without timestamps occurs after a block with timestamps.
+
+d. Added support for keyboard timeouts when an ESC character is the last
+ character in a macro.
+
+e. There are several performance improvements when in a UTF-8 locale.
+
+f. Readline does a better job of preserving the original set of blocked
+ signals when using pselect() to wait for input.
+
+g. Fixed a bug that caused multibyte characters in macros to be mishandled.
+
+h. Fixed several bugs in the code that calculates line breaks when expanding
+ prompts that span several lines, contain multibyte characters, and contain
+ invisible character seqeuences.
+
+i. Fixed several bugs in cursor positioning when displaying lines with prompts
+ containing invisible characters and multibyte characters.
+
+j. When performing case-insensitive completion, Readline no longer sorts the
+ list of matches unless directed to do so.
+
+k. Fixed a problem with key sequences ending with a backslash.
+
+l. Fixed out-of-bounds and free memory read errors found via fuzzing.
+
+m. Fixed several cases where the mark was set to an invalid value.
+
+n. Fixed a problem with the case-changing operators in the case where the
+ lower and upper case versions of a character do not have the same number
+ of bytes.
+
+o. Handle incremental and non-incremental search character reads returning EOF.
+
+p. Handle the case where a failing readline command at the end of a multi-key
+ sequence could be misinterpreted.
+
+q. The history library now prints a meaningful error message if the history
+ file isn't a regular file.
+
+r. Fixed a problem with vi-mode redo (`.') on a command when trying to replace
+ a multibyte character.
+
+s. The key binding code now attempts to remove a keymap if a key unbinding
+ leaves it empty.
+
+t. Fixed a line-wrapping issue that caused problems for some terminal
+ emulators.
+
+u. If there is a key bound to the tty's VDISCARD special character, readline
+ disables VDISCARD while it is active.
+
+v. Fixed a problem with exiting bracketed paste mode on terminals that assume
+ the bracketed paste mode character sequence contains visible characters.
+
+w. Fixed a bug that could cause a key binding command to refer to an
+ uninitialized variable.
+
+x. Added more UTF-8-specific versions of multibyte functions, and optimized
+ existing functions if the current locale uses UTF-8 encoding.
+
+y. Fixed a problem with bracketed-paste inserting more than one character and
+ interacting with other readline functions.
+
+z. Fixed a bug that caused the history library to attempt to append a history
+ line to a non-existent history entry.
+
+aa. If using bracketed paste mode, output a newline after the \r that is the
+ last character of the mode disable string to avoid overwriting output.
+
+bb. Fixes to the vi-mode `b', `B', `w', `W', `e', and `E' commands to better
+ handle multibyte characters.
+
+cc. Fixed a redisplay problem that caused an extra newline to be generated on
+ accept-line when the line length is exactly the screenwidth.
+
+dd. Fixed a bug with adding multibyte characters to an incremental search
+ string.
+
+ee. Fixed a bug with redoing text insertions in vi mode.
+
+ff. Fixed a bug with pasting text into an incremental search string if bracketed
+ paste mode is enabled. ESC cannot be one of the incremental search
+ terminator characters for this to work.
+
+gg. Fixed a bug with anchored search patterns when performing searches in vi
+ mode.
+
+2. New Features in Readline
+
+a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as
+ Posix specifies (uses fnmatch(3) if available).
+
+b. There are new `next-screen-line' and `previous-screen-line' bindable
+ commands, which move the cursor to the same column in the next, or previous,
+ physical line, respectively.
+
+c. There are default key bindings for control-arrow-key key combinations.
+
+d. A negative argument (-N) to `quoted-insert' means to insert the next N
+ characters using quoted-insert.
+
+e. New public function: rl_check_signals(), which allows applications to
+ respond to signals that readline catches while waiting for input using
+ a custom read function.
+
+f. There is new support for conditionally testing the readline version in an
+ inputrc file, with a full set of arithmetic comparison operators available.
+
+g. There is a simple variable comparison facility available for use within an
+ inputrc file. Allowable operators are equality and inequality; string
+ variables may be compared to a value; boolean variables must be compared to
+ either `on' or `off'; variable names are separated from the operator by
+ whitespace.
+
+h. The history expansion library now understands command and process
+ substitution and extended globbing and allows them to appear anywhere in a
+ word.
+
+i. The history library has a new variable that allows applications to set the
+ initial quoting state, so quoting state can be inherited from a previous
+ line.
+
+j. Readline now allows application-defined keymap names; there is a new public
+ function, rl_set_keymap_name(), to do that.
+
+k. The "Insert" keypad key, if available, now puts readline into overwrite
+ mode.
+
+-------------------------------------------------------------------------------
This document details the changes between this version, readline-7.0, and the
previous version, readline-6.3.
diff --git a/INSTALL b/INSTALL
index e1a92d3..afb4d53 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,7 @@
Basic Installation
==================
-These are installation instructions for Readline-7.0.
+These are installation instructions for Readline-8.0.
The simplest way to compile readline is:
diff --git a/MANIFEST b/MANIFEST
index bfd0547..ad49d66 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -118,6 +118,7 @@ examples/rl-fgets.c f
examples/rlbasic.c f
examples/rlcat.c f
examples/rlevent.c f
+examples/rlkeymaps.c f
examples/rltest.c f
examples/rl-callbacktest.c f
examples/rl.c f
diff --git a/Makefile.in b/Makefile.in
index 6522573..8dd5ca5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,6 +1,6 @@
## -*- text -*- ##
# Master Makefile for the GNU readline library.
-# Copyright (C) 1994-2009 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 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
@@ -59,6 +59,7 @@ mandir = @mandir@
includedir = @includedir@
datadir = @datadir@
localedir = @localedir@
+pkgconfigdir = ${libdir}/pkgconfig
infodir = @infodir@
@@ -85,7 +86,7 @@ TERMCAP_LIB = @TERMCAP_LIB@
# For libraries which include headers from other libraries.
INCLUDES = -I. -I$(srcdir)
-XCCFLAGS = $(DEFS) $(LOCAL_DEFS) $(INCLUDES) $(CPPFLAGS)
+XCCFLAGS = $(ASAN_CFLAGS) $(DEFS) $(LOCAL_DEFS) $(INCLUDES) $(CPPFLAGS)
CCFLAGS = $(XCCFLAGS) $(LOCAL_CFLAGS) $(CFLAGS)
# could add -Werror here
@@ -94,6 +95,11 @@ GCC_LINT_FLAGS = -ansi -Wall -Wshadow -Wpointer-arith -Wcast-qual \
-Wmissing-prototypes -Wno-implicit -pedantic
GCC_LINT_CFLAGS = $(XCCFLAGS) $(GCC_LINT_FLAGS) @CFLAGS@ @LOCAL_CFLAGS@
+ASAN_XCFLAGS = -fsanitize=address -fno-omit-frame-pointer
+ASAN_XLDFLAGS = -fsanitize=address
+
+install_examples = @EXAMPLES_INSTALL_TARGET@
+
.c.o:
${RM} $@
$(CC) -c $(CCFLAGS) $<
@@ -160,6 +166,9 @@ all: $(TARGETS)
everything: all examples
+asan:
+ ${MAKE} ${MFLAGS} ASAN_CFLAGS='${ASAN_XCFLAGS}' ASAN_LDFLAGS='${ASAN_XLDFLAGS}' everything
+
static: $(STATIC_LIBS)
libreadline.a: $(OBJECTS)
@@ -232,7 +241,16 @@ uninstall-headers:
maybe-uninstall-headers: uninstall-headers
-install-static: installdirs $(STATIC_LIBS) install-headers install-doc install-examples
+install-pc: installdirs
+ -$(INSTALL_DATA) $(BUILD_DIR)/readline.pc $(DESTDIR)$(pkgconfigdir)/readline.pc
+
+uninstall-pc:
+ -test -n "$(pkgconfigdir)" && cd $(DESTDIR)$(pkgconfigdir) && \
+ ${RM} readline.pc
+
+maybe-uninstall-pc: uninstall-pc
+
+install-static: installdirs $(STATIC_LIBS) install-headers install-doc ${install_examples} install-pc
-$(MV) $(DESTDIR)$(libdir)/libreadline.a $(DESTDIR)$(libdir)/libreadline.old
$(INSTALL_DATA) libreadline.a $(DESTDIR)$(libdir)/libreadline.a
-test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libreadline.a
@@ -243,17 +261,18 @@ install-static: installdirs $(STATIC_LIBS) install-headers install-doc install-e
installdirs: $(srcdir)/support/mkinstalldirs
-$(SHELL) $(srcdir)/support/mkinstalldirs $(DESTDIR)$(includedir) \
$(DESTDIR)$(includedir)/readline $(DESTDIR)$(libdir) \
- $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir) $(DESTDIR)$(docdir)
+ $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir) $(DESTDIR)$(docdir) \
+ $(DESTDIR)$(pkgconfigdir)
-uninstall: uninstall-headers uninstall-doc uninstall-examples
+uninstall: uninstall-headers uninstall-doc uninstall-examples uninstall-pc
-test -n "$(DESTDIR)$(libdir)" && cd $(DESTDIR)$(libdir) && \
${RM} libreadline.a libreadline.old libhistory.a libhistory.old $(SHARED_LIBS)
-( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
-install-shared: installdirs install-headers shared install-doc
+install-shared: installdirs install-headers shared install-doc install-pc
( cd shlib ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install )
-uninstall-shared: maybe-uninstall-headers
+uninstall-shared: maybe-uninstall-headers maybe-uninstall-pc
-( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
install-examples: installdirs install-headers
diff --git a/NEWS b/NEWS
index cf7107e..42be21e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,48 @@
+This is a terse description of the new features added to readline-8.0 since
+the release of readline-7.0.
+
+New Features in Readline
+
+a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as
+ Posix specifies (uses fnmatch(3) if available).
+
+b. There are new `next-screen-line' and `previous-screen-line' bindable
+ commands, which move the cursor to the same column in the next, or previous,
+ physical line, respectively.
+
+c. There are default key bindings for control-arrow-key key combinations.
+
+d. A negative argument (-N) to `quoted-insert' means to insert the next N
+ characters using quoted-insert.
+
+e. New public function: rl_check_signals(), which allows applications to
+ respond to signals that readline catches while waiting for input using
+ a custom read function.
+
+f. There is new support for conditionally testing the readline version in an
+ inputrc file, with a full set of arithmetic comparison operators available.
+
+g. There is a simple variable comparison facility available for use within an
+ inputrc file. Allowable operators are equality and inequality; string
+ variables may be compared to a value; boolean variables must be compared to
+ either `on' or `off'; variable names are separated from the operator by
+ whitespace.
+
+h. The history expansion library now understands command and process
+ substitution and extended globbing and allows them to appear anywhere in a
+ word.
+
+i. The history library has a new variable that allows applications to set the
+ initial quoting state, so quoting state can be inherited from a previous
+ line.
+
+j. Readline now allows application-defined keymap names; there is a new public
+ function, rl_set_keymap_name(), to do that.
+
+k. The "Insert" keypad key, if available, now puts readline into overwrite
+ mode.
+
+-------------------------------------------------------------------------------
This is a terse description of the new features added to readline-7.0 since
the release of readline-6.3.
@@ -46,6 +91,34 @@ k. If readline reads a history file that begins with `#' (or the value of
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 is a terse description of the new features added to readline-6.3 since
the release of readline-6.2.
diff --git a/README b/README
index 6a9c2b9..4fb0804 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
Introduction
============
-This is the Gnu Readline library, version 7.0.
+This is the Gnu Readline library, version 8.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 d3bac07..1413267 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,4 +1,4 @@
-dnl
+nl
dnl Bash specific tests
dnl
dnl Some derived from PDKSH 5.1.3 autoconf tests
@@ -962,7 +962,8 @@ AC_CACHE_VAL(bash_cv_termcap_lib,
[AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo,
[AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses,
[AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses,
- bash_cv_termcap_lib=gnutermcap)])])])])])
+ [AC_CHECK_LIB(ncursesw, tgetent, bash_cv_termcap_lib=libncursesw,
+ bash_cv_termcap_lib=gnutermcap)])])])])])])
if test "X$_bash_needmsg" = "Xyes"; then
AC_MSG_CHECKING(which library has the termcap functions)
fi
@@ -1307,7 +1308,7 @@ AC_CACHE_VAL(bash_cv_must_reinstall_sighandlers,
typedef RETSIGTYPE sigfunc();
-int nsigint;
+volatile int nsigint;
#ifdef HAVE_POSIX_SIGNALS
sigfunc *
@@ -1357,7 +1358,7 @@ AC_DEFUN(BASH_SYS_JOB_CONTROL_MISSING,
[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
AC_MSG_CHECKING(for presence of necessary job control definitions)
AC_CACHE_VAL(bash_cv_job_control_missing,
-[AC_TRY_RUN([
+[AC_TRY_COMPILE([
#include
#ifdef HAVE_SYS_WAIT_H
#include
@@ -1367,42 +1368,38 @@ AC_CACHE_VAL(bash_cv_job_control_missing,
#endif
#include
-/* Add more tests in here as appropriate. */
-main()
-{
+/* add more tests in here as appropriate */
+
/* signal type */
#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
-exit(1);
+#error
#endif
/* signals and tty control. */
#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
-exit (1);
+#error
#endif
/* process control */
#if !defined (WNOHANG) || !defined (WUNTRACED)
-exit(1);
+#error
#endif
/* Posix systems have tcgetpgrp and waitpid. */
#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
-exit(1);
+#error
#endif
#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
-exit(1);
+#error
#endif
/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
-exit(1);
+#error
#endif
-exit(0);
-}], bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing,
- [AC_MSG_WARN(cannot check job control if cross-compiling -- defaulting to missing)
- bash_cv_job_control_missing=missing]
+], , bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing
)])
AC_MSG_RESULT($bash_cv_job_control_missing)
if test $bash_cv_job_control_missing = missing; then
@@ -1585,9 +1582,7 @@ fi
AC_DEFUN(BASH_CHECK_DEV_STDIN,
[AC_MSG_CHECKING(whether /dev/stdin stdout stderr are available)
AC_CACHE_VAL(bash_cv_dev_stdin,
-[if test -d /dev/fd && (exec test -r /dev/stdin < /dev/null) ; then
- bash_cv_dev_stdin=present
- elif test -d /proc/self/fd && (exec test -r /dev/stdin < /dev/null) ; then
+[if (exec test -r /dev/stdin < /dev/null) ; then
bash_cv_dev_stdin=present
else
bash_cv_dev_stdin=absent
@@ -1798,6 +1793,8 @@ if test "$am_cv_func_iconv" = yes; then
LIBS="$OLDLIBS"
fi
+AC_CHECK_SIZEOF(wchar_t, 4)
+
])
dnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB
@@ -1856,7 +1853,7 @@ main()
],
ac_cv_rl_version=`cat conftest.rlv`,
ac_cv_rl_version='0.0',
-ac_cv_rl_version='6.3')])
+ac_cv_rl_version='8.0')])
CFLAGS="$_save_CFLAGS"
LDFLAGS="$_save_LDFLAGS"
@@ -4195,3 +4192,71 @@ fi
AC_MSG_RESULT($bash_cv_wexitstatus_offset)
AC_DEFINE_UNQUOTED([WEXITSTATUS_OFFSET], [$bash_cv_wexitstatus_offset], [Offset of exit status in wait status word])
])
+
+AC_DEFUN([BASH_FUNC_SBRK],
+[
+ AC_CHECK_FUNCS_ONCE([sbrk])
+ if test X$ac_cv_func_sbrk = Xyes; then
+ AC_CACHE_CHECK([for working sbrk], [bash_cv_func_sbrk],
+ [AC_TRY_RUN([
+#include
+#include
+
+int
+main(int c, char **v)
+{
+ void *x;
+
+ x = sbrk (4096);
+ exit ((x == (void *)-1) ? 1 : 0);
+}
+], bash_cv_func_sbrk=yes, bash_cv_func_snprintf=sbrk,
+ [AC_MSG_WARN([cannot check working sbrk if cross-compiling])
+ bash_cv_func_sbrk=yes]
+)])
+ if test $bash_cv_func_sbrk = no; then
+ ac_cv_func_sbrk=no
+ fi
+ fi
+ if test $ac_cv_func_sbrk = no; then
+ AC_DEFINE(HAVE_SBRK, 0,
+ [Define if you have a working sbrk function.])
+ fi
+])
+
+AC_DEFUN(BASH_FUNC_FNMATCH_EQUIV_FALLBACK,
+[AC_MSG_CHECKING(whether fnmatch can be used to check bracket equivalence classes)
+AC_CACHE_VAL(bash_cv_fnmatch_equiv_fallback,
+[AC_TRY_RUN([
+#include
+#include
+#include
+#include
+#include
+
+char *pattern = "[[=a=]]";
+
+/* char *string = "ä"; */
+unsigned char string[4] = { '\xc3', '\xa4', '\0' };
+
+int
+main (int c, char **v)
+{
+ setlocale (LC_ALL, "de_DE.UTF-8");
+ if (fnmatch (pattern, (const char *)string, 0) != FNM_NOMATCH)
+ exit (0);
+ exit (1);
+}
+
+], bash_cv_fnmatch_equiv_fallback=yes, bash_cv_fnmatch_equiv_fallback=no,
+ [AC_MSG_WARN(cannot check fnmatch if cross compiling -- defaulting to no)
+ bash_cv_fnmatch_equiv_fallback=no]
+)])
+AC_MSG_RESULT($bash_cv_fnmatch_equiv_fallback)
+if test "$bash_cv_fnmatch_equiv_fallback" = "yes" ; then
+ bash_cv_fnmatch_equiv_value=1
+else
+ bash_cv_fnmatch_equiv_value=0
+fi
+AC_DEFINE_UNQUOTED([FNMATCH_EQUIV_FALLBACK], [$bash_cv_fnmatch_equiv_value], [Whether fnmatch can be used for bracket equivalence classes])
+])
diff --git a/bind.c b/bind.c
index f1098c4..57ae10f 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-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2017 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.
@@ -80,6 +80,8 @@ static void _rl_init_file_error (const char *, ...) __attribute__((__format__ (
static void _rl_init_file_error ();
#endif
+static rl_command_func_t *_rl_function_of_keyseq_internal PARAMS((const char *, size_t, Keymap, int *));
+
static char *_rl_read_file PARAMS((char *, size_t *));
static int _rl_read_init_file PARAMS((const char *, int));
static int glean_key_from_name PARAMS((char *));
@@ -87,14 +89,30 @@ static int glean_key_from_name PARAMS((char *));
static int find_boolean_var PARAMS((const char *));
static int find_string_var PARAMS((const char *));
+static const char *boolean_varname PARAMS((int));
+static const char *string_varname PARAMS((int));
+
static char *_rl_get_string_variable_value PARAMS((const char *));
static int substring_member_of_array PARAMS((const char *, const char * const *));
+static int _rl_get_keymap_by_name PARAMS((const char *));
+static int _rl_get_keymap_by_map PARAMS((Keymap));
+
static int currently_reading_init_file;
/* used only in this file */
static int _rl_prefer_visible_bell = 1;
+#define OP_EQ 1
+#define OP_NE 2
+#define OP_GT 3
+#define OP_GE 4
+#define OP_LT 5
+#define OP_LE 6
+
+#define OPSTART(c) ((c) == '=' || (c) == '!' || (c) == '<' || (c) == '>')
+#define CMPSTART(c) ((c) == '=' || (c) == '!')
+
/* **************************************************************** */
/* */
/* Binding keys */
@@ -105,10 +123,7 @@ static int _rl_prefer_visible_bell = 1;
Add NAME to the list of named functions. Make FUNCTION be the function
that gets called. If KEY is not -1, then bind it. */
int
-rl_add_defun (name, function, key)
- const char *name;
- rl_command_func_t *function;
- int key;
+rl_add_defun (const char *name, rl_command_func_t *function, int key)
{
if (key != -1)
rl_bind_key (key, function);
@@ -118,9 +133,7 @@ rl_add_defun (name, function, key)
/* Bind KEY to FUNCTION. Returns non-zero if KEY is out of range. */
int
-rl_bind_key (key, function)
- int key;
- rl_command_func_t *function;
+rl_bind_key (int key, rl_command_func_t *function)
{
char keyseq[3];
int l;
@@ -168,10 +181,7 @@ rl_bind_key (key, function)
/* Bind KEY to FUNCTION in MAP. Returns non-zero in case of invalid
KEY. */
int
-rl_bind_key_in_map (key, function, map)
- int key;
- rl_command_func_t *function;
- Keymap map;
+rl_bind_key_in_map (int key, rl_command_func_t *function, Keymap map)
{
int result;
Keymap oldmap;
@@ -184,57 +194,44 @@ rl_bind_key_in_map (key, function, map)
}
/* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. Right
- now, this is always used to attempt to bind the arrow keys, hence the
- check for rl_vi_movement_mode. */
+ now, this is always used to attempt to bind the arrow keys. */
int
-rl_bind_key_if_unbound_in_map (key, default_func, kmap)
- int key;
- rl_command_func_t *default_func;
- Keymap kmap;
+rl_bind_key_if_unbound_in_map (int key, rl_command_func_t *default_func, Keymap kmap)
{
- char keyseq[2];
+ char *keyseq;
- keyseq[0] = (unsigned char)key;
- keyseq[1] = '\0';
+ keyseq = rl_untranslate_keyseq ((unsigned char)key);
return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, kmap));
}
int
-rl_bind_key_if_unbound (key, default_func)
- int key;
- rl_command_func_t *default_func;
+rl_bind_key_if_unbound (int key, rl_command_func_t *default_func)
{
- char keyseq[2];
+ char *keyseq;
- keyseq[0] = (unsigned char)key;
- keyseq[1] = '\0';
+ keyseq = rl_untranslate_keyseq ((unsigned char)key);
return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, _rl_keymap));
}
/* Make KEY do nothing in the currently selected keymap.
- Returns non-zero in case of error. */
+ Returns non-zero in case of error. This is not the same as self-insert;
+ this makes it a dead key. */
int
-rl_unbind_key (key)
- int key;
+rl_unbind_key (int key)
{
return (rl_bind_key (key, (rl_command_func_t *)NULL));
}
-/* Make KEY do nothing in MAP.
- Returns non-zero in case of error. */
+/* Make KEY do nothing in MAP. Returns non-zero in case of error. */
int
-rl_unbind_key_in_map (key, map)
- int key;
- Keymap map;
+rl_unbind_key_in_map (int key, Keymap map)
{
return (rl_bind_key_in_map (key, (rl_command_func_t *)NULL, map));
}
/* Unbind all keys bound to FUNCTION in MAP. */
int
-rl_unbind_function_in_map (func, map)
- rl_command_func_t *func;
- Keymap map;
+rl_unbind_function_in_map (rl_command_func_t *func, Keymap map)
{
register int i, rval;
@@ -249,10 +246,9 @@ rl_unbind_function_in_map (func, map)
return rval;
}
+/* Unbind all keys bound to COMMAND, which is a bindable command name, in MAP */
int
-rl_unbind_command_in_map (command, map)
- const char *command;
- Keymap map;
+rl_unbind_command_in_map (const char *command, Keymap map)
{
rl_command_func_t *func;
@@ -266,9 +262,7 @@ rl_unbind_command_in_map (command, map)
FUNCTION, starting in the current keymap. This makes new
keymaps as necessary. */
int
-rl_bind_keyseq (keyseq, function)
- const char *keyseq;
- rl_command_func_t *function;
+rl_bind_keyseq (const char *keyseq, rl_command_func_t *function)
{
return (rl_generic_bind (ISFUNC, keyseq, (char *)function, _rl_keymap));
}
@@ -277,20 +271,14 @@ rl_bind_keyseq (keyseq, function)
FUNCTION. This makes new keymaps as necessary. The initial
place to do bindings is in MAP. */
int
-rl_bind_keyseq_in_map (keyseq, function, map)
- const char *keyseq;
- rl_command_func_t *function;
- Keymap map;
+rl_bind_keyseq_in_map (const char *keyseq, rl_command_func_t *function, Keymap map)
{
return (rl_generic_bind (ISFUNC, keyseq, (char *)function, map));
}
/* Backwards compatibility; equivalent to rl_bind_keyseq_in_map() */
int
-rl_set_key (keyseq, function, map)
- const char *keyseq;
- rl_command_func_t *function;
- Keymap map;
+rl_set_key (const char *keyseq, rl_command_func_t *function, Keymap map)
{
return (rl_generic_bind (ISFUNC, keyseq, (char *)function, map));
}
@@ -299,16 +287,24 @@ rl_set_key (keyseq, function, map)
now, this is always used to attempt to bind the arrow keys, hence the
check for rl_vi_movement_mode. */
int
-rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, kmap)
- const char *keyseq;
- rl_command_func_t *default_func;
- Keymap kmap;
+rl_bind_keyseq_if_unbound_in_map (const char *keyseq, rl_command_func_t *default_func, Keymap kmap)
{
rl_command_func_t *func;
+ char *keys;
+ int keys_len;
if (keyseq)
{
- func = rl_function_of_keyseq (keyseq, kmap, (int *)NULL);
+ /* Handle key sequences that require translations and `raw' ones that
+ don't. This might be a problem with backslashes. */
+ keys = (char *)xmalloc (1 + (2 * strlen (keyseq)));
+ if (rl_translate_keyseq (keyseq, keys, &keys_len))
+ {
+ xfree (keys);
+ return -1;
+ }
+ func = rl_function_of_keyseq_len (keys, keys_len, kmap, (int *)NULL);
+ xfree (keys);
#if defined (VI_MODE)
if (!func || func == rl_do_lowercase_version || func == rl_vi_movement_mode)
#else
@@ -322,9 +318,7 @@ rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, kmap)
}
int
-rl_bind_keyseq_if_unbound (keyseq, default_func)
- const char *keyseq;
- rl_command_func_t *default_func;
+rl_bind_keyseq_if_unbound (const char *keyseq, rl_command_func_t *default_func)
{
return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, _rl_keymap));
}
@@ -333,9 +327,7 @@ rl_bind_keyseq_if_unbound (keyseq, default_func)
the string of characters MACRO. This makes new keymaps as
necessary. The initial place to do bindings is in MAP. */
int
-rl_macro_bind (keyseq, macro, map)
- const char *keyseq, *macro;
- Keymap map;
+rl_macro_bind (const char *keyseq, const char *macro, Keymap map)
{
char *macro_keys;
int macro_keys_len;
@@ -357,16 +349,13 @@ rl_macro_bind (keyseq, macro, map)
a macro (ISMACR), or a keymap (ISKMAP). This makes new keymaps
as necessary. The initial place to do bindings is in MAP. */
int
-rl_generic_bind (type, keyseq, data, map)
- int type;
- const char *keyseq;
- char *data;
- Keymap map;
+rl_generic_bind (int type, const char *keyseq, char *data, Keymap map)
{
char *keys;
- int keys_len;
+ int keys_len, prevkey;
register int i;
KEYMAP_ENTRY k;
+ Keymap prevmap;
k.function = 0;
@@ -389,12 +378,18 @@ rl_generic_bind (type, keyseq, data, map)
return -1;
}
+ prevmap = map;
+ prevkey = keys[0];
+
/* Bind keys, making new keymaps as necessary. */
for (i = 0; i < keys_len; i++)
{
unsigned char uc = keys[i];
int ic;
+ if (i > 0)
+ prevkey = ic;
+
ic = uc;
if (ic < 0 || ic >= KEYMAP_SIZE)
{
@@ -406,7 +401,10 @@ rl_generic_bind (type, keyseq, data, map)
{
ic = UNMETA (ic);
if (map[ESC].type == ISKMAP)
- map = FUNCTION_TO_KEYMAP (map, ESC);
+ {
+ prevmap = map;
+ map = FUNCTION_TO_KEYMAP (map, ESC);
+ }
}
if ((i + 1) < keys_len)
@@ -425,6 +423,7 @@ rl_generic_bind (type, keyseq, data, map)
map[ic].type = ISKMAP;
map[ic].function = KEYMAP_TO_FUNCTION (rl_make_bare_keymap());
}
+ prevmap = map;
map = FUNCTION_TO_KEYMAP (map, ic);
/* The dispatch code will return this function if no matching
key sequence is found in the keymap. This (with a little
@@ -444,6 +443,7 @@ rl_generic_bind (type, keyseq, data, map)
xfree ((char *)map[ic].function);
else if (map[ic].type == ISKMAP)
{
+ prevmap = map;
map = FUNCTION_TO_KEYMAP (map, ic);
ic = ANYOTHERKEY;
/* If we're trying to override a keymap with a null function
@@ -460,7 +460,28 @@ rl_generic_bind (type, keyseq, data, map)
}
rl_binding_keymap = map;
+
}
+
+ /* If we unbound a key (type == ISFUNC, data == 0), and the prev keymap
+ points to the keymap where we unbound the key (sanity check), and the
+ current binding keymap is empty (rl_empty_keymap() returns non-zero),
+ and the binding keymap has ANYOTHERKEY set with type == ISFUNC
+ (overridden function), delete the now-empty keymap, take the previously-
+ overridden function and remove the override. */
+ /* Right now, this only works one level back. */
+ if (type == ISFUNC && data == 0 &&
+ prevmap[prevkey].type == ISKMAP &&
+ (FUNCTION_TO_KEYMAP(prevmap, prevkey) == rl_binding_keymap) &&
+ rl_binding_keymap[ANYOTHERKEY].type == ISFUNC &&
+ rl_empty_keymap (rl_binding_keymap))
+ {
+ prevmap[prevkey].type = rl_binding_keymap[ANYOTHERKEY].type;
+ prevmap[prevkey].function = rl_binding_keymap[ANYOTHERKEY].function;
+ rl_discard_keymap (rl_binding_keymap);
+ rl_binding_keymap = prevmap;
+ }
+
xfree (keys);
return 0;
}
@@ -469,10 +490,7 @@ rl_generic_bind (type, keyseq, data, map)
an array of characters. LEN gets the final length of ARRAY. Return
non-zero if there was an error parsing SEQ. */
int
-rl_translate_keyseq (seq, array, len)
- const char *seq;
- char *array;
- int *len;
+rl_translate_keyseq (const char *seq, char *array, int *len)
{
register int i, c, l, temp;
@@ -483,7 +501,10 @@ rl_translate_keyseq (seq, array, len)
c = seq[++i];
if (c == 0)
- break;
+ {
+ array[l++] = '\\'; /* preserve trailing backslash */
+ break;
+ }
/* Handle \C- and \M- prefixes. */
if ((c == 'C' || c == 'M') && seq[i + 1] == '-')
@@ -494,8 +515,6 @@ rl_translate_keyseq (seq, array, len)
array[l++] = ESC; /* ESC is meta-prefix */
i += 5;
array[l++] = CTRL (_rl_to_upper (seq[i]));
- if (seq[i] == '\0')
- i--;
}
else if (c == 'M')
{
@@ -524,6 +543,8 @@ rl_translate_keyseq (seq, array, len)
/* Special hack for C-?... */
array[l++] = (seq[i] == '?') ? RUBOUT : CTRL (_rl_to_upper (seq[i]));
}
+ if (seq[i] == '\0')
+ break;
continue;
}
@@ -596,8 +617,7 @@ rl_translate_keyseq (seq, array, len)
}
static int
-_rl_isescape (c)
- int c;
+_rl_isescape (int c)
{
switch (c)
{
@@ -613,8 +633,7 @@ _rl_isescape (c)
}
static int
-_rl_escchar (c)
- int c;
+_rl_escchar (int c)
{
switch (c)
{
@@ -630,8 +649,7 @@ _rl_escchar (c)
}
char *
-rl_untranslate_keyseq (seq)
- int seq;
+rl_untranslate_keyseq (int seq)
{
static char kseq[16];
int i, c;
@@ -681,9 +699,7 @@ rl_untranslate_keyseq (seq)
}
char *
-_rl_untranslate_macro_value (seq, use_escapes)
- char *seq;
- int use_escapes;
+_rl_untranslate_macro_value (char *seq, int use_escapes)
{
char *ret, *r, *s;
int c;
@@ -742,8 +758,7 @@ _rl_untranslate_macro_value (seq, use_escapes)
If STRING doesn't have a matching function, then a NULL pointer
is returned. */
rl_command_func_t *
-rl_named_function (string)
- const char *string;
+rl_named_function (const char *string)
{
register int i;
@@ -760,18 +775,15 @@ rl_named_function (string)
used. TYPE, if non-NULL, is a pointer to an int which will receive the
type of the object pointed to. One of ISFUNC (function), ISKMAP (keymap),
or ISMACR (macro). */
-rl_command_func_t *
-rl_function_of_keyseq (keyseq, map, type)
- const char *keyseq;
- Keymap map;
- int *type;
+static rl_command_func_t *
+_rl_function_of_keyseq_internal (const char *keyseq, size_t len, Keymap map, int *type)
{
register int i;
if (map == 0)
map = _rl_keymap;
- for (i = 0; keyseq && keyseq[i]; i++)
+ for (i = 0; keyseq && i < len; i++)
{
unsigned char ic = keyseq[i];
@@ -823,6 +835,18 @@ rl_function_of_keyseq (keyseq, map, type)
return ((rl_command_func_t *) NULL);
}
+rl_command_func_t *
+rl_function_of_keyseq (const char *keyseq, Keymap map, int *type)
+{
+ return _rl_function_of_keyseq_internal (keyseq, strlen (keyseq), map, type);
+}
+
+rl_command_func_t *
+rl_function_of_keyseq_len (const char *keyseq, size_t len, Keymap map, int *type)
+{
+ return _rl_function_of_keyseq_internal (keyseq, len, map, type);
+}
+
/* The last key bindings file read. */
static char *last_readline_init_file = (char *)NULL;
@@ -835,17 +859,20 @@ static int current_readline_init_lineno;
The size of the buffer is returned in *SIZEP. Returns NULL if any
errors were encountered. */
static char *
-_rl_read_file (filename, sizep)
- char *filename;
- size_t *sizep;
+_rl_read_file (char *filename, size_t *sizep)
{
struct stat finfo;
size_t file_size;
char *buffer;
int i, file;
- if ((stat (filename, &finfo) < 0) || (file = open (filename, O_RDONLY, 0666)) < 0)
- return ((char *)NULL);
+ file = -1;
+ if (((file = open (filename, O_RDONLY, 0666)) < 0) || (fstat (file, &finfo) < 0))
+ {
+ if (file >= 0)
+ close (file);
+ return ((char *)NULL);
+ }
file_size = (size_t)finfo.st_size;
@@ -882,8 +909,7 @@ _rl_read_file (filename, sizep)
/* Re-read the current keybindings file. */
int
-rl_re_read_init_file (count, ignore)
- int count, ignore;
+rl_re_read_init_file (int count, int ignore)
{
int r;
r = rl_read_init_file ((const char *)NULL);
@@ -900,8 +926,7 @@ rl_re_read_init_file (count, ignore)
If the file existed and could be opened and read, 0 is returned,
otherwise errno is returned. */
int
-rl_read_init_file (filename)
- const char *filename;
+rl_read_init_file (const char *filename)
{
/* Default the filename. */
if (filename == 0)
@@ -926,9 +951,7 @@ rl_read_init_file (filename)
}
static int
-_rl_read_init_file (filename, include_level)
- const char *filename;
- int include_level;
+_rl_read_init_file (const char *filename, int include_level)
{
register int i;
char *buffer, *openname, *line, *end;
@@ -1025,6 +1048,62 @@ _rl_init_file_error (va_alist)
va_end (args);
}
+/* **************************************************************** */
+/* */
+/* Parser Helper Functions */
+/* */
+/* **************************************************************** */
+
+static int
+parse_comparison_op (s, indp)
+ const char *s;
+ int *indp;
+{
+ int i, peekc, op;
+
+ if (OPSTART (s[*indp]) == 0)
+ return -1;
+ i = *indp;
+ peekc = s[i] ? s[i+1] : 0;
+ op = -1;
+
+ if (s[i] == '=')
+ {
+ op = OP_EQ;
+ if (peekc == '=')
+ i++;
+ i++;
+ }
+ else if (s[i] == '!' && peekc == '=')
+ {
+ op = OP_NE;
+ i += 2;
+ }
+ else if (s[i] == '<' && peekc == '=')
+ {
+ op = OP_LE;
+ i += 2;
+ }
+ else if (s[i] == '>' && peekc == '=')
+ {
+ op = OP_GE;
+ i += 2;
+ }
+ else if (s[i] == '<')
+ {
+ op = OP_LT;
+ i += 1;
+ }
+ else if (s[i] == '>')
+ {
+ op = OP_GT;
+ i += 1;
+ }
+
+ *indp = i;
+ return op;
+}
+
/* **************************************************************** */
/* */
/* Parser Directives */
@@ -1055,10 +1134,11 @@ static int if_stack_size;
/* Push _rl_parsing_conditionalized_out, and set parser state based
on ARGS. */
static int
-parser_if (args)
- char *args;
+parser_if (char *args)
{
- register int i;
+ int i, llen, boolvar, strvar;
+
+ boolvar = strvar = -1;
/* Push parser state. */
if (if_stack_depth + 1 >= if_stack_size)
@@ -1075,6 +1155,8 @@ parser_if (args)
if (_rl_parsing_conditionalized_out)
return 0;
+ llen = strlen (args);
+
/* Isolate first argument. */
for (i = 0; args[i] && !whitespace (args[i]); i++);
@@ -1117,10 +1199,138 @@ parser_if (args)
_rl_parsing_conditionalized_out = mode != rl_editing_mode;
}
#endif /* VI_MODE */
+ else if (_rl_strnicmp (args, "version", 7) == 0)
+ {
+ int rlversion, versionarg, op, previ, major, minor;
+
+ _rl_parsing_conditionalized_out = 1;
+ rlversion = RL_VERSION_MAJOR*10 + RL_VERSION_MINOR;
+ /* if "version" is separated from the operator by whitespace, or the
+ operand is separated from the operator by whitespace, restore it.
+ We're more liberal with allowed whitespace for this variable. */
+ if (i > 0 && i <= llen && args[i-1] == '\0')
+ args[i-1] = ' ';
+ args[llen] = '\0'; /* just in case */
+ for (i = 7; whitespace (args[i]); i++)
+ ;
+ if (OPSTART(args[i]) == 0)
+ {
+ _rl_init_file_error ("comparison operator expected, found `%s'", args[i] ? args + i : "end-of-line");
+ return 0;
+ }
+ previ = i;
+ op = parse_comparison_op (args, &i);
+ if (op <= 0)
+ {
+ _rl_init_file_error ("comparison operator expected, found `%s'", args+previ);
+ return 0;
+ }
+ for ( ; args[i] && whitespace (args[i]); i++)
+ ;
+ if (args[i] == 0 || _rl_digit_p (args[i]) == 0)
+ {
+ _rl_init_file_error ("numeric argument expected, found `%s'", args+i);
+ return 0;
+ }
+ major = minor = 0;
+ previ = i;
+ for ( ; args[i] && _rl_digit_p (args[i]); i++)
+ major = major*10 + _rl_digit_value (args[i]);
+ if (args[i] == '.')
+ {
+ if (args[i + 1] && _rl_digit_p (args [i + 1]) == 0)
+ {
+ _rl_init_file_error ("numeric argument expected, found `%s'", args+previ);
+ return 0;
+ }
+ for (++i; args[i] && _rl_digit_p (args[i]); i++)
+ minor = minor*10 + _rl_digit_value (args[i]);
+ }
+ /* optional - check for trailing garbage on the line, allow whitespace
+ and a trailing comment */
+ previ = i;
+ for ( ; args[i] && whitespace (args[i]); i++)
+ ;
+ if (args[i] && args[i] != '#')
+ {
+ _rl_init_file_error ("trailing garbage on line: `%s'", args+previ);
+ return 0;
+ }
+ versionarg = major*10 + minor;
+
+ switch (op)
+ {
+ case OP_EQ:
+ _rl_parsing_conditionalized_out = rlversion == versionarg;
+ break;
+ case OP_NE:
+ _rl_parsing_conditionalized_out = rlversion != versionarg;
+ break;
+ case OP_GT:
+ _rl_parsing_conditionalized_out = rlversion > versionarg;
+ break;
+ case OP_GE:
+ _rl_parsing_conditionalized_out = rlversion >= versionarg;
+ break;
+ case OP_LT:
+ _rl_parsing_conditionalized_out = rlversion < versionarg;
+ break;
+ case OP_LE:
+ _rl_parsing_conditionalized_out = rlversion <= versionarg;
+ break;
+ }
+ }
/* Check to see if the first word in ARGS is the same as the
value stored in rl_readline_name. */
else if (_rl_stricmp (args, rl_readline_name) == 0)
_rl_parsing_conditionalized_out = 0;
+ else if ((boolvar = find_boolean_var (args)) >= 0 || (strvar = find_string_var (args)) >= 0)
+ {
+ int op, previ;
+ size_t vlen;
+ const char *vname;
+ char *valuearg, *vval, prevc;
+
+ _rl_parsing_conditionalized_out = 1;
+ vname = (boolvar >= 0) ? boolean_varname (boolvar) : string_varname (strvar);
+ vlen = strlen (vname);
+ if (i > 0 && i <= llen && args[i-1] == '\0')
+ args[i-1] = ' ';
+ args[llen] = '\0'; /* just in case */
+ for (i = vlen; whitespace (args[i]); i++)
+ ;
+ if (CMPSTART(args[i]) == 0)
+ {
+ _rl_init_file_error ("equality comparison operator expected, found `%s'", args[i] ? args + i : "end-of-line");
+ return 0;
+ }
+ previ = i;
+ op = parse_comparison_op (args, &i);
+ if (op != OP_EQ && op != OP_NE)
+ {
+ _rl_init_file_error ("equality comparison operator expected, found `%s'", args+previ);
+ return 0;
+ }
+ for ( ; args[i] && whitespace (args[i]); i++)
+ ;
+ if (args[i] == 0)
+ {
+ _rl_init_file_error ("argument expected, found `%s'", args+i);
+ return 0;
+ }
+ previ = i;
+ valuearg = args + i;
+ for ( ; args[i] && whitespace (args[i]) == 0; i++)
+ ;
+ prevc = args[i];
+ args[i] = '\0'; /* null-terminate valuearg */
+ vval = rl_variable_value (vname);
+ if (op == OP_EQ)
+ _rl_parsing_conditionalized_out = _rl_stricmp (vval, valuearg) != 0;
+ else if (op == OP_NE)
+ _rl_parsing_conditionalized_out = _rl_stricmp (vval, valuearg) == 0;
+ args[i] = prevc;
+ }
else
_rl_parsing_conditionalized_out = 1;
return 0;
@@ -1128,8 +1338,7 @@ parser_if (args)
/* Invert the current parser state if there is anything on the stack. */
static int
-parser_else (args)
- char *args;
+parser_else (char *args)
{
register int i;
@@ -1159,8 +1368,7 @@ parser_else (args)
/* Terminate a conditional, popping the value of
_rl_parsing_conditionalized_out from the stack. */
static int
-parser_endif (args)
- char *args;
+parser_endif (char *args)
{
if (if_stack_depth)
_rl_parsing_conditionalized_out = if_stack[--if_stack_depth];
@@ -1170,8 +1378,7 @@ parser_endif (args)
}
static int
-parser_include (args)
- char *args;
+parser_include (char *args)
{
const char *old_init_file;
char *e;
@@ -1211,8 +1418,7 @@ static const struct {
/* Handle a parser directive. STATEMENT is the line of the directive
without any leading `$'. */
static int
-handle_parser_directive (statement)
- char *statement;
+handle_parser_directive (char *statement)
{
register int i;
char *directive, *args;
@@ -1249,9 +1455,7 @@ handle_parser_directive (statement)
/* Start at STRING[START] and look for DELIM. Return I where STRING[I] ==
DELIM or STRING[I] == 0. DELIM is usually a double quote. */
static int
-_rl_skip_to_delim (string, start, delim)
- char *string;
- int start, delim;
+_rl_skip_to_delim (char *string, int start, int delim)
{
int i, c, passc;
@@ -1283,8 +1487,7 @@ _rl_skip_to_delim (string, start, delim)
a variable binding command looks like: set variable value.
A new-style keybinding looks like "\C-x\C-x": exchange-point-and-mark. */
int
-rl_parse_and_bind (string)
- char *string;
+rl_parse_and_bind (char *string)
{
char *funname, *kname;
register int c, i;
@@ -1328,6 +1531,12 @@ rl_parse_and_bind (string)
/* Advance to the colon (:) or whitespace which separates the two objects. */
for (; (c = string[i]) && c != ':' && c != ' ' && c != '\t'; i++ );
+ if (i == 0)
+ {
+ _rl_init_file_error ("`%s': invalid key binding: missing key sequence", string);
+ return 1;
+ }
+
equivalency = (c == ':' && string[i + 1] == '=');
foundsep = c != 0;
@@ -1406,6 +1615,11 @@ remove_trailing:
i = _rl_skip_to_delim (string, i+1, *funname);
if (string[i])
i++;
+ else
+ {
+ _rl_init_file_error ("`%s': missing closing quote for macro", funname);
+ return 1;
+ }
}
/* Advance to the end of the string. */
@@ -1583,8 +1797,7 @@ static const struct {
};
static int
-find_boolean_var (name)
- const char *name;
+find_boolean_var (const char *name)
{
register int i;
@@ -1594,12 +1807,17 @@ find_boolean_var (name)
return -1;
}
+static const char *
+boolean_varname (int i)
+{
+ return ((i >= 0) ? boolean_varlist[i].name : (char *)NULL);
+}
+
/* Hooks for handling special boolean variables, where a
function needs to be called or another variable needs
to be changed when they're changed. */
static void
-hack_special_boolean_var (i)
- int i;
+hack_special_boolean_var (int i)
{
const char *name;
@@ -1668,8 +1886,7 @@ static const struct {
};
static int
-find_string_var (name)
- const char *name;
+find_string_var (const char *name)
{
register int i;
@@ -1679,12 +1896,17 @@ find_string_var (name)
return -1;
}
+static const char *
+string_varname (int i)
+{
+ return ((i >= 0) ? string_varlist[i].name : (char *)NULL);
+}
+
/* A boolean value that can appear in a `set variable' command is true if
the value is null or empty, `on' (case-insensitive), or "1". Any other
values result in 0 (false). */
static int
-bool_to_int (value)
- const char *value;
+bool_to_int (const char *value)
{
return (value == 0 || *value == '\0' ||
(_rl_stricmp (value, "on") == 0) ||
@@ -1692,8 +1914,7 @@ bool_to_int (value)
}
char *
-rl_variable_value (name)
- const char *name;
+rl_variable_value (const char *name)
{
register int i;
@@ -1711,8 +1932,7 @@ rl_variable_value (name)
}
int
-rl_variable_bind (name, value)
- const char *name, *value;
+rl_variable_bind (const char *name, const char *value)
{
register int i;
int v;
@@ -1743,8 +1963,7 @@ rl_variable_bind (name, value)
}
static int
-sv_editmode (value)
- const char *value;
+sv_editmode (const char *value)
{
if (_rl_strnicmp (value, "vi", 2) == 0)
{
@@ -1764,8 +1983,7 @@ sv_editmode (value)
}
static int
-sv_combegin (value)
- const char *value;
+sv_combegin (const char *value)
{
if (value && *value)
{
@@ -1777,8 +1995,7 @@ sv_combegin (value)
}
static int
-sv_dispprefix (value)
- const char *value;
+sv_dispprefix (const char *value)
{
int nval = 0;
@@ -1793,8 +2010,7 @@ sv_dispprefix (value)
}
static int
-sv_compquery (value)
- const char *value;
+sv_compquery (const char *value)
{
int nval = 100;
@@ -1809,8 +2025,7 @@ sv_compquery (value)
}
static int
-sv_compwidth (value)
- const char *value;
+sv_compwidth (const char *value)
{
int nval = -1;
@@ -1822,8 +2037,7 @@ sv_compwidth (value)
}
static int
-sv_histsize (value)
- const char *value;
+sv_histsize (const char *value)
{
int nval;
@@ -1842,8 +2056,7 @@ sv_histsize (value)
}
static int
-sv_keymap (value)
- const char *value;
+sv_keymap (const char *value)
{
Keymap kmap;
@@ -1857,8 +2070,7 @@ sv_keymap (value)
}
static int
-sv_seqtimeout (value)
- const char *value;
+sv_seqtimeout (const char *value)
{
int nval;
@@ -1874,8 +2086,7 @@ sv_seqtimeout (value)
}
static int
-sv_bell_style (value)
- const char *value;
+sv_bell_style (const char *value)
{
if (value == 0 || *value == '\0')
_rl_bell_preference = AUDIBLE_BELL;
@@ -1891,8 +2102,7 @@ sv_bell_style (value)
}
static int
-sv_isrchterm (value)
- const char *value;
+sv_isrchterm (const char *value)
{
int beg, end, delim;
char *v;
@@ -1929,8 +2139,7 @@ sv_isrchterm (value)
extern char *_rl_emacs_mode_str;
static int
-sv_emacs_modestr (value)
- const char *value;
+sv_emacs_modestr (const char *value)
{
if (value && *value)
{
@@ -1958,8 +2167,7 @@ sv_emacs_modestr (value)
}
static int
-sv_viins_modestr (value)
- const char *value;
+sv_viins_modestr (const char *value)
{
if (value && *value)
{
@@ -1987,8 +2195,7 @@ sv_viins_modestr (value)
}
static int
-sv_vicmd_modestr (value)
- const char *value;
+sv_vicmd_modestr (const char *value)
{
if (value && *value)
{
@@ -2039,8 +2246,7 @@ static const assoc_list name_key_alist[] = {
};
static int
-glean_key_from_name (name)
- char *name;
+glean_key_from_name (char *name)
{
register int i;
@@ -2052,10 +2258,12 @@ glean_key_from_name (name)
}
/* Auxiliary functions to manage keymaps. */
-static const struct {
- const char * const name;
+struct name_and_keymap {
+ char *name;
Keymap map;
-} keymap_names[] = {
+};
+
+static struct name_and_keymap builtin_keymap_names[] = {
{ "emacs", emacs_standard_keymap },
{ "emacs-standard", emacs_standard_keymap },
{ "emacs-meta", emacs_meta_keymap },
@@ -2069,45 +2277,116 @@ static const struct {
{ (char *)0x0, (Keymap)0x0 }
};
-Keymap
-rl_get_keymap_by_name (name)
- const char *name;
+/* -1 for NULL entry */
+#define NUM_BUILTIN_KEYMAPS (sizeof (builtin_keymap_names) / sizeof (builtin_keymap_names[0]) - 1)
+
+static struct name_and_keymap *keymap_names = builtin_keymap_names;
+
+static int
+_rl_get_keymap_by_name (const char *name)
{
register int i;
for (i = 0; keymap_names[i].name; i++)
if (_rl_stricmp (name, keymap_names[i].name) == 0)
- return (keymap_names[i].map);
- return ((Keymap) NULL);
+ return (i);
+ return -1;
}
-char *
-rl_get_keymap_name (map)
- Keymap map;
+Keymap
+rl_get_keymap_by_name (const char *name)
+{
+ int i;
+
+ i = _rl_get_keymap_by_name (name);
+ return ((i >= 0) ? keymap_names[i].map : (Keymap) NULL);
+}
+
+static int
+_rl_get_keymap_by_map (Keymap map)
{
register int i;
+
for (i = 0; keymap_names[i].name; i++)
if (map == keymap_names[i].map)
- return ((char *)keymap_names[i].name);
- return ((char *)NULL);
+ return (i);
+ return -1;
}
-
+
+char *
+rl_get_keymap_name (Keymap map)
+{
+ int i;
+
+ i = _rl_get_keymap_by_map (map);
+ return ((i >= 0) ? keymap_names[i].name : (char *)NULL);
+}
+
+int
+rl_set_keymap_name (const char *name, Keymap map)
+{
+ int i, ni, mi;
+
+ /* First check whether or not we're trying to rename a builtin keymap */
+ mi = _rl_get_keymap_by_map (map);
+ if (mi >= 0 && mi < NUM_BUILTIN_KEYMAPS)
+ return -1;
+
+ /* Then reject attempts to set one of the builtin names to a new map */
+ ni = _rl_get_keymap_by_name (name);
+ if (ni >= 0 && ni < NUM_BUILTIN_KEYMAPS)
+ return -1;
+
+ /* Renaming a keymap we already added */
+ if (mi >= 0) /* XXX - could be >= NUM_BUILTIN_KEYMAPS */
+ {
+ xfree (keymap_names[mi].name);
+ keymap_names[mi].name = savestring (name);
+ return mi;
+ }
+
+ /* Associating new keymap with existing name */
+ if (ni >= 0)
+ {
+ keymap_names[ni].map = map;
+ return ni;
+ }
+
+ for (i = 0; keymap_names[i].name; i++)
+ ;
+
+ if (keymap_names == builtin_keymap_names)
+ {
+ keymap_names = xmalloc ((i + 2) * sizeof (struct name_and_keymap));
+ memcpy (keymap_names, builtin_keymap_names, i * sizeof (struct name_and_keymap));
+ }
+ else
+ keymap_names = xrealloc (keymap_names, (i + 2) * sizeof (struct name_and_keymap));
+
+ keymap_names[i].name = savestring (name);
+ keymap_names[i].map = map;
+
+ keymap_names[i+1].name = NULL;
+ keymap_names[i+1].map = NULL;
+
+ return i;
+}
+
void
-rl_set_keymap (map)
- Keymap map;
+rl_set_keymap (Keymap map)
{
if (map)
_rl_keymap = map;
}
Keymap
-rl_get_keymap ()
+rl_get_keymap (void)
{
return (_rl_keymap);
}
void
-rl_set_keymap_from_edit_mode ()
+rl_set_keymap_from_edit_mode (void)
{
if (rl_editing_mode == emacs_mode)
_rl_keymap = emacs_standard_keymap;
@@ -2118,7 +2397,7 @@ rl_set_keymap_from_edit_mode ()
}
char *
-rl_get_keymap_name_from_edit_mode ()
+rl_get_keymap_name_from_edit_mode (void)
{
if (rl_editing_mode == emacs_mode)
return "emacs";
@@ -2143,7 +2422,7 @@ rl_get_keymap_name_from_edit_mode ()
/* Print the names of functions known to Readline. */
void
-rl_list_funmap_names ()
+rl_list_funmap_names (void)
{
register int i;
const char **funmap_names;
@@ -2160,8 +2439,7 @@ rl_list_funmap_names ()
}
static char *
-_rl_get_keyname (key)
- int key;
+_rl_get_keyname (int key)
{
char *keyname;
int i, c;
@@ -2236,9 +2514,7 @@ _rl_get_keyname (key)
/* Return a NULL terminated array of strings which represent the key
sequences that are used to invoke FUNCTION in MAP. */
char **
-rl_invoking_keyseqs_in_map (function, map)
- rl_command_func_t *function;
- Keymap map;
+rl_invoking_keyseqs_in_map (rl_command_func_t *function, Keymap map)
{
register int key;
char **result;
@@ -2345,8 +2621,7 @@ rl_invoking_keyseqs_in_map (function, map)
/* Return a NULL terminated array of strings which represent the key
sequences that can be used to invoke FUNCTION using the current keymap. */
char **
-rl_invoking_keyseqs (function)
- rl_command_func_t *function;
+rl_invoking_keyseqs (rl_command_func_t *function)
{
return (rl_invoking_keyseqs_in_map (function, _rl_keymap));
}
@@ -2355,8 +2630,7 @@ rl_invoking_keyseqs (function)
PRINT_READABLY is non-zero, then print the output in such a way
that it can be read back in. */
void
-rl_function_dumper (print_readably)
- int print_readably;
+rl_function_dumper (int print_readably)
{
register int i;
const char **names;
@@ -2427,8 +2701,7 @@ rl_function_dumper (print_readably)
rl_outstream. If an explicit argument is given, then print
the output in such a way that it can be read back in. */
int
-rl_dump_functions (count, key)
- int count, key;
+rl_dump_functions (int count, int key)
{
if (rl_dispatching)
fprintf (rl_outstream, "\r\n");
@@ -2438,10 +2711,7 @@ rl_dump_functions (count, key)
}
static void
-_rl_macro_dumper_internal (print_readably, map, prefix)
- int print_readably;
- Keymap map;
- char *prefix;
+_rl_macro_dumper_internal (int print_readably, Keymap map, char *prefix)
{
register int key;
char *keyname, *out;
@@ -2500,15 +2770,13 @@ _rl_macro_dumper_internal (print_readably, map, prefix)
}
void
-rl_macro_dumper (print_readably)
- int print_readably;
+rl_macro_dumper (int print_readably)
{
_rl_macro_dumper_internal (print_readably, _rl_keymap, (char *)NULL);
}
int
-rl_dump_macros (count, key)
- int count, key;
+rl_dump_macros (int count, int key)
{
if (rl_dispatching)
fprintf (rl_outstream, "\r\n");
@@ -2518,8 +2786,7 @@ rl_dump_macros (count, key)
}
static char *
-_rl_get_string_variable_value (name)
- const char *name;
+_rl_get_string_variable_value (const char *name)
{
static char numbuf[32];
char *ret;
@@ -2599,8 +2866,7 @@ _rl_get_string_variable_value (name)
}
void
-rl_variable_dumper (print_readably)
- int print_readably;
+rl_variable_dumper (int print_readably)
{
int i;
char *v;
@@ -2631,8 +2897,7 @@ rl_variable_dumper (print_readably)
rl_outstream. If an explicit argument is given, then print
the output in such a way that it can be read back in. */
int
-rl_dump_variables (count, key)
- int count, key;
+rl_dump_variables (int count, int key)
{
if (rl_dispatching)
fprintf (rl_outstream, "\r\n");
@@ -2643,9 +2908,7 @@ rl_dump_variables (count, key)
/* Return non-zero if any members of ARRAY are a substring in STRING. */
static int
-substring_member_of_array (string, array)
- const char *string;
- const char * const *array;
+substring_member_of_array (const char *string, const char * const *array)
{
while (*array)
{
diff --git a/callback.c b/callback.c
index cc3ce11..a466cf9 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-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2017 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.
@@ -60,7 +60,7 @@ int rl_persistent_signal_handlers = 0;
/* **************************************************************** */
/* */
-/* Callback Readline Functions */
+/* Callback Readline Functions */
/* */
/* **************************************************************** */
@@ -80,7 +80,7 @@ static int in_handler; /* terminal_prepped and signals set? */
/* Make sure the terminal is set up, initialize readline, and prompt. */
static void
-_rl_callback_newline ()
+_rl_callback_newline (void)
{
rl_initialize ();
@@ -103,9 +103,7 @@ _rl_callback_newline ()
/* Install a readline handler, set up the terminal, and issue the prompt. */
void
-rl_callback_handler_install (prompt, linefunc)
- const char *prompt;
- rl_vcpfunc_t *linefunc;
+rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *linefunc)
{
rl_set_prompt (prompt);
RL_SETSTATE (RL_STATE_CALLBACK);
@@ -126,7 +124,7 @@ rl_callback_handler_install (prompt, linefunc)
/* Read one character, and dispatch to the handler if it ends the line. */
void
-rl_callback_read_char ()
+rl_callback_read_char (void)
{
char *line;
int eof, jcode;
@@ -299,7 +297,7 @@ rl_callback_read_char ()
/* Remove the handler, and make sure the terminal is in its normal state. */
void
-rl_callback_handler_remove ()
+rl_callback_handler_remove (void)
{
rl_linefunc = NULL;
RL_UNSETSTATE (RL_STATE_CALLBACK);
@@ -316,8 +314,7 @@ rl_callback_handler_remove ()
}
_rl_callback_generic_arg *
-_rl_callback_data_alloc (count)
- int count;
+_rl_callback_data_alloc (int count)
{
_rl_callback_generic_arg *arg;
@@ -330,15 +327,14 @@ _rl_callback_data_alloc (count)
}
void
-_rl_callback_data_dispose (arg)
- _rl_callback_generic_arg *arg;
+_rl_callback_data_dispose (_rl_callback_generic_arg *arg)
{
xfree (arg);
}
/* Make sure that this agrees with cases in rl_callback_read_char */
void
-rl_callback_sigcleanup ()
+rl_callback_sigcleanup (void)
{
if (RL_ISSTATE (RL_STATE_CALLBACK) == 0)
return;
diff --git a/colors.c b/colors.c
index 7859f5d..53758e0 100644
--- a/colors.c
+++ b/colors.c
@@ -2,7 +2,7 @@
Modified by Chet Ramey for Readline.
- Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012, 2015
+ Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012, 2015, 2017
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -37,6 +37,10 @@
#include "posixstat.h" // stat related macros (S_ISREG, ...)
#include // S_ISUID
+#ifndef S_ISDIR
+# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#endif
+
// strlen()
#if defined (HAVE_STRING_H)
# include
@@ -66,7 +70,8 @@ COLOR_EXT_TYPE *_rl_color_ext_list = 0;
/* Output a color indicator (which may contain nulls). */
void
-_rl_put_indicator (const struct bin_str *ind) {
+_rl_put_indicator (const struct bin_str *ind)
+{
fwrite (ind->string, ind->len, 1, rl_outstream);
}
@@ -183,11 +188,17 @@ _rl_print_color_indicator (const char *f)
{
colored_filetype = C_FILE;
+#if defined (S_ISUID)
if ((mode & S_ISUID) != 0 && is_colored (C_SETUID))
colored_filetype = C_SETUID;
- else if ((mode & S_ISGID) != 0 && is_colored (C_SETGID))
+ else
+#endif
+#if defined (S_ISGID)
+ if ((mode & S_ISGID) != 0 && is_colored (C_SETGID))
colored_filetype = C_SETGID;
- else if (is_colored (C_CAP) && 0) //f->has_capability)
+ else
+#endif
+ if (is_colored (C_CAP) && 0) //f->has_capability)
colored_filetype = C_CAP;
else if ((mode & S_IXUGO) != 0 && is_colored (C_EXEC))
colored_filetype = C_EXEC;
@@ -211,12 +222,16 @@ _rl_print_color_indicator (const char *f)
colored_filetype = C_STICKY;
#endif
}
+#if defined (S_ISLNK)
else if (S_ISLNK (mode))
colored_filetype = C_LINK;
+#endif
else if (S_ISFIFO (mode))
colored_filetype = C_FIFO;
+#if defined (S_ISSOCK)
else if (S_ISSOCK (mode))
colored_filetype = C_SOCK;
+#endif
else if (S_ISBLK (mode))
colored_filetype = C_BLK;
else if (S_ISCHR (mode))
diff --git a/compat.c b/compat.c
index 2af5120..3ade362 100644
--- a/compat.c
+++ b/compat.c
@@ -1,6 +1,6 @@
/* compat.c -- backwards compatibility functions. */
-/* Copyright (C) 2000-2009 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2017 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.
@@ -46,68 +46,61 @@ extern char *rl_filename_completion_function PARAMS((const char *, int));
/* Provide backwards-compatible entry points for old function names. */
void
-free_undo_list ()
+free_undo_list (void)
{
rl_free_undo_list ();
}
int
-maybe_replace_line ()
+maybe_replace_line (void)
{
return rl_maybe_replace_line ();
}
int
-maybe_save_line ()
+maybe_save_line (void)
{
return rl_maybe_save_line ();
}
int
-maybe_unsave_line ()
+maybe_unsave_line (void)
{
return rl_maybe_unsave_line ();
}
int
-ding ()
+ding (void)
{
return rl_ding ();
}
int
-crlf ()
+crlf (void)
{
return rl_crlf ();
}
int
-alphabetic (c)
- int c;
+alphabetic (int c)
{
return rl_alphabetic (c);
}
char **
-completion_matches (s, f)
- const char *s;
- rl_compentry_func_t *f;
+completion_matches (const char *s, rl_compentry_func_t *f)
{
return rl_completion_matches (s, f);
}
char *
-username_completion_function (s, i)
- const char *s;
- int i;
+username_completion_function (const char *s, int i)
{
return rl_username_completion_function (s, i);
}
char *
-filename_completion_function (s, i)
- const char *s;
- int i;
+filename_completion_function (const char *s, int i)
{
return rl_filename_completion_function (s, i);
}
diff --git a/complete.c b/complete.c
index 0a81129..adce0d6 100644
--- a/complete.c
+++ b/complete.c
@@ -1,6 +1,6 @@
/* complete.c -- filename completion for readline. */
-/* Copyright (C) 1987-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2017 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.
@@ -198,15 +198,6 @@ int _rl_completion_prefix_display_length = 0;
matches. If < 0 or > _rl_screenwidth, it is ignored. */
int _rl_completion_columns = -1;
-/* Global variables available to applications using readline. */
-
-#if defined (VISIBLE_STATS)
-/* Non-zero means add an additional character to each filename displayed
- during listing completion iff rl_filename_completion_desired which helps
- to indicate the type of file being listed. */
-int rl_visible_stats = 0;
-#endif /* VISIBLE_STATS */
-
#if defined (COLOR_SUPPORT)
/* Non-zero means to use colors to indicate file type when listing possible
completions. The colors used are taken from $LS_COLORS, if set. */
@@ -227,6 +218,15 @@ int _rl_skip_completed_text = 0;
cycle of possible completions instead of the last. */
int _rl_menu_complete_prefix_first = 0;
+/* Global variables available to applications using readline. */
+
+#if defined (VISIBLE_STATS)
+/* Non-zero means add an additional character to each filename displayed
+ during listing completion iff rl_filename_completion_desired which helps
+ to indicate the type of file being listed. */
+int rl_visible_stats = 0;
+#endif /* VISIBLE_STATS */
+
/* If non-zero, then this is the address of a function to call when
completing on a directory name. The function is called with
the address of a string (the current directory name) as an arg. */
@@ -422,8 +422,7 @@ static int _rl_complete_display_matches_interrupt = 0;
that does the initial simple matching selection algorithm (see
rl_completion_matches ()). The default is to do filename completion. */
int
-rl_complete (ignore, invoking_key)
- int ignore, invoking_key;
+rl_complete (int ignore, int invoking_key)
{
rl_completion_invoking_key = invoking_key;
@@ -441,16 +440,14 @@ rl_complete (ignore, invoking_key)
/* List the possible completions. See description of rl_complete (). */
int
-rl_possible_completions (ignore, invoking_key)
- int ignore, invoking_key;
+rl_possible_completions (int ignore, int invoking_key)
{
rl_completion_invoking_key = invoking_key;
return (rl_complete_internal ('?'));
}
int
-rl_insert_completions (ignore, invoking_key)
- int ignore, invoking_key;
+rl_insert_completions (int ignore, int invoking_key)
{
rl_completion_invoking_key = invoking_key;
return (rl_complete_internal ('*'));
@@ -462,8 +459,7 @@ rl_insert_completions (ignore, invoking_key)
an application-specific completion function to honor the
show-all-if-ambiguous readline variable. */
int
-rl_completion_mode (cfunc)
- rl_command_func_t *cfunc;
+rl_completion_mode (rl_command_func_t *cfunc)
{
if (rl_last_func == cfunc && !completion_changed_buffer)
return '?';
@@ -483,16 +479,14 @@ rl_completion_mode (cfunc)
/* Reset readline state on a signal or other event. */
void
-_rl_reset_completion_state ()
+_rl_reset_completion_state (void)
{
rl_completion_found_quote = 0;
rl_completion_quote_character = 0;
}
static void
-_rl_complete_sigcleanup (sig, ptr)
- int sig;
- void *ptr;
+_rl_complete_sigcleanup (int sig, void *ptr)
{
if (sig == SIGINT) /* XXX - for now */
{
@@ -504,8 +498,7 @@ _rl_complete_sigcleanup (sig, ptr)
/* Set default values for readline word completion. These are the variables
that application completion functions can change or inspect. */
static void
-set_completion_defaults (what_to_do)
- int what_to_do;
+set_completion_defaults (int what_to_do)
{
/* Only the completion entry function can change these. */
rl_filename_completion_desired = 0;
@@ -523,8 +516,7 @@ set_completion_defaults (what_to_do)
/* The user must press "y" or "n". Non-zero return means "y" pressed. */
static int
-get_y_or_n (for_pager)
- int for_pager;
+get_y_or_n (int for_pager)
{
int c;
@@ -557,8 +549,7 @@ get_y_or_n (for_pager)
}
static int
-_rl_internal_pager (lines)
- int lines;
+_rl_internal_pager (int lines)
{
int i;
@@ -575,8 +566,7 @@ _rl_internal_pager (lines)
}
static int
-path_isdir (filename)
- const char *filename;
+path_isdir (const char *filename)
{
struct stat finfo;
@@ -593,8 +583,7 @@ path_isdir (filename)
`%' for character special devices
`#' for block special devices */
static int
-stat_char (filename)
- char *filename;
+stat_char (char *filename)
{
struct stat finfo;
int character, r;
@@ -625,7 +614,10 @@ stat_char (filename)
#endif
if (r == -1)
- return (0);
+ {
+ xfree (f);
+ return (0);
+ }
character = 0;
if (S_ISDIR (finfo.st_mode))
@@ -675,29 +667,28 @@ stat_char (filename)
#if defined (COLOR_SUPPORT)
static int
-colored_stat_start (filename)
- const char *filename;
+colored_stat_start (const char *filename)
{
_rl_set_normal_color ();
return (_rl_print_color_indicator (filename));
}
static void
-colored_stat_end ()
+colored_stat_end (void)
{
_rl_prep_non_filename_text ();
_rl_put_indicator (&_rl_color_indicator[C_CLR_TO_EOL]);
}
static int
-colored_prefix_start ()
+colored_prefix_start (void)
{
_rl_set_normal_color ();
return (_rl_print_prefix_color ());
}
static void
-colored_prefix_end ()
+colored_prefix_end (void)
{
colored_stat_end (); /* for now */
}
@@ -712,8 +703,7 @@ colored_prefix_end ()
for the previous slash and return the portion following that. If
there's no previous slash, we just return what we were passed. */
static char *
-printable_part (pathname)
- char *pathname;
+printable_part (char *pathname)
{
char *temp, *x;
@@ -747,8 +737,7 @@ printable_part (pathname)
/* Compute width of STRING when displayed on screen by print_filename */
static int
-fnwidth (string)
- const char *string;
+fnwidth (const char *string)
{
int width, pos;
#if defined (HANDLE_MULTIBYTE)
@@ -800,10 +789,7 @@ fnwidth (string)
#define ELLIPSIS_LEN 3
static int
-fnprint (to_print, prefix_bytes, real_pathname)
- const char *to_print;
- int prefix_bytes;
- const char *real_pathname;
+fnprint (const char *to_print, int prefix_bytes, const char *real_pathname)
{
int printed_len, w;
const char *s;
@@ -818,6 +804,8 @@ fnprint (to_print, prefix_bytes, real_pathname)
print_len = strlen (to_print);
end = to_print + print_len + 1;
memset (&ps, 0, sizeof (mbstate_t));
+#else
+ print_len = strlen (to_print);
#endif
printed_len = common_prefix_len = 0;
@@ -929,9 +917,7 @@ fnprint (to_print, prefix_bytes, real_pathname)
filenames. Return the number of characters we output. */
static int
-print_filename (to_print, full_pathname, prefix_bytes)
- char *to_print, *full_pathname;
- int prefix_bytes;
+print_filename (char *to_print, char *full_pathname, int prefix_bytes)
{
int printed_len, extension_char, slen, tlen;
char *s, c, *new_full_pathname, *dn;
@@ -988,7 +974,6 @@ print_filename (to_print, full_pathname, prefix_bytes)
slen--;
else
new_full_pathname[slen] = '/';
- new_full_pathname[slen] = '/';
strcpy (new_full_pathname + slen + 1, to_print);
#if defined (VISIBLE_STATS)
@@ -1049,10 +1034,7 @@ print_filename (to_print, full_pathname, prefix_bytes)
}
static char *
-rl_quote_filename (s, rtype, qcp)
- char *s;
- int rtype;
- char *qcp;
+rl_quote_filename (char *s, int rtype, char *qcp)
{
char *r;
@@ -1080,8 +1062,7 @@ rl_quote_filename (s, rtype, qcp)
the value of the delimiter character that caused a word break. */
char
-_rl_find_completion_word (fp, dp)
- int *fp, *dp;
+_rl_find_completion_word (int *fp, int *dp)
{
int scan, end, found_quote, delimiter, pass_next, isbrk;
char quote_char, *brkchars;
@@ -1213,11 +1194,7 @@ _rl_find_completion_word (fp, dp)
}
static char **
-gen_completion_matches (text, start, end, our_func, found_quote, quote_char)
- char *text;
- int start, end;
- rl_compentry_func_t *our_func;
- int found_quote, quote_char;
+gen_completion_matches (char *text, int start, int end, rl_compentry_func_t *our_func, int found_quote, int quote_char)
{
char **matches;
@@ -1261,8 +1238,7 @@ gen_completion_matches (text, start, end, our_func, found_quote, quote_char)
/* Filter out duplicates in MATCHES. This frees up the strings in
MATCHES. */
static char **
-remove_duplicate_matches (matches)
- char **matches;
+remove_duplicate_matches (char **matches)
{
char *lowest_common;
int i, j, newlen;
@@ -1322,10 +1298,7 @@ remove_duplicate_matches (matches)
/* Find the common prefix of the list of matches, and put it into
matches[0]. */
static int
-compute_lcd_of_matches (match_list, matches, text)
- char **match_list;
- int matches;
- const char *text;
+compute_lcd_of_matches (char **match_list, int matches, const char *text)
{
register int i, c1, c2, si;
int low; /* Count of max-matched characters. */
@@ -1451,7 +1424,8 @@ compute_lcd_of_matches (match_list, matches, text)
}
/* sort the list to get consistent answers. */
- qsort (match_list+1, matches, sizeof(char *), (QSFUNC *)_rl_qsort_string_compare);
+ if (rl_sort_completion_matches)
+ qsort (match_list+1, matches, sizeof(char *), (QSFUNC *)_rl_qsort_string_compare);
si = strlen (text);
lx = (si <= low) ? si : low; /* check shorter of text and matches */
@@ -1481,9 +1455,7 @@ compute_lcd_of_matches (match_list, matches, text)
}
static int
-postprocess_matches (matchesp, matching_filenames)
- char ***matchesp;
- int matching_filenames;
+postprocess_matches (char ***matchesp, int matching_filenames)
{
char *t, **matches, **temp_matches;
int nmatch, i;
@@ -1537,7 +1509,7 @@ postprocess_matches (matchesp, matching_filenames)
}
static int
-complete_get_screenwidth ()
+complete_get_screenwidth (void)
{
int cols;
char *envcols;
@@ -1558,9 +1530,7 @@ complete_get_screenwidth ()
of strings, in argv format, LEN is the number of strings in MATCHES,
and MAX is the length of the longest string in MATCHES. */
void
-rl_display_match_list (matches, len, max)
- char **matches;
- int len, max;
+rl_display_match_list (char **matches, int len, int max)
{
int count, limit, printed_len, lines, cols;
int i, j, k, l, common_length, sind;
@@ -1717,8 +1687,7 @@ rl_display_match_list (matches, len, max)
and ask the user if he wants to see the list if there are more matches
than RL_COMPLETION_QUERY_ITEMS. */
static void
-display_matches (matches)
- char **matches;
+display_matches (char **matches)
{
int len, max, i;
char *temp;
@@ -1784,11 +1753,9 @@ display_matches (matches)
rl_display_fixed = 1;
}
+/* qc == pointer to quoting character, if any */
static char *
-make_quoted_replacement (match, mtype, qc)
- char *match;
- int mtype;
- char *qc; /* Pointer to quoting character, if any */
+make_quoted_replacement (char *match, int mtype, char *qc)
{
int should_quote, do_replace;
char *replacement;
@@ -1830,10 +1797,7 @@ make_quoted_replacement (match, mtype, qc)
}
static void
-insert_match (match, start, mtype, qc)
- char *match;
- int start, mtype;
- char *qc;
+insert_match (char *match, int start, int mtype, char *qc)
{
char *replacement, *r;
char oqc;
@@ -1890,9 +1854,7 @@ insert_match (match, start, mtype, qc)
value of _rl_complete_mark_symlink_dirs, but may be modified by an
application's completion function). */
static int
-append_to_match (text, delimiter, quote_char, nontrivial_match)
- char *text;
- int delimiter, quote_char, nontrivial_match;
+append_to_match (char *text, int delimiter, int quote_char, int nontrivial_match)
{
char temp_string[4], *filename, *fn;
int temp_string_index, s;
@@ -1959,10 +1921,7 @@ append_to_match (text, delimiter, quote_char, nontrivial_match)
}
static void
-insert_all_matches (matches, point, qc)
- char **matches;
- int point;
- char *qc;
+insert_all_matches (char **matches, int point, char *qc)
{
int i;
char *rp;
@@ -1998,8 +1957,7 @@ insert_all_matches (matches, point, qc)
}
void
-_rl_free_match_list (matches)
- char **matches;
+_rl_free_match_list (char **matches)
{
register int i;
@@ -2021,17 +1979,14 @@ _rl_free_match_list (matches)
`@' means to do standard completion, and list all possible completions if
there is more than one and partial completion is not possible. */
int
-rl_complete_internal (what_to_do)
- int what_to_do;
+rl_complete_internal (int what_to_do)
{
char **matches;
rl_compentry_func_t *our_func;
int start, end, delimiter, found_quote, i, nontrivial_lcd;
char *text, *saved_line_buffer;
char quote_char;
-#if 1
int tlen, mlen;
-#endif
RL_SETSTATE(RL_STATE_COMPLETING);
@@ -2206,9 +2161,7 @@ rl_complete_internal (what_to_do)
when there are no more matches.
*/
char **
-rl_completion_matches (text, entry_function)
- const char *text;
- rl_compentry_func_t *entry_function;
+rl_completion_matches (const char *text, rl_compentry_func_t *entry_function)
{
register int i;
@@ -2276,9 +2229,7 @@ rl_completion_matches (text, entry_function)
TEXT contains a partial username preceded by a random
character (usually `~'). */
char *
-rl_username_completion_function (text, state)
- const char *text;
- int state;
+rl_username_completion_function (const char *text, int state)
{
#if defined (__WIN32__) || defined (__OPENNT)
return (char *)NULL;
@@ -2340,11 +2291,7 @@ rl_username_completion_function (text, state)
_rl_completion_case_map is set, make `-' and `_' equivalent. CONVFN is
the possibly-converted directory entry; FILENAME is what the user typed. */
static int
-complete_fncmp (convfn, convlen, filename, filename_len)
- const char *convfn;
- int convlen;
- const char *filename;
- int filename_len;
+complete_fncmp (const char *convfn, int convlen, const char *filename, int filename_len)
{
register char *s1, *s2;
int d, len;
@@ -2472,9 +2419,7 @@ complete_fncmp (convfn, convlen, filename, filename_len)
because of all the pathnames that must be followed when looking up the
completion for a command. */
char *
-rl_filename_completion_function (text, state)
- const char *text;
- int state;
+rl_filename_completion_function (const char *text, int state)
{
static DIR *directory = (DIR *)NULL;
static char *filename = (char *)NULL;
@@ -2702,8 +2647,7 @@ rl_filename_completion_function (text, state)
hit the end of the match list, we restore the original unmatched text,
ring the bell, and reset the counter to zero. */
int
-rl_old_menu_complete (count, invoking_key)
- int count, invoking_key;
+rl_old_menu_complete (int count, int invoking_key)
{
rl_compentry_func_t *our_func;
int matching_filenames, found_quote;
@@ -2824,9 +2768,17 @@ rl_old_menu_complete (count, invoking_key)
return (0);
}
+/* The current version of menu completion.
+ The differences between this function and the original are:
+
+1. It honors the maximum number of completions variable (completion-query-items)
+2. It appends to the word as usual if there is only one match
+3. It displays the common prefix if there is one, and makes it the first menu
+ choice if the menu-complete-display-prefix option is enabled
+*/
+
int
-rl_menu_complete (count, ignore)
- int count, ignore;
+rl_menu_complete (int count, int ignore)
{
rl_compentry_func_t *our_func;
int matching_filenames, found_quote;
@@ -2998,8 +2950,7 @@ rl_menu_complete (count, ignore)
}
int
-rl_backward_menu_complete (count, key)
- int count, key;
+rl_backward_menu_complete (int count, int key)
{
/* Positive arguments to backward-menu-complete translate into negative
arguments for menu-complete, and vice versa. */
diff --git a/config.h.in b/config.h.in
index d03ebe0..6de47b5 100644
--- a/config.h.in
+++ b/config.h.in
@@ -46,6 +46,9 @@
/* Define if you have the fcntl function. */
#undef HAVE_FCNTL
+/* Define if you have the fnmatch function. */
+#undef HAVE_FNMATCH
+
/* Define if you have the getpwent function. */
#undef HAVE_GETPWENT
diff --git a/configure b/configure
index aa98bce..c9b7ade 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
#! /bin/sh
-# From configure.ac for Readline 7.0, version 2.81.
+# From configure.ac for Readline 8.0, version 2.85.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for readline 7.0.
+# Generated by GNU Autoconf 2.69 for readline 8.0.
#
# Report bugs to .
#
@@ -581,8 +581,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='readline'
PACKAGE_TARNAME='readline'
-PACKAGE_VERSION='7.0'
-PACKAGE_STRING='readline 7.0'
+PACKAGE_VERSION='8.0'
+PACKAGE_STRING='readline 8.0'
PACKAGE_BUGREPORT='bug-readline@gnu.org'
PACKAGE_URL=''
@@ -624,6 +624,7 @@ ac_includes_default="\
#endif"
ac_subst_vars='LTLIBOBJS
+TERMCAP_PKG_CONFIG_LIB
TERMCAP_LIB
LIBVERSION
ARFLAGS
@@ -631,6 +632,7 @@ LOCAL_DEFS
LOCAL_LDFLAGS
LOCAL_CFLAGS
BUILD_DIR
+EXAMPLES_INSTALL_TARGET
SHARED_INSTALL_TARGET
STATIC_INSTALL_TARGET
SHARED_TARGET
@@ -724,6 +726,7 @@ with_curses
enable_multibyte
enable_shared
enable_static
+enable_install_examples
enable_largefile
'
ac_precious_vars='build_alias
@@ -1275,7 +1278,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 7.0 to adapt to many kinds of systems.
+\`configure' configures readline 8.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1340,7 +1343,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of readline 7.0:";;
+ short | recursive ) echo "Configuration of readline 8.0:";;
esac
cat <<\_ACEOF
@@ -1351,6 +1354,8 @@ Optional Features:
--enable-multibyte enable multibyte characters if OS supports them
--enable-shared build shared libraries [[default=YES]]
--enable-static build static libraries [[default=YES]]
+ --disable-install-examples
+ don't install examples [[default=install]]
--disable-largefile omit support for large files
Optional Packages:
@@ -1435,7 +1440,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-readline configure 7.0
+readline configure 8.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1900,11 +1905,194 @@ $as_echo "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_decl
+
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=$ac_mid; break
+else
+ as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_lo=$ac_mid; break
+else
+ as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=$ac_mid
+else
+ as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include
+#include
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (($2) < 0)
+ {
+ long int i = longval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ echo >>conftest.val; read $3 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 7.0, which was
+It was created by readline $as_me 8.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2288,7 +2476,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
ac_config_headers="$ac_config_headers config.h"
-LIBVERSION=7.0
+LIBVERSION=8.0
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
@@ -2379,6 +2567,7 @@ fi
opt_multibyte=yes
opt_static_libs=yes
opt_shared_libs=yes
+opt_install_examples=yes
# Check whether --enable-multibyte was given.
if test "${enable_multibyte+set}" = set; then :
@@ -2395,6 +2584,11 @@ if test "${enable_static+set}" = set; then :
enableval=$enable_static; opt_static_libs=$enableval
fi
+# Check whether --enable-install-examples was given.
+if test "${enable_install_examples+set}" = set; then :
+ enableval=$enable_install_examples; opt_install_examples=$enableval
+fi
+
if test $opt_multibyte = no; then
$as_echo "#define NO_MULTIBYTE_SUPPORT 1" >>confdefs.h
@@ -4590,7 +4784,7 @@ _ACEOF
fi
done
-for ac_func in memmove pselect putenv select setenv setlocale \
+for ac_func in fnmatch memmove pselect putenv select setenv setlocale \
strcasecmp strpbrk tcgetattr vsnprintf
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -5129,7 +5323,7 @@ else
typedef RETSIGTYPE sigfunc();
-int nsigint;
+volatile int nsigint;
#ifdef HAVE_POSIX_SIGNALS
sigfunc *
@@ -6060,6 +6254,45 @@ fi
$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then :
bash_cv_termcap_lib=libncurses
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5
+$as_echo_n "checking for tgetent in -lncursesw... " >&6; }
+if ${ac_cv_lib_ncursesw_tgetent+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lncursesw $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tgetent ();
+int
+main ()
+{
+return tgetent ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_ncursesw_tgetent=yes
+else
+ ac_cv_lib_ncursesw_tgetent=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5
+$as_echo "$ac_cv_lib_ncursesw_tgetent" >&6; }
+if test "x$ac_cv_lib_ncursesw_tgetent" = xyes; then :
+ bash_cv_termcap_lib=libncursesw
else
bash_cv_termcap_lib=gnutermcap
fi
@@ -6074,6 +6307,8 @@ fi
fi
+fi
+
if test "X$_bash_needmsg" = "Xyes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
$as_echo_n "checking which library has the termcap functions... " >&6; }
@@ -6124,6 +6359,14 @@ done
fi
+case "$TERMCAP_LIB" in
+-ltinfo) TERMCAP_PKG_CONFIG_LIB=tinfo ;;
+-lcurses) TERMCAP_PKG_CONFIG_LIB=ncurses ;;
+-lncurses) TERMCAP_PKG_CONFIG_LIB=ncurses ;;
+-ltermcap) TERMCAP_PKG_CONFIG_LIB=termcap ;;
+*) TERMCAP_PKG_CONFIG_LIB=termcap ;;
+esac
+
for ac_header in wctype.h
do :
@@ -6521,6 +6764,40 @@ done
LIBS="$OLDLIBS"
fi
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
+$as_echo_n "checking size of wchar_t... " >&6; }
+if ${ac_cv_sizeof_wchar_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_wchar_t" = 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 77 "cannot compute sizeof (wchar_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_wchar_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
+$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
+_ACEOF
+
+
+
case "$host_cpu" in
@@ -6593,6 +6870,11 @@ fi
+if test "$opt_install_examples" = "yes"; then
+ EXAMPLES_INSTALL_TARGET=install-examples
+fi
+
+
case "$build_os" in
msdosdjgpp*) BUILD_DIR=`pwd.exe` ;; # to prevent //d/path/file
*) BUILD_DIR=`pwd` ;;
@@ -6620,6 +6902,7 @@ esac
+
ac_config_files="$ac_config_files Makefile doc/Makefile examples/Makefile shlib/Makefile readline.pc"
ac_config_commands="$ac_config_commands default"
@@ -7130,7 +7413,7 @@ 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 7.0, which was
+This file was extended by readline $as_me 8.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7196,7 +7479,7 @@ _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 7.0
+readline config.status 8.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index f81809b..b73e37b 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-2016 Free Software Foundation, Inc.
+# Copyright (C) 1987-2018 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 7.0, version 2.81])
+AC_REVISION([for Readline 8.0, version 2.85])
-AC_INIT(readline, 7.0, bug-readline@gnu.org)
+AC_INIT(readline, 8.0, bug-readline@gnu.org)
dnl make sure we are using a recent autoconf version
AC_PREREQ(2.50)
@@ -32,7 +32,7 @@ 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=7.0
+LIBVERSION=8.0
AC_CANONICAL_HOST
AC_CANONICAL_BUILD
@@ -51,10 +51,12 @@ dnl option parsing for optional features
opt_multibyte=yes
opt_static_libs=yes
opt_shared_libs=yes
+opt_install_examples=yes
AC_ARG_ENABLE(multibyte, AC_HELP_STRING([--enable-multibyte], [enable multibyte characters if OS supports them]), opt_multibyte=$enableval)
AC_ARG_ENABLE(shared, AC_HELP_STRING([--enable-shared], [build shared libraries [[default=YES]]]), opt_shared_libs=$enableval)
AC_ARG_ENABLE(static, AC_HELP_STRING([--enable-static], [build static libraries [[default=YES]]]), opt_static_libs=$enableval)
+AC_ARG_ENABLE(install-examples, AC_HELP_STRING([--disable-install-examples], [don't install examples [[default=install]]]), opt_install_examples=$enableval)
if test $opt_multibyte = no; then
AC_DEFINE(NO_MULTIBYTE_SUPPORT)
@@ -132,7 +134,7 @@ AC_HEADER_STAT
AC_HEADER_DIRENT
AC_CHECK_FUNCS(fcntl kill lstat readlink)
-AC_CHECK_FUNCS(memmove pselect putenv select setenv setlocale \
+AC_CHECK_FUNCS(fnmatch memmove pselect putenv select setenv setlocale \
strcasecmp strpbrk tcgetattr vsnprintf)
AC_CHECK_FUNCS(isascii isxdigit)
AC_CHECK_FUNCS(getpwent getpwnam getpwuid)
@@ -196,6 +198,14 @@ if test "$TERMCAP_LIB" = "-lncurses"; then
AC_CHECK_HEADERS(ncurses/termcap.h)
fi
+case "$TERMCAP_LIB" in
+-ltinfo) TERMCAP_PKG_CONFIG_LIB=tinfo ;;
+-lcurses) TERMCAP_PKG_CONFIG_LIB=ncurses ;;
+-lncurses) TERMCAP_PKG_CONFIG_LIB=ncurses ;;
+-ltermcap) TERMCAP_PKG_CONFIG_LIB=termcap ;;
+*) TERMCAP_PKG_CONFIG_LIB=termcap ;;
+esac
+
BASH_CHECK_MULTIBYTE
case "$host_cpu" in
@@ -266,6 +276,11 @@ AC_SUBST(SHARED_TARGET)
AC_SUBST(STATIC_INSTALL_TARGET)
AC_SUBST(SHARED_INSTALL_TARGET)
+if test "$opt_install_examples" = "yes"; then
+ EXAMPLES_INSTALL_TARGET=install-examples
+fi
+AC_SUBST(EXAMPLES_INSTALL_TARGET)
+
case "$build_os" in
msdosdjgpp*) BUILD_DIR=`pwd.exe` ;; # to prevent //d/path/file
*) BUILD_DIR=`pwd` ;;
@@ -292,6 +307,7 @@ AC_SUBST(host_os)
AC_SUBST(LIBVERSION)
AC_SUBST(TERMCAP_LIB)
+AC_SUBST(TERMCAP_PKG_CONFIG_LIB)
AC_OUTPUT([Makefile doc/Makefile examples/Makefile shlib/Makefile readline.pc],
[
diff --git a/display.c b/display.c
index 2d2e768..4c6cc00 100644
--- a/display.c
+++ b/display.c
@@ -1,6 +1,6 @@
/* display.c -- readline redisplay facility. */
-/* Copyright (C) 1987-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2017 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.
@@ -124,7 +124,6 @@ static int _rl_col_width PARAMS((const char *, int, int, int));
#define PROMPT_ENDING_INDEX \
((MB_CUR_MAX > 1 && rl_byte_oriented == 0) ? prompt_physical_chars : prompt_last_invisible+1)
-
/* **************************************************************** */
/* */
/* Display stuff */
@@ -159,9 +158,6 @@ rl_voidfunc_t *rl_redisplay_function = rl_redisplay;
/* What YOU turn on when you have handled all redisplay yourself. */
int rl_display_fixed = 0;
-int _rl_suppress_redisplay = 0;
-int _rl_want_redisplay = 0;
-
/* The stuff that gets printed out before the actual text of the line.
This is usually pointing to rl_prompt. */
char *rl_display_prompt = (char *)NULL;
@@ -178,6 +174,10 @@ int _rl_vi_cmd_modestr_len;
/* Pseudo-global variables declared here. */
+/* Hints for other parts of readline to give to the display engine. */
+int _rl_suppress_redisplay = 0;
+int _rl_want_redisplay = 0;
+
/* The visible cursor position. If you print some text, adjust this. */
/* NOTE: _rl_last_c_pos is used as a buffer index when not in a locale
supporting multibyte characters, and an absolute cursor position when
@@ -186,14 +186,24 @@ int _rl_vi_cmd_modestr_len;
int _rl_last_c_pos = 0;
int _rl_last_v_pos = 0;
+/* Number of physical lines consumed by the current line buffer currently
+ on screen minus 1. */
+int _rl_vis_botlin = 0;
+
+/* This is a hint update_line gives to rl_redisplay that it has adjusted the
+ value of _rl_last_c_pos *and* taken the presence of any invisible chars in
+ the prompt into account. rl_redisplay notes this and does not do the
+ adjustment itself. */
static int cpos_adjusted;
+
+/* The index into the line buffer corresponding to the cursor position */
static int cpos_buffer_position;
+
+/* A flag to note when we're displaying the first line of the prompt */
static int displaying_prompt_first_line;
+/* The number of multibyte characters in the prompt, if any */
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. */
@@ -216,7 +226,11 @@ static int line_size = 1024;
static char *local_prompt, *local_prompt_prefix;
static int local_prompt_len;
-static int prompt_visible_length, prompt_prefix_length;
+static int prompt_prefix_length;
+/* Number of chars in the buffer that contribute to visible chars on the screen.
+ This might be different from the number of physical chars in the presence
+ of multibyte characters */
+static int prompt_visible_length;
/* The number of invisible characters in the line currently being
displayed on the screen. */
@@ -242,16 +256,26 @@ static int prompt_last_screen_line;
static int prompt_physical_chars;
+/* An array of indexes into the prompt string where we will break physical
+ screen lines. It's easier to compute in expand_prompt and use later in
+ rl_redisplay instead of having rl_redisplay try to guess about invisible
+ characters in the prompt or use heuristics about where they are. */
+static int *local_prompt_newlines;
+
/* set to a non-zero value by rl_redisplay if we are marking modified history
lines and the current line is so marked. */
static int modmark;
+static int line_totbytes;
+
/* Variables to save and restore prompt and display information. */
/* These are getting numerous enough that it's time to create a struct. */
static char *saved_local_prompt;
static char *saved_local_prefix;
+static int *saved_local_prompt_newlines;
+
static int saved_last_invisible;
static int saved_visible_length;
static int saved_prefix_length;
@@ -262,8 +286,7 @@ static int saved_physical_chars;
/* Return a string indicating the editing mode, for use in the prompt. */
static char *
-prompt_modestr (lenp)
- int *lenp;
+prompt_modestr (int *lenp)
{
if (rl_editing_mode == emacs_mode)
{
@@ -291,7 +314,8 @@ prompt_modestr (lenp)
index of the last invisible character in the returned string. NIFLP,
if non-zero, is a place to store the number of invisible characters in
the first prompt line. The previous are used as byte counts -- indexes
- into a character buffer. */
+ into a character buffer. *VLP gets the number of physical characters in
+ the expanded prompt (visible length) */
/* Current implementation:
\001 (^A) start non-visible characters
@@ -304,15 +328,16 @@ prompt_modestr (lenp)
PMT_MULTILINE caller indicates that this is part of a multiline prompt
*/
+/* This approximates the number of lines the prompt will take when displayed */
+#define APPROX_DIV(n, d) (((n) < (d)) ? 1 : ((n) / (d)) + 1)
+
static char *
-expand_prompt (pmt, flags, lp, lip, niflp, vlp)
- char *pmt;
- int flags;
- int *lp, *lip, *niflp, *vlp;
+expand_prompt (char *pmt, int flags, int *lp, int *lip, int *niflp, int *vlp)
{
char *r, *ret, *p, *igstart, *nprompt, *ms;
int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars;
- int mlen;
+ int mlen, newlines, newlines_guess, bound;
+ int mb_cur_max;
/* We only expand the mode string for the last line of a multiline prompt
(a prompt with embedded newlines). */
@@ -327,29 +352,54 @@ expand_prompt (pmt, flags, lp, lip, niflp, vlp)
else
nprompt = pmt;
- /* Short-circuit if we can. */
- if ((MB_CUR_MAX <= 1 || rl_byte_oriented) && strchr (nprompt, RL_PROMPT_START_IGNORE) == 0)
+ mb_cur_max = MB_CUR_MAX;
+
+ if (_rl_screenwidth == 0)
+ _rl_get_screen_size (0, 0); /* avoid division by zero */
+
+ /* Short-circuit if we can. We can do this if we are treating the prompt as
+ a sequence of bytes and there are no invisible characters in the prompt
+ to deal with. Since we populate local_prompt_newlines, we have to run
+ through the rest of the function if this prompt looks like it's going to
+ be longer than one screen line. */
+ if ((mb_cur_max <= 1 || rl_byte_oriented) && strchr (nprompt, RL_PROMPT_START_IGNORE) == 0)
{
- r = (nprompt == pmt) ? savestring (pmt) : nprompt;
+ l = strlen (nprompt);
+ if (l < (_rl_screenwidth > 0 ? _rl_screenwidth : 80))
+ {
+ r = (nprompt == pmt) ? savestring (pmt) : nprompt;
+ if (lp)
+ *lp = l;
+ if (lip)
+ *lip = 0;
+ if (niflp)
+ *niflp = 0;
+ if (vlp)
+ *vlp = l;
+
+ local_prompt_newlines = (int *) xrealloc (local_prompt_newlines, sizeof (int) * 2);
+ local_prompt_newlines[0] = 0;
+ local_prompt_newlines[1] = -1;
- if (lp)
- *lp = strlen (r);
- if (lip)
- *lip = 0;
- if (niflp)
- *niflp = 0;
- if (vlp)
- *vlp = lp ? *lp : strlen (r);
- return r;
+ return r;
+ }
}
l = strlen (nprompt); /* XXX */
r = ret = (char *)xmalloc (l + 1);
+ /* Guess at how many screen lines the prompt will take to size the array that
+ keeps track of where the line wraps happen */
+ newlines_guess = (_rl_screenwidth > 0) ? APPROX_DIV(l, _rl_screenwidth) : APPROX_DIV(l, 80);
+ local_prompt_newlines = (int *) xrealloc (local_prompt_newlines, sizeof (int) * (newlines_guess + 1));
+ local_prompt_newlines[newlines = 0] = 0;
+ for (rl = 1; rl <= newlines_guess; rl++)
+ local_prompt_newlines[rl] = -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;
+ invfl = 0; /* invisible chars in first line of prompt */
+ invflset = 0; /* we only want to set invfl once */
+ igstart = 0; /* we're not ignoring any characters yet */
for (ignoring = last = ninvis = 0, p = nprompt; p && *p; p++)
{
@@ -371,7 +421,7 @@ expand_prompt (pmt, flags, lp, lip, niflp, vlp)
else
{
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
{
pind = p - nprompt;
ind = _rl_find_next_mbchar (nprompt, pind, 1, MB_FIND_NONZERO);
@@ -405,11 +455,29 @@ expand_prompt (pmt, flags, lp, lip, niflp, vlp)
ninvis++; /* invisible chars byte counter */
}
- if (invflset == 0 && rl >= _rl_screenwidth)
+ if (invflset == 0 && physchars >= _rl_screenwidth)
{
invfl = ninvis;
invflset = 1;
}
+
+ if (physchars >= (bound = (newlines + 1) * _rl_screenwidth) && local_prompt_newlines[newlines+1] == -1)
+ {
+ int new;
+ if (physchars > bound) /* should rarely happen */
+ {
+#if defined (HANDLE_MULTIBYTE)
+ *r = '\0'; /* need null-termination for strlen */
+ if (mb_cur_max > 1 && rl_byte_oriented == 0)
+ new = _rl_find_prev_mbchar (ret, r - ret, MB_FIND_ANY);
+ else
+#endif
+ new = r - ret - (physchars - bound); /* XXX */
+ }
+ else
+ new = r - ret;
+ local_prompt_newlines[++newlines] = new;
+ }
}
}
@@ -435,8 +503,7 @@ expand_prompt (pmt, flags, lp, lip, niflp, vlp)
/* Just strip out RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE from
PMT and return the rest of PMT. */
char *
-_rl_strip_prompt (pmt)
- char *pmt;
+_rl_strip_prompt (char *pmt)
{
char *ret;
@@ -445,7 +512,7 @@ _rl_strip_prompt (pmt)
}
void
-_rl_reset_prompt ()
+_rl_reset_prompt (void)
{
rl_visible_prompt_length = rl_expand_prompt (rl_prompt);
}
@@ -461,15 +528,20 @@ _rl_reset_prompt ()
* prompt_visible_length = number of visible characters in local_prompt
* prompt_prefix_length = number of visible characters in local_prompt_prefix
*
+ * It also tries to keep track of the number of invisible characters in the
+ * prompt string, and where they are.
+ *
* This function is called once per call to readline(). It may also be
* called arbitrarily to expand the primary prompt.
*
* The return value is the number of visible characters on the last line
- * of the (possibly multi-line) prompt.
+ * of the (possibly multi-line) prompt. In this case, multi-line means
+ * there are embedded newlines in the prompt string itself, not that the
+ * number of physical characters exceeds the screen width and the prompt
+ * wraps.
*/
int
-rl_expand_prompt (prompt)
- char *prompt;
+rl_expand_prompt (char *prompt)
{
char *p, *t;
int c;
@@ -527,8 +599,7 @@ rl_expand_prompt (prompt)
increased. If the lines have already been allocated, this ensures that
they can hold at least MINSIZE characters. */
static void
-init_line_structures (minsize)
- int minsize;
+init_line_structures (int minsize)
{
register int n;
@@ -575,9 +646,9 @@ init_line_structures (minsize)
line_structures_initialized = 1;
}
-/* Basic redisplay algorithm. */
+/* Basic redisplay algorithm. See comments inline. */
void
-rl_redisplay ()
+rl_redisplay (void)
{
register int in, out, c, linenum, cursor_linenum;
register char *line;
@@ -638,6 +709,10 @@ rl_redisplay ()
one passed to readline()), use the values we have already expanded.
If not, use what's already in rl_display_prompt. WRAP_OFFSET is the
number of non-visible characters in the prompt string. */
+ /* This is where we output the characters in the prompt before the last
+ newline, if any. If there aren't any embedded newlines, we don't
+ write anything. Copy the last line of the prompt string into the line in
+ any case */
if (rl_display_prompt == rl_prompt || local_prompt)
{
if (local_prompt_prefix && forced_display)
@@ -692,6 +767,7 @@ rl_redisplay ()
wrap_offset = prompt_invis_chars_first_line = 0;
}
+#if defined (HANDLE_MULTIBYTE)
#define CHECK_INV_LBREAKS() \
do { \
if (newlines >= (inv_lbsize - 2)) \
@@ -699,7 +775,22 @@ rl_redisplay ()
inv_lbsize *= 2; \
inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
} \
+ if (newlines >= (line_state_invisible->wbsize - 2)) \
+ { \
+ line_state_invisible->wbsize *= 2; \
+ line_state_invisible->wrapped_line = (int *)xrealloc (line_state_invisible->wrapped_line, line_state_invisible->wbsize * sizeof(int)); \
+ } \
} while (0)
+#else
+#define CHECK_INV_LBREAKS() \
+ do { \
+ if (newlines >= (inv_lbsize - 2)) \
+ { \
+ inv_lbsize *= 2; \
+ inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
+ } \
+ } while (0)
+#endif /* !HANDLE_MULTIBYTE */
#if defined (HANDLE_MULTIBYTE)
#define CHECK_LPOS() \
@@ -713,7 +804,7 @@ rl_redisplay ()
inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
} \
inv_lbreaks[++newlines] = out; \
- if (newlines >= (line_state_invisible->wbsize - 1)) \
+ if (newlines >= (line_state_invisible->wbsize - 2)) \
{ \
line_state_invisible->wbsize *= 2; \
line_state_invisible->wrapped_line = (int *)xrealloc (line_state_invisible->wrapped_line, line_state_invisible->wbsize * sizeof(int)); \
@@ -742,7 +833,10 @@ 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 */
+ number of invisible characters in the prompt, per line. We compute
+ the line breaks in the prompt string in expand_prompt, taking invisible
+ characters into account, and if lpos exceeds the screen width, we copy
+ the data in the loop below. */
lpos = prompt_physical_chars + modmark;
#if defined (HANDLE_MULTIBYTE)
@@ -752,92 +846,38 @@ rl_redisplay ()
/* prompt_invis_chars_first_line is the number of invisible characters in
the first physical line of the prompt.
- wrap_offset - prompt_invis_chars_first_line is the number of invis
- chars on the second (or, more generally, last) line. */
+ wrap_offset - prompt_invis_chars_first_line is usually the number of
+ invis chars on the second (or, more generally, last) line. */
/* This is zero-based, used to set the newlines */
prompt_lines_estimate = lpos / _rl_screenwidth;
/* what if lpos is already >= _rl_screenwidth before we start drawing the
contents of the command line? */
- while (lpos >= _rl_screenwidth)
- {
- 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)
- : 0);
-
- /* 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
- saying how many invisible characters there are per line, but that's
- probably too much work for the benefit gained. How many people have
- 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)
- {
- nocorrect = 1;
- n0 = num;
- temp = local_prompt_len;
- while (num < temp)
- {
- /* 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)
- {
- /* 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;
- }
- else
-#endif /* !HANDLE_MULTIBYTE */
- temp = ((newlines + 1) * _rl_screenwidth);
+ if (lpos >= _rl_screenwidth)
+ {
+ temp = 0;
- /* 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. */
- if (nocorrect == 0)
- temp += wadjust;
+ /* first copy the linebreaks array we computed in expand_prompt */
+ while (local_prompt_newlines[newlines+1] != -1)
+ {
+ temp = local_prompt_newlines[newlines+1];
+ inv_lbreaks[++newlines] = temp;
+ }
- inv_lbreaks[++newlines] = temp;
-#if defined (HANDLE_MULTIBYTE)
- /* lpos is a physical cursor position, so it needs to take the invisible
- characters into account. */
+ /* Now set lpos from the last newline */
if (mb_cur_max > 1 && rl_byte_oriented == 0 && prompt_multibyte_chars > 0)
- lpos -= _rl_col_width (local_prompt, n0, num, 1) - wadjust;
+ lpos = _rl_col_width (local_prompt, temp, local_prompt_len, 1) - (wrap_offset - prompt_invis_chars_first_line);
else
-#endif
- lpos -= _rl_screenwidth; /* all physical cursor positions */
+ lpos -= (_rl_screenwidth * newlines);
}
prompt_last_screen_line = newlines;
/* Draw the rest of the line (after the prompt) into invisible_line, keeping
- track of where the cursor is (cpos_buffer_position), the number of the line containing
- the cursor (lb_linenum), the last line number (lb_botlin and inv_botlin).
+ track of where the cursor is (cpos_buffer_position), the number of the
+ line containing the cursor (lb_linenum), the last line number (lb_botlin
+ and inv_botlin).
It maintains an array of line breaks for display (inv_lbreaks).
This handles expanding tabs for display and displaying meta characters. */
lb_linenum = 0;
@@ -846,8 +886,13 @@ rl_redisplay ()
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 */
- wc_bytes = mbrtowc (&wc, rl_line_buffer, rl_end, &ps);
+ if (_rl_utf8locale && UTF8_SINGLEBYTE(rl_line_buffer[0]))
+ {
+ wc = (wchar_t)rl_line_buffer[0];
+ wc_bytes = 1;
+ }
+ else
+ wc_bytes = mbrtowc (&wc, rl_line_buffer, rl_end, &ps);
}
else
wc_bytes = 1;
@@ -909,6 +954,9 @@ rl_redisplay ()
temp = _rl_screenwidth - lpos;
CHECK_INV_LBREAKS ();
inv_lbreaks[++newlines] = out + temp;
+#if defined (HANDLE_MULTIBYTE)
+ line_state_invisible->wrapped_line[newlines] = _rl_wrapped_multicolumn;
+#endif
lpos = 4 - temp;
}
else
@@ -939,6 +987,9 @@ rl_redisplay ()
temp2 = _rl_screenwidth - lpos;
CHECK_INV_LBREAKS ();
inv_lbreaks[++newlines] = out + temp2;
+#if defined (HANDLE_MULTIBYTE)
+ line_state_invisible->wrapped_line[newlines] = _rl_wrapped_multicolumn;
+#endif
lpos = temp - temp2;
while (out < newout)
line[out++] = ' ';
@@ -956,6 +1007,9 @@ rl_redisplay ()
line[out++] = '\0'; /* XXX - sentinel */
CHECK_INV_LBREAKS ();
inv_lbreaks[++newlines] = out;
+#if defined (HANDLE_MULTIBYTE)
+ line_state_invisible->wrapped_line[newlines] = _rl_wrapped_multicolumn;
+#endif
lpos = 0;
}
else if (CTRL_CHAR (c) || c == RUBOUT)
@@ -1007,15 +1061,21 @@ rl_redisplay ()
if (mb_cur_max > 1 && rl_byte_oriented == 0)
{
in += wc_bytes;
- /* XXX - what if wc_bytes ends up <= 0? check for MB_INVALIDCH */
- wc_bytes = mbrtowc (&wc, rl_line_buffer + in, rl_end - in, &ps);
+ if (_rl_utf8locale && UTF8_SINGLEBYTE(rl_line_buffer[in]))
+ {
+ wc = (wchar_t)rl_line_buffer[in];
+ wc_bytes = 1;
+ memset (&ps, 0, sizeof (mbstate_t)); /* re-init state */
+ }
+ else
+ wc_bytes = mbrtowc (&wc, rl_line_buffer + in, rl_end - in, &ps);
}
else
in++;
#endif
-
}
line[out] = '\0';
+ line_totbytes = out;
if (cpos_buffer_position < 0)
{
cpos_buffer_position = out;
@@ -1025,6 +1085,10 @@ rl_redisplay ()
inv_botlin = lb_botlin = _rl_inv_botlin = newlines;
CHECK_INV_LBREAKS ();
inv_lbreaks[newlines+1] = out;
+#if defined (HANDLE_MULTIBYTE)
+ /* This should be 0 anyway */
+ line_state_invisible->wrapped_line[newlines+1] = _rl_wrapped_multicolumn;
+#endif
cursor_linenum = lb_linenum;
/* CPOS_BUFFER_POSITION == position in buffer where cursor should be placed.
@@ -1092,8 +1156,8 @@ rl_redisplay ()
/* update_line potentially changes _rl_last_c_pos, but doesn't
take invisible characters into account, since _rl_last_c_pos
- is an absolute cursor position in a multibyte locale. See
- if compensating here is the right thing, or if we have to
+ is an absolute cursor position in a multibyte locale. We
+ choose to (mostly) compensate for that here, rather than
change update_line itself. There are several cases in which
update_line adjusts _rl_last_c_pos itself (so it can pass
_rl_move_cursor_relative accurate values); it communicates
@@ -1104,11 +1168,16 @@ rl_redisplay ()
wrap_offset. */
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 &&
+ else if (cpos_adjusted == 0 &&
+ linenum == prompt_last_screen_line &&
+ prompt_physical_chars > _rl_screenwidth &&
(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 > (prompt_last_invisible - _rl_screenwidth - prompt_invis_chars_first_line)) /* XXX - rethink this last one */
+ /* This assumes that all the invisible characters are split
+ between the first and last lines of the prompt, if the
+ prompt consumes more than two lines. It's usually right */
+ /* XXX - not sure this is ever executed */
_rl_last_c_pos -= (wrap_offset-prompt_invis_chars_first_line);
/* If this is the line with the prompt, we might need to
@@ -1178,6 +1247,9 @@ rl_redisplay ()
_rl_last_c_pos += wrap_offset;
}
+ /* Now we move the cursor to where it needs to be. First, make
+ sure we are on the correct line (cursor_linenum). */
+
/* We have to reprint the prompt if it contains invisible
characters, since it's not generally OK to just reprint
the characters from the current cursor position. But we
@@ -1219,9 +1291,10 @@ rl_redisplay ()
position that doesn't take invisible characters in the prompt
into account. We use a fudge factor to compensate. */
- /* Since _rl_backspace() doesn't know about invisible characters in the
- prompt, and there's no good way to tell it, we compensate for
- those characters here and call _rl_backspace() directly. */
+ /* Since _rl_backspace() doesn't know about invisible characters in
+ the prompt, and there's no good way to tell it, we compensate for
+ those characters here and call _rl_backspace() directly if
+ necessary */
if (wrap_offset && cursor_linenum == 0 && nleft < _rl_last_c_pos)
{
/* TX == new physical cursor position in multibyte locale. */
@@ -1246,7 +1319,7 @@ rl_redisplay ()
_rl_move_cursor_relative (nleft, &invisible_line[pos]);
}
}
- else /* Do horizontal scrolling. */
+ else /* Do horizontal scrolling. Much simpler */
{
#define M_OFFSET(margin, offset) ((margin) == 0 ? offset : 0)
int lmargin, ndisp, nleft, phys_c_pos, t;
@@ -1306,7 +1379,7 @@ rl_redisplay ()
right edge of the screen. If LMARGIN is 0, we need to take the
wrap offset into account. */
t = lmargin + M_OFFSET (lmargin, wrap_offset) + _rl_screenwidth;
- if (t < out)
+ if (t > 0 && t < out)
line[t - 1] = '>';
if (rl_display_fixed == 0 || forced_display || lmargin != last_lmargin)
@@ -1384,9 +1457,7 @@ new: eddie> Oh, my little buggy says to me, as lurgid as
Could be made even smarter, but this works well enough */
static void
-update_line (old, new, current_line, omax, nmax, inv_botlin)
- register char *old, *new;
- int current_line, omax, nmax, inv_botlin;
+update_line (char *old, char *new, int current_line, int omax, int nmax, int inv_botlin)
{
register char *ofd, *ols, *oe, *nfd, *nls, *ne;
int temp, lendiff, wsatend, od, nd, twidth, o_cpos;
@@ -1411,52 +1482,145 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
if (temp == _rl_screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode
&& _rl_last_v_pos == current_line - 1)
{
+ /* We're going to wrap around by writing the first character of NEW to
+ the screen and dealing with changes to what's visible by modifying
+ OLD to match it. Complicated by the presence of multi-width
+ characters at the end of the line or beginning of the new one. */
+ /* old is always somewhere in visible_line; new is always somewhere in
+ invisible_line. These should always be null-terminated. */
#if defined (HANDLE_MULTIBYTE)
if (mb_cur_max > 1 && rl_byte_oriented == 0)
{
wchar_t wc;
mbstate_t ps;
- int tempwidth, bytes;
+ int oldwidth, newwidth;
+ int oldbytes, newbytes;
size_t ret;
/* This fixes only double-column characters, but if the wrapped
character consumes more than three columns, spaces will be
inserted in the string buffer. */
- if (current_line < line_state_visible->wbsize && line_state_visible->wrapped_line[current_line] > 0)
- _rl_clear_to_eol (line_state_visible->wrapped_line[current_line]);
+ /* XXX remember that we are working on the invisible line right now;
+ we don't swap visible and invisible until just before rl_redisplay
+ returns */
+ /* This will remove the extra placeholder space we added with
+ _rl_wrapped_multicolumn */
+ if (current_line < line_state_invisible->wbsize && line_state_invisible->wrapped_line[current_line] > 0)
+ _rl_clear_to_eol (line_state_invisible->wrapped_line[current_line]);
+
+ /* 1. how many screen positions does first char in old consume? */
+ memset (&ps, 0, sizeof (mbstate_t));
+ ret = mbrtowc (&wc, old, mb_cur_max, &ps);
+ oldbytes = ret;
+ if (MB_INVALIDCH (ret))
+ {
+ oldwidth = 1;
+ oldbytes = 1;
+ }
+ else if (MB_NULLWCH (ret))
+ oldwidth = 0;
+ else
+ oldwidth = WCWIDTH (wc);
+ if (oldwidth < 0)
+ oldwidth = 1;
+ /* 2. how many screen positions does the first char in new consume? */
memset (&ps, 0, sizeof (mbstate_t));
ret = mbrtowc (&wc, new, mb_cur_max, &ps);
+ newbytes = ret;
if (MB_INVALIDCH (ret))
{
- tempwidth = 1;
- ret = 1;
+ newwidth = 1;
+ newbytes = 1;
}
else if (MB_NULLWCH (ret))
- tempwidth = 0;
+ newwidth = 0;
else
- tempwidth = WCWIDTH (wc);
+ newwidth = WCWIDTH (wc);
+ if (newwidth < 0)
+ newwidth = 1;
+
+ /* 3. if the new width is less than the old width, we need to keep
+ going in new until we have consumed at least that many screen
+ positions, and figure out how many bytes that will take */
+ while (newbytes < nmax && newwidth < oldwidth)
+ {
+ int t;
- if (tempwidth > 0)
+ ret = mbrtowc (&wc, new+newbytes, mb_cur_max, &ps);
+ if (MB_INVALIDCH (ret))
+ {
+ newwidth += 1;
+ newbytes += 1;
+ }
+ else if (MB_NULLWCH (ret))
+ break;
+ else
+ {
+ t = WCWIDTH (wc);
+ newwidth += (t >= 0) ? t : 1;
+ newbytes += ret;
+ }
+ }
+ /* 4. If the new width is more than the old width, keep going in old
+ until we have consumed exactly that many screen positions, and
+ figure out how many bytes that will take. This is an optimization */
+ while (oldbytes < omax && oldwidth < newwidth)
{
- int count, i;
- bytes = ret;
- for (count = 0; count < bytes; count++)
- putc (new[count], rl_outstream);
- _rl_last_c_pos = tempwidth;
+ int t;
+
+ ret = mbrtowc (&wc, old+oldbytes, mb_cur_max, &ps);
+ if (MB_INVALIDCH (ret))
+ {
+ oldwidth += 1;
+ oldbytes += 1;
+ }
+ else if (MB_NULLWCH (ret))
+ break;
+ else
+ {
+ t = WCWIDTH (wc);
+ oldwidth += (t >= 0) ? t : 1;
+ oldbytes += ret;
+ }
+ }
+ /* 5. write the first newbytes of new, which takes newwidth. This is
+ where the screen wrapping takes place, and we are now writing
+ characters onto the new line. We need to fix up old so it
+ accurately reflects what is on the screen after the
+ _rl_output_some_chars below. */
+ if (newwidth > 0)
+ {
+ int count, i, j;
+ char *optr;
+
+ _rl_output_some_chars (new, newbytes);
+ _rl_last_c_pos = newwidth;
_rl_last_v_pos++;
- memset (&ps, 0, sizeof (mbstate_t));
- ret = mbrtowc (&wc, old, mb_cur_max, &ps);
- if (ret != 0 && bytes != 0)
+
+ /* 5a. If the number of screen positions doesn't match, punt
+ and do a dumb update. */
+ if (newwidth != oldwidth)
{
- if (MB_INVALIDCH (ret))
- ret = 1;
- memmove (old+bytes, old+ret, strlen (old+ret));
- memcpy (old, new, bytes);
+ ne = new + nmax;
+ nd = newbytes;
+ nfd = new + nd;
+ goto dumb_update;
+ }
+ if (oldbytes != 0 && newbytes != 0)
+ {
+ /* We have written as many bytes from new as we need to
+ consume the first character of old. Fix up `old' so it
+ reflects the new screen contents. We use +1 in the
+ memmove call to copy the trailing NUL. */
+ memmove (old+newbytes, old+oldbytes, strlen (old+oldbytes) + 1);
+ memcpy (old, new, newbytes);
+ j = newbytes - oldbytes;
+
+ omax += j;
/* Fix up indices if we copy data from one line to another */
- omax += bytes - ret;
for (i = current_line+1; i <= inv_botlin+1; i++)
- vis_lbreaks[i] += bytes - ret;
+ vis_lbreaks[i] += j;
}
}
else
@@ -1482,7 +1646,6 @@ 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)
@@ -1501,6 +1664,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
memset (&ps_new, 0, sizeof(mbstate_t));
memset (&ps_old, 0, sizeof(mbstate_t));
+ /* Are the old and new lines the same? */
if (omax == nmax && STREQN (new, old, omax))
{
old_offset = omax;
@@ -1510,6 +1674,8 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
}
else
{
+ /* Go through the line from the beginning and find the first
+ difference. */
new_offset = old_offset = 0;
for (ofd = old, nfd = new;
(ofd - old < omax) && *ofd &&
@@ -1565,6 +1731,8 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
wsatend = 1; /* flag for trailing whitespace */
#if defined (HANDLE_MULTIBYTE)
+ /* Find the last character that is the same between the two lines. This
+ bounds the region that needs to change. */
if (mb_cur_max > 1 && rl_byte_oriented == 0)
{
ols = old + _rl_find_prev_mbchar (old, oe - old, MB_FIND_ANY);
@@ -1724,12 +1892,29 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
nd = lendiff;
/* Do a dumb update and return */
+dumb_update:
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);
+ {
+ _rl_last_c_pos += _rl_col_width (new, nd, ne - new, 1);
+ /* Need to adjust here based on wrap_offset. Guess that if
+ this is the line containing the last line of the prompt
+ we need to adjust by
+ wrap_offset-prompt_invis_chars_first_line
+ on the assumption that this is the number of invisible
+ characters in the last line of the prompt. */
+ if (wrap_offset > prompt_invis_chars_first_line &&
+ current_line == prompt_last_screen_line &&
+ prompt_physical_chars > _rl_screenwidth &&
+ _rl_horizontal_scroll_mode == 0)
+ {
+ _rl_last_c_pos -= wrap_offset - prompt_invis_chars_first_line;
+ cpos_adjusted = 1;
+ }
+ }
else
_rl_last_c_pos += temp;
}
@@ -1804,6 +1989,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
{
/* Non-zero if we're increasing the number of lines. */
int gl = current_line >= _rl_vis_botlin && inv_botlin > _rl_vis_botlin;
+
/* If col_lendiff is > 0, implying that the new string takes up more
screen real estate than the old, but lendiff is < 0, meaning that it
takes fewer bytes, we need to just output the characters starting
@@ -1819,7 +2005,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
cpos_adjusted to let the caller know. */
if (current_line == 0 && displaying_prompt_first_line && wrap_offset && ((nfd - new) <= prompt_last_invisible))
{
- _rl_last_c_pos -= wrap_offset;
+ _rl_last_c_pos -= wrap_offset; /* XXX - prompt_invis_chars_first_line? */
cpos_adjusted = 1;
}
return;
@@ -1872,7 +2058,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
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))
{
- _rl_last_c_pos -= wrap_offset;
+ _rl_last_c_pos -= wrap_offset; /* XXX - prompt_invis_chars_first_line? */
cpos_adjusted = 1;
}
return;
@@ -1885,7 +2071,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
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))
{
- _rl_last_c_pos -= wrap_offset;
+ _rl_last_c_pos -= wrap_offset; /* XXX - prompt_invis_chars_first_line? */
cpos_adjusted = 1;
}
}
@@ -1952,12 +2138,26 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
_rl_last_c_pos += _rl_col_width (nfd, 0, bytes_to_insert, 1);
if (current_line == 0 && wrap_offset &&
displaying_prompt_first_line &&
- _rl_last_c_pos > wrap_offset &&
+ _rl_last_c_pos >= wrap_offset && /* XXX was > */
((nfd - new) <= prompt_last_invisible))
{
- _rl_last_c_pos -= wrap_offset;
+ _rl_last_c_pos -= wrap_offset; /* XXX - prompt_invis_chars_first_line? */
cpos_adjusted = 1;
}
+
+#if 1
+#ifdef HANDLE_MULTIBYTE
+ /* If we write a non-space into the last screen column,
+ remove the note that we added a space to compensate for
+ a multibyte double-width character that didn't fit, since
+ it's only valid for what was previously there. */
+ /* XXX - watch this */
+ if (_rl_last_c_pos == _rl_screenwidth &&
+ line_state_invisible->wrapped_line[current_line+1] &&
+ nfd[bytes_to_insert-1] != ' ')
+ line_state_invisible->wrapped_line[current_line+1] = 0;
+#endif
+#endif
}
else
_rl_last_c_pos += bytes_to_insert;
@@ -1989,7 +2189,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
_rl_last_c_pos > wrap_offset &&
((nfd - new) <= prompt_last_invisible))
{
- _rl_last_c_pos -= wrap_offset;
+ _rl_last_c_pos -= wrap_offset; /* XXX - prompt_invis_chars_first_line? */
cpos_adjusted = 1;
}
}
@@ -2019,7 +2219,7 @@ clear_rest_of_line:
/* Tell the update routines that we have moved onto a new (empty) line. */
int
-rl_on_new_line ()
+rl_on_new_line (void)
{
if (visible_line)
visible_line[0] = '\0';
@@ -2035,7 +2235,7 @@ rl_on_new_line ()
/* Clear all screen lines occupied by the current readline line buffer
(visible line) */
int
-rl_clear_visible_line ()
+rl_clear_visible_line (void)
{
int curr_line;
@@ -2063,9 +2263,10 @@ rl_clear_visible_line ()
/* 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
- (explicitly or implicitly). This still doesn't work exactly right. */
+ (explicitly or implicitly). This still doesn't work exactly right; it
+ should use expand_prompt() */
int
-rl_on_new_line_with_prompt ()
+rl_on_new_line_with_prompt (void)
{
int prompt_size, i, l, real_screenwidth, newlines;
char *prompt_last_line, *lprompt;
@@ -2121,7 +2322,7 @@ rl_on_new_line_with_prompt ()
/* Actually update the display, period. */
int
-rl_forced_update_display ()
+rl_forced_update_display (void)
{
register char *temp;
@@ -2139,7 +2340,7 @@ rl_forced_update_display ()
/* Redraw only the last line of a multi-line prompt. */
void
-rl_redraw_prompt_last_line ()
+rl_redraw_prompt_last_line (void)
{
char *t;
@@ -2157,9 +2358,7 @@ rl_redraw_prompt_last_line ()
the movement is being done.
DATA is always the visible line or the invisible line */
void
-_rl_move_cursor_relative (new, data)
- int new;
- const char *data;
+_rl_move_cursor_relative (int new, const char *data)
{
register int i;
int woff; /* number of invisible chars on current line */
@@ -2316,8 +2515,7 @@ _rl_move_cursor_relative (new, data)
/* PWP: move the cursor up or down. */
void
-_rl_move_vert (to)
- int to;
+_rl_move_vert (int to)
{
register int delta, i;
@@ -2357,8 +2555,7 @@ _rl_move_vert (to)
/* Physically print C on rl_outstream. This is for functions which know
how to optimize the display. Return the number of characters output. */
int
-rl_show_char (c)
- int c;
+rl_show_char (int c)
{
int n = 1;
if (META_CHAR (c) && (_rl_output_meta_chars == 0))
@@ -2385,8 +2582,7 @@ rl_show_char (c)
}
int
-rl_character_len (c, pos)
- register int c, pos;
+rl_character_len (int c, int pos)
{
unsigned char uc;
@@ -2521,7 +2717,7 @@ rl_message (format, arg1, arg2)
/* How to clear things from the "echo-area". */
int
-rl_clear_message ()
+rl_clear_message (void)
{
rl_display_prompt = rl_prompt;
if (msg_saved_prompt)
@@ -2534,7 +2730,7 @@ rl_clear_message ()
}
int
-rl_reset_line_state ()
+rl_reset_line_state (void)
{
rl_on_new_line ();
@@ -2543,8 +2739,12 @@ rl_reset_line_state ()
return 0;
}
+/* Save all of the variables associated with the prompt and its display. Most
+ of the complexity is dealing with the invisible characters in the prompt
+ string and where they are. There are enough of these that I should consider
+ a struct. */
void
-rl_save_prompt ()
+rl_save_prompt (void)
{
saved_local_prompt = local_prompt;
saved_local_prefix = local_prompt_prefix;
@@ -2554,22 +2754,28 @@ rl_save_prompt ()
saved_visible_length = prompt_visible_length;
saved_invis_chars_first_line = prompt_invis_chars_first_line;
saved_physical_chars = prompt_physical_chars;
+ saved_local_prompt_newlines = local_prompt_newlines;
local_prompt = local_prompt_prefix = (char *)0;
local_prompt_len = 0;
+ local_prompt_newlines = (int *)0;
+
prompt_last_invisible = prompt_visible_length = prompt_prefix_length = 0;
prompt_invis_chars_first_line = prompt_physical_chars = 0;
}
void
-rl_restore_prompt ()
+rl_restore_prompt (void)
{
FREE (local_prompt);
FREE (local_prompt_prefix);
+ FREE (local_prompt_newlines);
local_prompt = saved_local_prompt;
local_prompt_prefix = saved_local_prefix;
local_prompt_len = saved_local_length;
+ local_prompt_newlines = saved_local_prompt_newlines;
+
prompt_prefix_length = saved_prefix_length;
prompt_last_invisible = saved_last_invisible;
prompt_visible_length = saved_visible_length;
@@ -2581,11 +2787,11 @@ rl_restore_prompt ()
saved_local_length = 0;
saved_last_invisible = saved_visible_length = saved_prefix_length = 0;
saved_invis_chars_first_line = saved_physical_chars = 0;
+ saved_local_prompt_newlines = 0;
}
char *
-_rl_make_prompt_for_search (pchar)
- int pchar;
+_rl_make_prompt_for_search (int pchar)
{
int len;
char *pmt, *p;
@@ -2623,8 +2829,7 @@ _rl_make_prompt_for_search (pchar)
/* Quick redisplay hack when erasing characters at the end of the line. */
void
-_rl_erase_at_end_of_line (l)
- int l;
+_rl_erase_at_end_of_line (int l)
{
register int i;
@@ -2638,10 +2843,10 @@ _rl_erase_at_end_of_line (l)
}
/* Clear to the end of the line. COUNT is the minimum
- number of character spaces to clear, */
+ number of character spaces to clear, but we use a terminal escape
+ sequence if available. */
void
-_rl_clear_to_eol (count)
- int count;
+_rl_clear_to_eol (int count)
{
#ifndef __MSDOS__
if (_rl_term_clreol)
@@ -2655,36 +2860,33 @@ _rl_clear_to_eol (count)
/* Clear to the end of the line using spaces. COUNT is the minimum
number of character spaces to clear, */
static void
-space_to_eol (count)
- int count;
+space_to_eol (int count)
{
register int i;
for (i = 0; i < count; i++)
- putc (' ', rl_outstream);
+ putc (' ', rl_outstream);
_rl_last_c_pos += count;
}
void
-_rl_clear_screen ()
+_rl_clear_screen (void)
{
-#ifndef __DJGPP__
+#if defined (__DJGPP__)
+ ScreenClear ();
+ ScreenSetCursor (0, 0);
+#else
if (_rl_term_clrpag)
tputs (_rl_term_clrpag, 1, _rl_output_character_function);
else
rl_crlf ();
-#else
- ScreenClear ();
- ScreenSetCursor (0, 0);
#endif /* __DJGPP__ */
}
/* Insert COUNT characters from STRING to the output stream at column COL. */
static void
-insert_some_chars (string, count, col)
- char *string;
- int count, col;
+insert_some_chars (char *string, int count, int col)
{
open_some_spaces (col);
_rl_output_some_chars (string, count);
@@ -2694,8 +2896,7 @@ insert_some_chars (string, count, col)
ncurses documentation and use either im/ei with explicit spaces, or IC/ic
by itself. We assume there will either be ei or we don't need to use it. */
static void
-open_some_spaces (col)
- int col;
+open_some_spaces (int col)
{
#if !defined (__MSDOS__) && (!defined (__MINGW32__) || defined (NCURSES_VERSION))
char *buffer;
@@ -2731,8 +2932,7 @@ open_some_spaces (col)
/* Delete COUNT characters from the display line. */
static void
-delete_chars (count)
- int count;
+delete_chars (int count)
{
if (count > _rl_screenwidth) /* XXX */
return;
@@ -2754,9 +2954,9 @@ delete_chars (count)
}
void
-_rl_update_final ()
+_rl_update_final (void)
{
- int full_lines;
+ int full_lines, woff, botline_length;
full_lines = 0;
/* If the cursor is the only thing on an otherwise-blank last line,
@@ -2768,26 +2968,34 @@ _rl_update_final ()
full_lines = 1;
}
_rl_move_vert (_rl_vis_botlin);
+ woff = W_OFFSET(_rl_vis_botlin, wrap_offset);
+ botline_length = VIS_LLEN(_rl_vis_botlin) - woff;
/* If we've wrapped lines, remove the final xterm line-wrap flag. */
- if (full_lines && _rl_term_autowrap && (VIS_LLEN(_rl_vis_botlin) == _rl_screenwidth))
+ if (full_lines && _rl_term_autowrap && botline_length == _rl_screenwidth)
{
char *last_line;
- last_line = &visible_line[vis_lbreaks[_rl_vis_botlin]];
+ /* LAST_LINE includes invisible characters, so if you want to get the
+ last character of the first line, you have to take WOFF into account.
+ This needs to be done for both calls to _rl_move_cursor_relative,
+ which takes a buffer position as the first argument, and any direct
+ subscripts of LAST_LINE. */
+ last_line = &visible_line[vis_lbreaks[_rl_vis_botlin]]; /* = VIS_CHARS(_rl_vis_botlin); */
cpos_buffer_position = -1; /* don't know where we are in buffer */
- _rl_move_cursor_relative (_rl_screenwidth - 1, last_line); /* XXX */
+ _rl_move_cursor_relative (_rl_screenwidth - 1 + woff, last_line); /* XXX */
_rl_clear_to_eol (0);
- putc (last_line[_rl_screenwidth - 1], rl_outstream);
+ putc (last_line[_rl_screenwidth - 1 + woff], rl_outstream);
}
_rl_vis_botlin = 0;
- rl_crlf ();
+ if (botline_length > 0 || _rl_last_c_pos > 0)
+ rl_crlf ();
fflush (rl_outstream);
rl_display_fixed++;
}
/* Move to the start of the current line. */
static void
-cr ()
+cr (void)
{
if (_rl_term_cr)
{
@@ -2804,8 +3012,7 @@ cr ()
terminal escape sequences. Called with the cursor at column 0 of the
line to draw the prompt on. */
static void
-redraw_prompt (t)
- char *t;
+redraw_prompt (char *t)
{
char *oldp;
@@ -2829,7 +3036,7 @@ redraw_prompt (t)
/* Redisplay the current line after a SIGWINCH is received. */
void
-_rl_redisplay_after_sigwinch ()
+_rl_redisplay_after_sigwinch (void)
{
char *t;
@@ -2874,7 +3081,7 @@ _rl_redisplay_after_sigwinch ()
}
void
-_rl_clean_up_for_exit ()
+_rl_clean_up_for_exit (void)
{
if (_rl_echoing_p)
{
@@ -2887,7 +3094,7 @@ _rl_clean_up_for_exit ()
}
void
-_rl_erase_entire_line ()
+_rl_erase_entire_line (void)
{
cr ();
_rl_clear_to_eol (0);
@@ -2896,7 +3103,7 @@ _rl_erase_entire_line ()
}
void
-_rl_ttyflush ()
+_rl_ttyflush (void)
{
fflush (rl_outstream);
}
@@ -2904,7 +3111,7 @@ _rl_ttyflush ()
/* 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
-_rl_current_display_line ()
+_rl_current_display_line (void)
{
int ret, nleft;
@@ -2928,9 +3135,7 @@ _rl_current_display_line ()
In the case of multibyte characters with stateful encoding, we have to
scan from the beginning of the string to take the state into account. */
static int
-_rl_col_width (str, start, end, flags)
- const char *str;
- int start, end, flags;
+_rl_col_width (const char *str, int start, int end, int flags)
{
wchar_t wc;
mbstate_t ps;
@@ -2963,7 +3168,13 @@ _rl_col_width (str, start, end, flags)
while (point < start)
{
- tmp = mbrlen (str + point, max, &ps);
+ if (_rl_utf8locale && UTF8_SINGLEBYTE(str[point]))
+ {
+ memset (&ps, 0, sizeof (mbstate_t));
+ tmp = 1;
+ }
+ else
+ tmp = mbrlen (str + point, max, &ps);
if (MB_INVALIDCH ((size_t)tmp))
{
/* In this case, the bytes are invalid or too short to compose a
@@ -2992,7 +3203,13 @@ _rl_col_width (str, start, end, flags)
while (point < end)
{
- tmp = mbrtowc (&wc, str + point, max, &ps);
+ if (_rl_utf8locale && UTF8_SINGLEBYTE(str[point]))
+ {
+ tmp = 1;
+ wc = (wchar_t) str[point];
+ }
+ else
+ tmp = mbrtowc (&wc, str + point, max, &ps);
if (MB_INVALIDCH ((size_t)tmp))
{
/* In this case, the bytes are invalid or too short to compose a
diff --git a/doc/history.0 b/doc/history.0
index e3cba11..9133300 100644
--- a/doc/history.0
+++ b/doc/history.0
@@ -6,7 +6,7 @@ HISTORY(3) Library Functions Manual HISTORY(3)
history - GNU History Library
[1mCOPYRIGHT[0m
- The GNU History Library is Copyright (C) 1989-2014 by the Free Software
+ The GNU History Library is Copyright (C) 1989-2017 by the Free Software
Foundation, Inc.
[1mDESCRIPTION[0m
@@ -206,7 +206,9 @@ HISTORY(3) Library Functions Manual HISTORY(3)
[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.
+ (if any) is set to [1mNULL[22m. If the maximum number of history entries has
+ been set using [1mstifle_history()[22m, and the new number of history entries
+ would exceed that maximum, the oldest history entry is removed.
[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
@@ -233,11 +235,12 @@ HISTORY(3) Library Functions Manual HISTORY(3)
Clear the history list by deleting all the entries.
[4mvoid[24m [1mstifle_history [22m([4mint[24m [4mmax[24m)
- Stifle the history list, remembering only the last [4mmax[24m entries.
+ Stifle the history list, remembering only the last [4mmax[24m entries. The
+ history list will contain only [4mmax[24m entries at a time.
[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
+ 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.
@@ -246,25 +249,26 @@ HISTORY(3) Library Functions Manual HISTORY(3)
[1mInformation About the History List[0m
- These functions return information about the entire history list or
+ These functions return information about the entire history list or
individual list entries.
[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
+ 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.
[4mint[24m [1mwhere_history [22m([4mvoid[24m)
Returns the offset of the current history element.
[4mHIST_ENTRY[24m [4m*[24m [1mcurrent_history [22m([4mvoid[24m)
- Return the history entry at the current position, as determined by
+ Return the history entry at the current position, as determined by
[1mwhere_history()[22m. If there is no entry there, return a [1mNULL [22mpointer.
[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.
+ Return the history entry at position [4moffset[24m. The range of valid values
+ of [4moffset[24m starts at [1mhistory_base [22mand ends at [1mhistory_length [22m- 1. If
+ there is no entry there, or if [4moffset[24m is outside the valid range,
+ return a [1mNULL [22mpointer.
[4mtime_t[24m [1mhistory_get_time [22m([4mHIST_ENTRY[24m [4m*[24m)
Return the time stamp associated with the history entry passed as the
@@ -492,4 +496,4 @@ HISTORY(3) Library Functions Manual HISTORY(3)
-GNU History 6.3 2015 May 24 HISTORY(3)
+GNU History 6.3 2017 October 8 HISTORY(3)
diff --git a/doc/history.3 b/doc/history.3
index 7ddc26a..8de64f6 100644
--- a/doc/history.3
+++ b/doc/history.3
@@ -6,9 +6,9 @@
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
-.\" Last Change: Sun May 24 18:01:17 EDT 2015
+.\" Last Change: Sun Oct 8 11:43:43 EDT 2017
.\"
-.TH HISTORY 3 "2015 May 24" "GNU History 6.3"
+.TH HISTORY 3 "2017 October 8" "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-2014 by the Free Software Foundation, Inc.
-.if n The GNU History Library is Copyright (C) 1989-2014 by the Free Software Foundation, Inc.
+.if t The GNU History Library is Copyright \(co 1989-2017 by the Free Software Foundation, Inc.
+.if n The GNU History Library is Copyright (C) 1989-2017 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
@@ -356,6 +356,9 @@ parameters managing the list itself.
.Fn1 void add_history "const char *string"
Place \fIstring\fP at the end of the history list. The associated data
field (if any) is set to \fBNULL\fP.
+If the maximum number of history entries has been set using
+\fBstifle_history()\fP, and the new number of history entries would exceed
+that maximum, the oldest history entry is removed.
.Fn1 void add_history_time "const char *string"
Change the time stamp associated with the most recent history entry to
@@ -382,6 +385,7 @@ Clear the history list by deleting all the entries.
.Fn1 void stifle_history "int max"
Stifle the history list, remembering only the last \fImax\fP entries.
+The history list will contain only \fImax\fP entries at a time.
.Fn1 int unstifle_history "void"
Stop stifling the history. This returns the previously-set
@@ -411,10 +415,11 @@ Return the history entry at the current position, as determined by
pointer.
.Fn1 "HIST_ENTRY *" history_get "int offset"
-Return the history entry at position \fIoffset\fP, starting from
-\fBhistory_base\fP.
-If there is no entry there, or if \fIoffset\fP
-is greater than the history length, return a \fBNULL\fP pointer.
+Return the history entry at position \fIoffset\fP.
+The range of valid values of \fIoffset\fP starts at \fBhistory_base\fP
+and ends at \fBhistory_length\fP \- 1.
+If there is no entry there, or if \fIoffset\fP is outside the valid
+range, return a \fBNULL\fP pointer.
.Fn1 "time_t" history_get_time "HIST_ENTRY *"
Return the time stamp associated with the history entry passed as the argument.
diff --git a/doc/history.dvi b/doc/history.dvi
index cc7924c6062a55a0952a875879bfd040bec5604e..28af1c791a1c8c515bf33137ff0b57f3e12c6dc9 100644
GIT binary patch
delta 4950
zc-n1Odvp}#70)~t2n6yn4-)b$A&De035X#vPz>@0%qh+W`N
zMI%=fyF
z-@W(u-S1LN-1IZCuP~*drmnuGuA#B6Zt`Sk9#&~AeVl7B-oCrMp{BN`w|{g}QqNAV
z{ma@#!Ci++!axGh*0=Coq8h?}Z+&fD1JrXL3a<6%p_tE$xYl3LeFSDNYBgNzr8%;u
z2i0!y%WbNpcAFL9J%>t&s>wkGP_p;#FQ
zMDIp@IRgldQlDu%fXQ5@9y2p^y+-ey(oG>nS+-ez-&xr@pxOA&6xs>DfTiZsi7b0m~MvqaFKHGsK
zDwItlT^*7_aWI6kW;xK|Cjp|M2f7BDkNEx7etDfqV0|d4Gmp!f(Itu!I)SIOMnimN
zo&;@@+gzvlCCx{Lx+TSq4Hb$$dq5AO8xiVr9X|B&noCHj$f5-pWF*6}5Zh;3nW!)z$j#f`F
z)aEBq;qVK#p|OZ?_+UVyadZ@Fp*ABacI;u|)=kvwC^Hkv(8i-1(OEY!5nw!ML(EJj
znppYlyFpS3
zT>)Jsl1@D4V8Hy{-{dmQPg^jSZBFcX4_o`V-4e$XU{+?F`8SlM_KeIpbCoSzEZKcC
zh0BF=sb$=LxRKh3zYS^2xV_Mmww~JuH`6Mz_d7eMU(s|GO~1Hm`s&`j(46kUZO^8M
z@po)S8O+G6;aZ_1b8!*d{*be~F7Z`=@gY{quqH#sGp}bfqCLkJgP7SY_UCLXf>$#S
zaC@!5ZF{(a)NA*!YMEu+%qBrbGo(wRB~sP9AIh_Lpq)puBSOZpB``H7f}`U(z4*H*
zw^ZCmC-vOBaCk76y7gx6V$?T&>@2Lsbz>_yb}E{;7?(cGds@iZRtQ`2PvU6KxD{eQ
zUHs9wWjOq7+-mq;K{bEdNpx!lG!wR
zm*J$OX_O%`Suk_JBk2;P5Wfd1WUnbHv=%BsMy??`O`)34f1n4WuIAc{i&_^f7^pFl
zpS^po*Ko~huA|BVQkNXSbPfeTF+*{lHeAhhXhNb?k(pE(%MGV}l4h40QK$;I>Mf37
zg70a=3XTf9*P_svuv=0{Cn&p^TwA0`8Dsa_L6Nw~gqocY4Efnv(&Z*t42<=eVSQ8p
zla68?Z-Rcj2lObWPFz-&O|STcZc{R(WQrKpmmtuY@Z6nG3UT0HYRIs>Qzr5-zpIK6-c?DWFH!1UQz(wmoF#F|WRCG&D{6own~$2IpUnuV&Qv=f@A;n+>j
zOvx{M@V1crAxeFx7vj8qzz~No7|?V{)iuWn31j!l`xlwM9JPB*n}iq50A^22c;yP_
zK660vF=5&iyddR--NG!XasammL%N2Y2fI4MM%-2A
zeU+&aJ)|lKH!Chj?*M~MX7aH&!8Eik-*b(Fzs;`Z@6Jl3-2HRXcMcQb?=xfKfvl}#
zF)n3r!!rU7-CJs>;h*ju!;Ae{Tl1Wdr9sb}LYjuw;W=|T{>hn#<{jmrY*GF8
zb$0o;Ie4RG0=%@c1sV3*%D2V-%+}U~XyH3KoRFP;(kfV`azgstPpzE~-pAW}ICq6L
zdd&*nmd3futsN5KO7~z9bR!^GmdGDiz;0D;qeY58{va-NGMtLsY25JM9Zx1DB_+d*
zlN0!r7aXG-C{|NFKSZpq-vDl1A-oVwO{TeHUp}MAZ2tQH;tQ~uEZ@1Vh<$GIrl1pj
z-Ytmb;Evs%QCu1=p|C+FqPo(`#qLNR|!0kdqDLp-;<#R`0}!gWMXV7@asz
z3R;6RkRn(7TMod_7$mtZZype~ow(WYhc>}vtQ&v25H!XJLAbJ72L#k>s
z1<-edeLYe#XU=;_BpxAIiwfU*c}Vw3yI#_TXwlt{m6V4TArH}e6PMRsEFUPx+pYPX
zq47$<3f_=nlO4SRux_+aAdV?DFe6g
zjs|FVAs&rZNNT&g3Tw4JTuG(Q`u=uV!R!2JlrA*kOW{>LE7?}}2#(&>3y@~7>-jnO
zuxRkVMv+)myPAq>hT0}`uMN#e3OWr%%Qw4OLR&2`YripYh%&RE#fFn2)3RON+f;
ze@OGOU7C&&*DI;gy`jmC_PXq4X6i6u0^F`M8Ou&Bc!d6cXlfTW4z_A+vGE%!?Bl87
zVzjb0oS$cJf3$bMBg{63$^jBCT6D{_x=$~
z-5`=mh%lwNioU>$oh9hs+0H4$Y(pT@$%16N3YA?Ix7j0#yA4ns#pQTc@fb}ClhR6P
z#&A&-psRwT3)T4hL038ZF3zSc>ENa~9PnEA419%+-f)EHBd4rW8#ko!-&+A^KbmLl
z=*i9CcfG~Ful8qW@Xy`FzLy-zO5*UyU{`41YI`>>hI{(fZ_I>X1=PCTZ
z@~yKU)eq;tT)XQkmv0q*adw!%@lWGmck;6ppY-(f^lwQz(#LUkaop4+uklk7aj>rT$V3-6p4+{66qk9VZ5S8k({H&n49*yj+mGS)B^=#;Y6KS$_~gw;
R?o8qKbIDo1=ig(0{|EjV4Ws}7
delta 2774
zc-mc6eN+_J72h{Ae50_yqOg1`vKV%=_yK+sLK31PMgfgdw8JvXu32_qW)?+77MsRs
zWb1k@tRWUjDJS%_&5@~xMo-e1oTRZHo20=ssWujmB%UVK>an%9(e%EVm8RW4X5YK_
zzTds?-rv2?|0;L2pF5OgEV0=a+w7%Fic5=2UN9I81U}539jw_$N`n`dnM-YUTVP+7352nz0eFrOnMi4!Kt_esI0CFvKQ)~bjyk;b%Z?b
zMv0d?z|wwbG*^&hx99~#EDEv{1qeXVLKLb{lkm_giOmwQ)q1o(|cKr6I7FSSYuW<{9tApH$g&%I%ftf$S%>*pUG}Opvs(u2*comAP~V$J2y5Ds59G-VxHkVA
zXk4GI#w=VlN=;WlH>>#)Q>j~r;lDeNgdR6c?QMyoy
zyQa7;E4Co_>1eG>2=TH^3F>h3iqHg2yuyd#1y2)L+|Cg1rOYY>w;YlML=-8#YN(E@$7DiK~^_ULpx{g|LfvF}Mk@D5Qm%WY2+|~o9
z%YV*NVX(@oh914fbaD4D(A07F$HVyofu=#h1+Ro?n~Abpq4Qu;jKj1{6a^z{Z^#NS
zDKrG9B(}hn@X@V}yexz!EV3X#jo`3`^G8qjvY)&^&$a*_Oq_o9lMgloze(*9c*)H-
zdIY%vN6VzUm2VbcQK2mu;Y(ZTq?eNfEC_hT&{SNSP_q_sdN@ORU_s9G{sdY!O9Iwb
zdf?l|qwitow+I0q!P~63XhIbqL_D4xPjLllDqUG>O646K0W@FxRt|Duu@yG0%ESKY
zS~Z=4xRq9B$(pGe?pSGr+D#c)dYj(5pH;0T%-&k{;p*227PNg-130ukQq6ek_Z-uH
zBD{}Q^XpW!tW*EE;cN71(lq(7ebXv*_0FaP1SvH~-BDjo!o3!)_gdxTl=F&B3*hp1
zDs%$PYPg90mX;xkO|@@H#jRXFgh&oqqb=9HQ(n3GB%IG4c8EMe|ft#l2$q}2A?57G=e(lVx>JxuWI^+qCeeokvbOm|+SA*yMMS9yUmIkO
zS5!cD@Ln$}@No&U8~0HroQO__-zl-SFiAw||0&`STUx?zlq2NgCEkGqfgk&F^;pzD
zb#yY}dc^AW5Izmxdp6kGO>jIi0)*Yqb3-PB0dDRt#;0OdXCV&Fr#jQ;;b?v0=mEDE
zIr~~KFEu-s26T}FT~XQGxhQSdq!`{Vd`w>I%tY6xI?XdMw
z!qc$XZ^hid;4g?lgXW(NQKZxU^fcVHWq;rhy*SK#f|hX9V%TuqPivjnT@tB7!kd0m
z%+#%5Tel@e-_aE7xhSS7xYwOCUFO?`yh2!xm7&hZyDfw&toVIsZ-KVXNukful#x!Q
zIGswe<-b(&n_|(&*VKAuY_Kq=3N4fg!_je{TyN{0cHYPDWro+9f
z)L*=kn#2rr&}HIjQzCQXB3-tfOEWTWEu+hiFSQz(j|S=T@b$a#%wz*y{^8%(BAHt+
zkDX!2Um{t<-H-clW$rs0Lw3jXy>c60zJY`OvFcb-O30$I=i*2r!`!^ucic!;bHS+5
tGkx9hBxUUOG?GO1Q3>RE28P>G#||Ws$63bk_SlCeGE8FP?aXEE_a9S=Nv{9^
diff --git a/doc/history.html b/doc/history.html
index 6af5600..bc3ce3b 100644
--- a/doc/history.html
+++ b/doc/history.html
@@ -1,6 +1,6 @@
-
+
+
-
+
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.
@@ -1929,33 +1990,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
@@ -1970,17 +2031,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
@@ -2009,29 +2070,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.
@@ -2057,87 +2118,88 @@ 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.
+
+
do-lowercase-version (M-A, M-B, M-x, ...)
+-
+If the metafied character x is upper case, run the command
+that is bound to the corresponding metafied lower case character.
+The behavior is undefined if x is already lower case.
-
+
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
@@ -2147,9 +2209,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
@@ -2160,43 +2222,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.
@@ -2331,8 +2393,8 @@ the simplest way possible, perhaps to replace calls in your code to
gets()
or fgets()
.
-
-
+
+
The function readline()
prints a prompt prompt
@@ -2358,6 +2420,13 @@ line is empty at that point, then (char *)NULL
is returned.
Otherwise, the line is ended just as if a newline had been typed.
+Readline performs some expansion on the prompt before it is
+displayed on the screen. See the description of rl_expand_prompt
+(see section 2.4.6 Redisplay) for additional details, especially if prompt
+will contain characters that do not consume physical screen space when
+displayed.
+
+
If you want the user to be able to get at the line later, (with
C-p for example), you must call add_history()
to save the
line away in a history list of such lines.
@@ -2648,7 +2717,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
@@ -2658,7 +2727,7 @@ the memory allocated to
rl_line_buffer
.
-
+
- Variable: int rl_point
- The offset of the current cursor position in
rl_line_buffer
@@ -2666,7 +2735,7 @@ the memory allocated to rl_line_buffer
.
-
+
- Variable: int rl_end
- The number of characters present in
rl_line_buffer
. When
@@ -2675,7 +2744,7 @@ the memory allocated to rl_line_buffer
.
-
+
- Variable: int rl_mark
- The mark (saved position) in the current line. If set, the mark
@@ -2683,7 +2752,7 @@ and point define a region.
-
+
- Variable: int rl_done
- Setting this to a non-zero value causes Readline to return the current
@@ -2691,7 +2760,7 @@ line immediately.
-
+
- Variable: int rl_num_chars_to_read
- Setting this to a positive value before calling
readline()
causes
@@ -2700,7 +2769,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
@@ -2708,7 +2777,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;
@@ -2717,7 +2786,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
@@ -2727,7 +2796,7 @@ the beginning of the newly-blank line.
-
+
- Variable: char * rl_prompt
- The prompt Readline uses. This is set from the argument to
@@ -2737,7 +2806,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
@@ -2746,7 +2815,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
@@ -2759,14 +2828,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
@@ -2777,7 +2846,7 @@ value 0x0402.
-
+
- Variable: int rl_gnu_readline_p
- Always set to 1, denoting that this is GNU readline rather than some
@@ -2785,7 +2854,7 @@ emulation.
-
+
- Variable: const char * rl_terminal_name
- The terminal type, used for initialization. If not set by the application,
@@ -2794,7 +2863,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.
@@ -2803,7 +2872,7 @@ The value allows conditional parsing of the inputrc file
-
+
- Variable: FILE * rl_instream
- The stdio stream from which Readline reads input.
@@ -2811,7 +2880,7 @@ If
NULL
, Readline defaults to stdin.
-
+
- Variable: FILE * rl_outstream
- The stdio stream to which Readline performs output.
@@ -2819,7 +2888,7 @@ If
NULL
, Readline defaults to stdout.
-
+
- Variable: int rl_prefer_env_winsize
- If non-zero, Readline gives values found in the
LINES
and
@@ -2828,7 +2897,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
@@ -2837,7 +2906,7 @@ example.
-
+
- Variable: rl_hook_func_t * rl_startup_hook
- If non-zero, this is the address of a function to call just
@@ -2845,7 +2914,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
@@ -2854,7 +2923,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
@@ -2864,7 +2933,7 @@ is no keyboard input.
-
+
- Variable: rl_getc_func_t * rl_getc_function
- If non-zero, Readline will call indirectly through this pointer
@@ -2876,7 +2945,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
@@ -2884,7 +2953,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
@@ -2909,7 +2978,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
@@ -2919,7 +2988,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
@@ -2930,7 +2999,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
@@ -2941,7 +3010,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
@@ -2949,7 +3018,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
@@ -2957,21 +3026,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
@@ -2979,14 +3048,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.
@@ -3056,7 +3125,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
@@ -3064,7 +3133,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
@@ -3073,7 +3142,7 @@ command function.
-
+
- Variable: int rl_editing_mode
- Set to a value denoting Readline's current editing mode. A value of
@@ -3152,7 +3221,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
@@ -3192,7 +3261,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
@@ -3201,14 +3270,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,
@@ -3217,7 +3286,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.
@@ -3225,7 +3294,7 @@ The caller should free keymap.
-
+
- Function: void rl_free_keymap (Keymap keymap)
- Free all storage associated with keymap. This calls
@@ -3233,25 +3302,33 @@ The caller should free keymap.
+
+
+- Function: int rl_empty_keymap (Keymap keymap)
+
- Return non-zero if there are no keys bound to functions in keymap;
+zero if there are any keys bound.
+
+
+
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
@@ -3259,7 +3336,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
@@ -3267,6 +3344,27 @@ be supplied in a
set keymap
inputrc line (see section
+
+- Function: int rl_set_keymap_name (const char *name, Keymap keymap)
+
- Set the name of keymap. This name will then be "registered" and
+available for use in a
set keymap
inputrc directive
+see section 1.3 Readline Init File).
+The name may not be one of Readline's builtin keymap names;
+you may not add a different name for one of Readline's builtin keymaps.
+You may replace the name associated with a given keymap by calling this
+function more than once with the same keymap argument.
+You may associate a registered name with a new keymap by calling this
+function more than once with the same name argument.
+There is no way to remove a named keymap once the name has been
+registered.
+Readline will make a copy of name.
+The return value is greater than zero unless name is one of
+Readline's builtin keymap names or keymap is one of Readline's
+builtin keymaps.
+
+
+
@@ -3304,7 +3402,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.
@@ -3312,7 +3410,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.
@@ -3320,7 +3418,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
@@ -3330,7 +3428,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.
@@ -3339,7 +3437,7 @@ already bound.
-
+
- Function: int rl_unbind_key (int key)
- Bind key to the null function in the currently active keymap.
@@ -3347,7 +3445,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.
@@ -3355,21 +3453,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
@@ -3379,7 +3477,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
@@ -3389,14 +3487,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
@@ -3406,7 +3504,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.
@@ -3415,7 +3513,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
@@ -3426,7 +3524,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
@@ -3435,7 +3533,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
@@ -3466,24 +3564,37 @@ 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.
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
).
+It takes a "translated" key sequence and should not be used if the key sequence
+can include NUL.
+
+
+
+
+
+- Function: rl_command_func_t * rl_function_of_keyseq_len (const char *keyseq, size_t len, Keymap map, int *type)
+
- Return the function invoked by keyseq of length len
+in keymap map. Equivalent to
rl_function_of_keyseq
with the
+addition of the len parameter.
+It takes a "translated" key sequence and should be used if the key sequence
+can include NUL.
-
+
- Function: char ** rl_invoking_keyseqs (rl_command_func_t *function)
- Return an array of strings representing the key sequences used to
@@ -3491,7 +3602,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
@@ -3499,7 +3610,7 @@ invoke function in the keymap map.
-
+
- Function: void rl_function_dumper (int readable)
- Print the readline function names and the key sequences currently
@@ -3509,14 +3620,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
@@ -3526,7 +3637,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
@@ -3581,7 +3692,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
@@ -3591,7 +3702,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
@@ -3600,7 +3711,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
@@ -3608,14 +3719,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
@@ -3629,7 +3740,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
@@ -3656,7 +3767,7 @@ that text.
-
+
- Function: void rl_redisplay (void)
- Change what's displayed on the screen to reflect the current contents
@@ -3664,7 +3775,7 @@ of
rl_line_buffer
.
-
+
- Function: int rl_forced_update_display (void)
- Force the line to be updated and redisplayed, whether or not
@@ -3672,7 +3783,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,
@@ -3680,7 +3791,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
@@ -3692,14 +3803,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
@@ -3707,14 +3818,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
.
@@ -3725,7 +3836,7 @@ redisplay.
-
+
- Function: int rl_message (const char *, ...)
- The arguments are a format string as would be supplied to
printf
,
@@ -3738,7 +3849,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
@@ -3747,7 +3858,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
@@ -3755,7 +3866,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
@@ -3766,7 +3877,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
@@ -3784,7 +3895,7 @@ 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
@@ -3811,7 +3922,7 @@ to the result.
-
+
- Function: int rl_insert_text (const char *text)
- Insert text into the line at the current cursor position.
@@ -3819,7 +3930,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.
@@ -3827,7 +3938,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
@@ -3835,7 +3946,7 @@ the current line.
-
+
- Function: int rl_kill_text (int start, int end)
- Copy the text between start and end in the current line
@@ -3847,7 +3958,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
@@ -3874,7 +3985,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.
@@ -3886,7 +3997,7 @@ the
rl_event_hook
variable.
-
+
- Function: int rl_getc (FILE *stream)
- Return the next character available from stream, which is assumed to
@@ -3894,7 +4005,7 @@ be the keyboard.
-
+
- Function: int rl_stuff_char (int c)
- Insert c into the Readline input stream. It will be "read"
@@ -3905,7 +4016,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()
@@ -3913,7 +4024,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
@@ -3922,7 +4033,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
@@ -3952,7 +4063,7 @@ Returns the old timeout value.
-
+
- Function: void rl_prep_terminal (int meta_flag)
- Modify the terminal settings for Readline's use, so
readline()
@@ -3962,7 +4073,7 @@ read eight-bit input.
-
+
- Function: void rl_deprep_terminal (void)
- Undo the effects of
rl_prep_terminal()
, leaving the terminal in
@@ -3971,7 +4082,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
@@ -3980,7 +4091,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
@@ -3989,7 +4100,7 @@ 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
@@ -4000,7 +4111,7 @@ This function returns the previous value.
-
+
- Function: int rl_reset_terminal (const char *terminal_name)
- Reinitialize Readline's idea of the terminal settings using
@@ -4028,7 +4139,7 @@ environment variable is used.
-
+
- Function: int rl_save_state (struct readline_state *sp)
- Save a snapshot of Readline's internal state to sp.
@@ -4038,7 +4149,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
@@ -4049,7 +4160,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
@@ -4057,7 +4168,7 @@ allocated by
malloc
.
-
+
- Function: void rl_replace_line (const char *text, int clear_undo)
- Replace the contents of
rl_line_buffer
with text.
@@ -4067,7 +4178,7 @@ current line is cleared.
-
+
- Function: void rl_extend_line_buffer (int len)
- Ensure that
rl_line_buffer
has enough space to hold len
@@ -4075,7 +4186,7 @@ characters, possibly reallocating it if necessary.
-
+
- Function: int rl_initialize (void)
- Initialize or re-initialize Readline's internal state.
@@ -4084,21 +4195,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
@@ -4118,28 +4229,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
@@ -4147,7 +4258,7 @@ uppercase character.
-
+
- Function: int _rl_to_lower (int c)
- If c is an uppercase alphabetic character, return the corresponding
@@ -4155,7 +4266,7 @@ lowercase character.
-
+
- Function: int _rl_digit_value (int c)
- If c is a number, return the value it represents.
@@ -4180,7 +4291,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.
@@ -4190,7 +4301,7 @@ use
rl_generic_bind()
instead.
-
+
- Function: void rl_macro_dumper (int readable)
- Print the key sequences bound to macros and their values, using
@@ -4200,7 +4311,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.
@@ -4210,7 +4321,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.
@@ -4218,7 +4329,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
@@ -4228,7 +4339,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
@@ -4236,7 +4347,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.
@@ -4248,7 +4359,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
@@ -4284,7 +4395,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
@@ -4297,7 +4408,7 @@ line when it it finished with it.
-
+
- Function: void rl_callback_read_char (void)
- Whenever an application determines that keyboard input is available, it
@@ -4317,7 +4428,7 @@ 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
@@ -4328,7 +4439,7 @@ calls this when appropriate.
-
+
- Function: void rl_callback_handler_remove (void)
- Restore the terminal to its initial state and remove the line handler.
@@ -4647,7 +4758,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
@@ -4659,7 +4770,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,
@@ -4670,7 +4781,7 @@ 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
@@ -4683,7 +4794,7 @@ 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,
@@ -4703,7 +4814,7 @@ 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
@@ -4711,7 +4822,7 @@ 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
@@ -4721,7 +4832,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
@@ -4733,7 +4844,7 @@ current input line.
-
+
- Function: void rl_reset_after_signal (void)
- This will reinitialize the terminal and reinstall any Readline signal
@@ -4742,13 +4853,30 @@ handlers, depending on the values of
rl_catch_signals
and
+If an application wants to force Readline to handle any signals that
+have arrived while it has been executing, rl_check_signals()
+will call Readline's internal signal handler if there are any pending
+signals. This is primarily intended for those applications that use
+a custom rl_getc_function
(see section 2.3 Readline Variables) and wish
+to handle signals received while waiting for input.
+
+
+
+
+- Function: void rl_check_signals (void)
+
- If there are any pending signals, call Readline's internal signal handling
+functions to process them.
rl_pending_signal()
can be used independently
+to determine whether or not there are any pending signals.
+
+
+
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
@@ -4758,14 +4886,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
@@ -4779,7 +4907,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
@@ -4787,7 +4915,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.
@@ -4797,7 +4925,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
,
@@ -4807,7 +4935,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
@@ -4920,7 +5048,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
@@ -4929,7 +5057,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
@@ -4965,7 +5093,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
@@ -4979,7 +5107,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
@@ -4991,7 +5119,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
@@ -5000,7 +5128,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
@@ -5009,7 +5137,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()
@@ -5021,7 +5149,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
@@ -5039,7 +5167,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.
@@ -5050,7 +5178,7 @@ Readline functions).
-
+
- Function: char * rl_username_completion_function (const char *text, int state)
- A completion generator for usernames. text contains a partial
@@ -5078,7 +5206,7 @@ for subsequent calls.
-
+
- Variable: rl_compentry_func_t * rl_completion_entry_function
- A pointer to the generator function for
rl_completion_matches()
.
@@ -5087,7 +5215,7 @@ the default filename completer.
-
+
- Variable: rl_completion_func_t * rl_attempted_completion_function
- A pointer to an alternative function to create matches.
@@ -5104,7 +5232,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
@@ -5121,7 +5249,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
@@ -5134,7 +5262,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
@@ -5147,7 +5275,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
@@ -5160,7 +5288,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
@@ -5183,7 +5311,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
@@ -5203,7 +5331,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
@@ -5219,7 +5347,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
@@ -5238,7 +5366,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
@@ -5255,7 +5383,7 @@ 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
@@ -5265,14 +5393,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
@@ -5281,7 +5409,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
@@ -5293,7 +5421,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.
@@ -5303,7 +5431,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
@@ -5311,7 +5439,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
@@ -5322,7 +5450,7 @@ shell variables and hostnames.
-
+
- Variable: int rl_completion_query_items
- Up to this many items will be displayed in response to a
@@ -5332,7 +5460,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
@@ -5342,10 +5470,12 @@ 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.
+It is set to the default before any application-specific completion function
+is called, and may only be changed within such a function.
-
+
- Variable: int rl_completion_suppress_append
- If non-zero, rl_completion_append_character is not appended to
@@ -5355,7 +5485,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
@@ -5365,7 +5495,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
@@ -5375,7 +5505,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
@@ -5385,7 +5515,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
@@ -5400,7 +5530,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.
@@ -5408,7 +5538,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
@@ -5422,7 +5552,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
@@ -5436,7 +5566,7 @@ by
rl_filename_quoting_function
.
-
+
- Variable: int rl_attempted_completion_over
- If an application-specific completion function assigned to
@@ -5447,7 +5577,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
@@ -5459,7 +5589,7 @@ matches.
-
+
- Variable: int rl_completion_type
- Set to a character describing the type of completion Readline is currently
@@ -5471,7 +5601,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
@@ -5481,7 +5611,7 @@ function is called.
-
+
- Variable: int rl_inhibit_completion
- If this variable is non-zero, completion is inhibited. The completion
@@ -6628,7 +6758,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 |
@@ -6720,447 +6850,455 @@ 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-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-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 |
+ | 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 |
+ | 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 |
+ | 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 |
+ | 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 |
+ | 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 |
+ | do-lowercase-version (M-A, M-B, M-x, <small>...</small>) | 1.4.8 Some Miscellaneous Commands |
+ | do-lowercase-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 | | |
| 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-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-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 |
+ | 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-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-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-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 |
+ | history-substring-search-backward () | 1.4.2 Commands For Manipulating The History |
+ | history-substring-search-backward () | 1.4.2 Commands For Manipulating The History |
+ | history-substring-search-forward () | 1.4.2 Commands For Manipulating The History |
+ | history-substring-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 |
+ | 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 |
+ | 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 () | 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 |
+ | next-screen-line () | 1.4.1 Commands For Moving |
+ | next-screen-line () | 1.4.1 Commands For Moving |
+ | 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 |
+ | 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 |
+ | 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 |
+ | previous-screen-line () | 1.4.1 Commands For Moving |
+ | previous-screen-line () | 1.4.1 Commands For Moving |
+ | 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 |
+ | 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 |
+ | 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_check_signals | 2.5 Readline Signal Handling |
+ | 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_empty_keymap | 2.4.2 Selecting a Keymap |
+ | 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_function_of_keyseq_len | 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_keymap_name | 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 |
+ | 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 |
+ | 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-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-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: | _
@@ -7369,7 +7507,7 @@ to permit their use in free software.
| [ ? ] |
---|
About this document
-This document was generated by chet on September, 7 2016
+This document was generated by chet on December, 18 2018
using texi2html
@@ -7531,7 +7669,7 @@ the following structure:
This document was generated
-by chet on September, 7 2016
+by chet on December, 18 2018
using texi2html
diff --git a/doc/readline.info b/doc/readline.info
index 6eb3efa..a0f841c 100644
--- a/doc/readline.info
+++ b/doc/readline.info
@@ -1,7 +1,7 @@
-This is readline.info, produced by makeinfo version 6.1 from rlman.texi.
+This is readline.info, produced by makeinfo version 6.5 from rlman.texi.
-This manual describes the GNU Readline Library (version 7.0, 16 July
-2016), a library which aids in the consistency of user interface across
+This manual describes the GNU Readline Library (version 8.0, 30 November
+2018), a library which aids in the consistency of user interface across
discrete programs which provide a command line interface.
Copyright (C) 1988-2016 Free Software Foundation, Inc.
@@ -414,7 +414,7 @@ Variable Settings
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.
+ and completion. The default value is 'off'.
'completion-prefix-display-length'
The length in characters of the common prefix of a list of
@@ -458,14 +458,14 @@ Variable Settings
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 '@'.
+ If the SHOW-MODE-IN-PROMPT variable is enabled, 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
@@ -529,13 +529,13 @@ Variable Settings
'keymap'
Sets Readline's idea of the current keymap for key binding
- commands. Acceptable 'keymap' names are 'emacs',
+ commands. Built-in '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.
+ equivalent to 'emacs-standard'. Applications may add
+ additional names. 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
@@ -617,10 +617,10 @@ Variable Settings
default value is 'off'.
'show-mode-in-prompt'
- If set to 'on', add a character to the beginning of the prompt
+ If set to 'on', add a string 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'.
+ insertion. The mode strings are user-settable (e.g.,
+ EMACS-MODE-STRING). The default value is 'off'.
'skip-completed-text'
If set to 'on', this alters the default completion behavior
@@ -636,24 +636,26 @@ Variable Settings
'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)'.
+ If the SHOW-MODE-IN-PROMPT variable is enabled, 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)'.
+ If the SHOW-MODE-IN-PROMPT variable is enabled, 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
@@ -684,7 +686,7 @@ Key Bindings
Meta-Rubout: backward-kill-word
Control-o: "> output"
- In the above example, 'C-u' is bound to the function
+ In the example above, '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
@@ -776,8 +778,9 @@ 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.
+ The text of the test, after any comparison operator, extends to the
+ end of the line; unless otherwise noted, no characters are required
+ to isolate it.
'mode'
The 'mode=' form of the '$if' directive is used to test
@@ -794,6 +797,22 @@ four parser directives used.
the portion of the terminal name before the first '-'. This
allows 'sun' to match both 'sun' and 'sun-cmd', for instance.
+ 'version'
+ The 'version' test may be used to perform comparisons against
+ specific Readline versions. The 'version' expands to the
+ current Readline version. The set of comparison operators
+ includes '=' (and '=='), '!=', '<=', '>=', '<', and '>'. The
+ version number supplied on the right side of the operator
+ consists of a major version number, an optional decimal point,
+ and an optional minor version (e.g., '7.1'). If the minor
+ version is omitted, it is assumed to be '0'. The operator may
+ be separated from the string 'version' and from the version
+ number argument by whitespace. The following example sets a
+ variable if the Readline version being used is 7.0 or newer:
+ $if version >= 7.0
+ set show-mode-in-prompt on
+ $endif
+
'application'
The APPLICATION construct is used to include
application-specific settings. Each program using the
@@ -807,6 +826,20 @@ four parser directives used.
"\C-xq": "\eb\"\ef\""
$endif
+ 'variable'
+ The VARIABLE construct provides simple equality tests for
+ Readline variables and values. The permitted comparison
+ operators are '=', '==', and '!='. The variable name must be
+ separated from the comparison operator by whitespace; the
+ operator may be separated from the value on the right hand
+ side by whitespace. Both string and boolean variables may be
+ tested. Boolean variables must be tested against the values
+ ON and OFF. The following example is equivalent to the
+ 'mode=emacs' test described above:
+ $if editing-mode == emacs
+ set show-mode-in-prompt on
+ $endif
+
'$endif'
This command, as seen in the previous example, terminates an '$if'
command.
@@ -982,6 +1015,20 @@ File: readline.info, Node: Commands For Moving, Next: Commands For History, U
Move back to the start of the current or previous word. Words are
composed of letters and digits.
+'previous-screen-line ()'
+ Attempt to move point to the same physical screen column on the
+ previous physical screen line. This will not have the desired
+ effect if the current Readline line does not take up more than one
+ physical line or if point is not greater than the length of the
+ prompt plus the screen width.
+
+'next-screen-line ()'
+ Attempt to move point to the same physical screen column on the
+ next physical screen line. This will not have the desired effect
+ if the current Readline line does not take up more than one
+ physical line or if the length of the current Readline line is not
+ greater than the length of the prompt plus the screen width.
+
'clear-screen (C-l)'
Clear the screen and redraw the current line, leaving the current
line at the top of the screen.
@@ -1047,13 +1094,13 @@ File: readline.info, Node: Commands For History, Next: Commands For Text, Pre
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-substring-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-substring-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
@@ -1122,7 +1169,7 @@ File: readline.info, Node: Commands For Text, Next: Commands For Killing, Pre
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
+ was bound to 'self-insert' instead of executing any editing
commands.
'transpose-chars (C-t)'
@@ -1331,9 +1378,10 @@ File: readline.info, Node: Miscellaneous Commands, Prev: Keyboard Macros, Up:
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.
+'do-lowercase-version (M-A, M-B, M-X, ...)'
+ If the metafied character X is upper case, run the command that is
+ bound to the corresponding metafied lower case character. The
+ behavior is undefined if X is already lower case.
'prefix-meta ()'
Metafy the next character typed. This is for keyboards without a
@@ -1507,6 +1555,11 @@ the final newline removed, so only the text remains.
line is empty at that point, then '(char *)NULL' is returned.
Otherwise, the line is ended just as if a newline had been typed.
+ Readline performs some expansion on the PROMPT before it is displayed
+on the screen. See the description of 'rl_expand_prompt' (*note
+Redisplay::) for additional details, especially if PROMPT will contain
+characters that do not consume physical screen space when displayed.
+
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.
@@ -2064,6 +2117,10 @@ which keymap to use.
Free all storage associated with KEYMAP. This calls
'rl_discard_keymap' to free subordindate keymaps and macros.
+ -- Function: int rl_empty_keymap (Keymap keymap)
+ Return non-zero if there are no keys bound to functions in KEYMAP;
+ zero if there are any keys bound.
+
Readline has several internal keymaps. These functions allow you to
change which keymap is active.
@@ -2083,6 +2140,21 @@ change which keymap is active.
supplied in a 'set keymap' inputrc line (*note Readline Init
File::).
+ -- Function: int rl_set_keymap_name (const char *name, Keymap keymap)
+ Set the name of KEYMAP. This name will then be "registered" and
+ available for use in a 'set keymap' inputrc directive *note
+ Readline Init File::). The NAME may not be one of Readline's
+ builtin keymap names; you may not add a different name for one of
+ Readline's builtin keymaps. You may replace the name associated
+ with a given keymap by calling this function more than once with
+ the same KEYMAP argument. You may associate a registered NAME with
+ a new keymap by calling this function more than once with the same
+ NAME argument. There is no way to remove a named keymap once the
+ name has been registered. Readline will make a copy of NAME. The
+ return value is greater than zero unless NAME is one of Readline's
+ builtin keymap names or KEYMAP is one of Readline's builtin
+ keymaps.
+
File: readline.info, Node: Binding Keys, Next: Associating Function Names and Bindings, Prev: Keymaps, Up: Readline Convenience Functions
@@ -2205,7 +2277,16 @@ associate a new function name with an arbitrary function.
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').
+ (one of 'ISFUNC', 'ISKMAP', or 'ISMACR'). It takes a "translated"
+ key sequence and should not be used if the key sequence can include
+ NUL.
+
+ -- Function: rl_command_func_t * rl_function_of_keyseq_len (const char
+ *keyseq, size_t len, Keymap map, int *type)
+ Return the function invoked by KEYSEQ of length LEN in keymap MAP.
+ Equivalent to 'rl_function_of_keyseq' with the addition of the LEN
+ parameter. It takes a "translated" key sequence and should be used
+ if the key sequence can include NUL.
-- Function: char ** rl_invoking_keyseqs (rl_command_func_t *function)
Return an array of strings representing the key sequences used to
@@ -2853,10 +2934,10 @@ understands the EOF character or "exit" to exit the program.
break;
}
if (sigwinch_received)
- {
+ {
rl_resize_terminal ();
sigwinch_received = 0;
- }
+ }
if (r < 0)
continue;
@@ -2994,6 +3075,19 @@ terminal and internal state cleanup upon receipt of a signal.
signal handlers, depending on the values of 'rl_catch_signals' and
'rl_catch_sigwinch'.
+ If an application wants to force Readline to handle any signals that
+have arrived while it has been executing, 'rl_check_signals()' will call
+Readline's internal signal handler if there are any pending signals.
+This is primarily intended for those applications that use a custom
+'rl_getc_function' (*note Readline Variables::) and wish to handle
+signals received while waiting for input.
+
+ -- Function: void rl_check_signals (void)
+ If there are any pending signals, call Readline's internal signal
+ handling functions to process them. 'rl_pending_signal()' can be
+ used independently to determine whether or not there are any
+ pending signals.
+
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.
@@ -3381,7 +3475,9 @@ File: readline.info, Node: Completion Variables, Next: A Short Completion Exam
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.
+ specification. It is set to the default before any
+ application-specific completion function is called, and may only be
+ changed within such a function.
-- Variable: int rl_completion_suppress_append
If non-zero, RL_COMPLETION_APPEND_CHARACTER is not appended to
@@ -4500,10 +4596,10 @@ Function and Variable Index
* call-last-kbd-macro (C-x e): Keyboard Macros. (line 13)
* capitalize-word (M-c): Commands For Text. (line 64)
* character-search (C-]): Miscellaneous Commands.
- (line 41)
+ (line 42)
* character-search-backward (M-C-]): Miscellaneous Commands.
- (line 46)
-* clear-screen (C-l): Commands For Moving. (line 26)
+ (line 47)
+* clear-screen (C-l): Commands For Moving. (line 40)
* colored-completion-prefix: Readline Init File Syntax.
(line 52)
* colored-stats: Readline Init File Syntax.
@@ -4538,21 +4634,21 @@ Function and Variable Index
* digit-argument (M-0, M-1, ... M--): Numeric Arguments. (line 6)
* disable-completion: Readline Init File Syntax.
(line 113)
-* do-uppercase-version (M-a, M-b, M-X, ...): Miscellaneous Commands.
+* do-lowercase-version (M-A, M-B, M-X, ...): Miscellaneous Commands.
(line 14)
* downcase-word (M-l): Commands For Text. (line 60)
* dump-functions (): Miscellaneous Commands.
- (line 69)
+ (line 70)
* dump-macros (): Miscellaneous Commands.
- (line 81)
+ (line 82)
* dump-variables (): Miscellaneous Commands.
- (line 75)
+ (line 76)
* echo-control-characters: Readline Init File Syntax.
(line 118)
* editing-mode: Readline Init File Syntax.
(line 123)
* emacs-editing-mode (C-e): Miscellaneous Commands.
- (line 87)
+ (line 88)
* emacs-mode-string: Readline Init File Syntax.
(line 129)
* enable-bracketed-paste: Readline Init File Syntax.
@@ -4565,7 +4661,7 @@ Function and Variable Index
(line 22)
* end-of-line (C-e): Commands For Moving. (line 9)
* exchange-point-and-mark (C-x C-x): Miscellaneous Commands.
- (line 36)
+ (line 37)
* expand-tilde: Readline Init File Syntax.
(line 158)
* forward-backward-delete-char (): Commands For Text. (line 21)
@@ -4581,16 +4677,16 @@ Function and Variable Index
(line 46)
* history-size: Readline Init File Syntax.
(line 168)
-* history-substr-search-backward (): Commands For History.
+* history-substring-search-backward (): Commands For History.
(line 64)
-* history-substr-search-forward (): Commands For History.
+* history-substring-search-forward (): Commands For History.
(line 58)
* horizontal-scroll-mode: Readline Init File Syntax.
(line 177)
* input-meta: Readline Init File Syntax.
(line 184)
* insert-comment (M-#): Miscellaneous Commands.
- (line 60)
+ (line 61)
* insert-completions (M-*): Commands For Completion.
(line 18)
* isearch-terminators: Readline Init File Syntax.
@@ -4621,6 +4717,7 @@ Function and Variable Index
(line 184)
* next-history (C-n): Commands For History.
(line 16)
+* next-screen-line (): Commands For Moving. (line 33)
* non-incremental-forward-search-history (M-n): Commands For History.
(line 40)
* non-incremental-reverse-search-history (M-p): Commands For History.
@@ -4633,31 +4730,32 @@ Function and Variable Index
* possible-completions (M-?): Commands For Completion.
(line 11)
* prefix-meta (): Miscellaneous Commands.
- (line 18)
+ (line 19)
* previous-history (C-p): Commands For History.
(line 12)
+* previous-screen-line (): Commands For Moving. (line 26)
* print-last-kbd-macro (): Keyboard Macros. (line 17)
* quoted-insert (C-q or C-v): Commands For Text. (line 26)
* re-read-init-file (C-x C-r): Miscellaneous Commands.
(line 6)
* readline: Basic Behavior. (line 12)
-* redraw-current-line (): Commands For Moving. (line 30)
+* redraw-current-line (): Commands For Moving. (line 44)
* reverse-search-history (C-r): Commands For History.
(line 26)
* revert-all-at-newline: Readline Init File Syntax.
(line 267)
* revert-line (M-r): Miscellaneous Commands.
- (line 25)
+ (line 26)
* rl_add_defun: Function Naming. (line 18)
* rl_add_funmap_entry: Associating Function Names and Bindings.
- (line 45)
+ (line 54)
* 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 11)
* rl_attempted_completion_over: Completion Variables.
- (line 253)
+ (line 255)
* rl_basic_quote_characters: Completion Variables.
(line 143)
* rl_basic_word_break_characters: Completion Variables.
@@ -4684,6 +4782,8 @@ Function and Variable Index
(line 90)
* rl_char_is_quoted_p: Completion Variables.
(line 45)
+* rl_check_signals: Readline Signal Handling.
+ (line 133)
* rl_cleanup_after_signal: Readline Signal Handling.
(line 107)
* rl_clear_history: Miscellaneous Functions.
@@ -4691,7 +4791,7 @@ Function and Variable Index
* rl_clear_message: Redisplay. (line 51)
* rl_clear_pending_input: Character Input. (line 29)
* rl_clear_signals: Readline Signal Handling.
- (line 166)
+ (line 179)
* rl_clear_visible_line: Redisplay. (line 25)
* rl_complete: How Completing Works.
(line 46)
@@ -4712,11 +4812,11 @@ Function and Variable Index
* rl_completion_entry_function <1>: Completion Variables.
(line 6)
* rl_completion_found_quote: Completion Variables.
- (line 212)
+ (line 214)
* rl_completion_invoking_key: Completion Variables.
- (line 276)
+ (line 278)
* rl_completion_mark_symlink_dirs: Completion Variables.
- (line 218)
+ (line 220)
* rl_completion_matches: Completion Functions.
(line 43)
* rl_completion_mode: Completion Functions.
@@ -4724,13 +4824,13 @@ Function and Variable Index
* rl_completion_query_items: Completion Variables.
(line 178)
* rl_completion_quote_character: Completion Variables.
- (line 200)
+ (line 202)
* rl_completion_suppress_append: Completion Variables.
- (line 194)
+ (line 196)
* rl_completion_suppress_quote: Completion Variables.
- (line 206)
+ (line 208)
* rl_completion_type: Completion Variables.
- (line 268)
+ (line 270)
* rl_completion_word_break_hook: Completion Variables.
(line 151)
* rl_copy_keymap: Keymaps. (line 16)
@@ -4751,8 +4851,9 @@ Function and Variable Index
* rl_done: Readline Variables. (line 27)
* rl_do_undo: Allowing Undoing. (line 47)
* rl_echo_signal_char: Readline Signal Handling.
- (line 130)
+ (line 143)
* rl_editing_mode: Readline Variables. (line 281)
+* rl_empty_keymap: Keymaps. (line 33)
* rl_end: Readline Variables. (line 18)
* rl_end_undo_group: Allowing Undoing. (line 34)
* rl_erase_empty_line: Readline Variables. (line 46)
@@ -4766,7 +4867,7 @@ Function and Variable Index
* rl_explicit_arg: Readline Variables. (line 272)
* rl_extend_line_buffer: Utility Functions. (line 26)
* rl_filename_completion_desired: Completion Variables.
- (line 233)
+ (line 235)
* rl_filename_completion_function: Completion Functions.
(line 57)
* rl_filename_dequoting_function: Completion Variables.
@@ -4774,7 +4875,7 @@ Function and Variable Index
* rl_filename_quote_characters: Completion Variables.
(line 166)
* rl_filename_quoting_desired: Completion Variables.
- (line 243)
+ (line 245)
* rl_filename_quoting_function: Completion Variables.
(line 23)
* rl_filename_rewrite_hook: Completion Variables.
@@ -4788,28 +4889,30 @@ Function and Variable Index
(line 113)
* rl_free_undo_list: Allowing Undoing. (line 44)
* rl_function_dumper: Associating Function Names and Bindings.
- (line 29)
+ (line 38)
* rl_function_of_keyseq: Associating Function Names and Bindings.
(line 13)
+* rl_function_of_keyseq_len: Associating Function Names and Bindings.
+ (line 22)
* rl_funmap_names: Associating Function Names and Bindings.
- (line 39)
+ (line 48)
* 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_keymap: Keymaps. (line 40)
+* rl_get_keymap_by_name: Keymaps. (line 46)
+* rl_get_keymap_name: Keymaps. (line 51)
* rl_get_screen_size: Readline Signal Handling.
- (line 149)
+ (line 162)
* rl_get_termcap: Miscellaneous Functions.
(line 41)
* rl_gnu_readline_p: Readline Variables. (line 82)
* rl_ignore_completion_duplicates: Completion Variables.
- (line 229)
+ (line 231)
* rl_ignore_some_completions_function: Completion Variables.
(line 55)
* rl_inhibit_completion: Completion Variables.
- (line 282)
+ (line 284)
* rl_initialize: Utility Functions. (line 30)
* rl_input_available_hook: Readline Variables. (line 140)
* rl_insert_completions: Completion Functions.
@@ -4817,16 +4920,16 @@ Function and Variable Index
* rl_insert_text: Modifying Text. (line 6)
* rl_instream: Readline Variables. (line 96)
* rl_invoking_keyseqs: Associating Function Names and Bindings.
- (line 20)
+ (line 29)
* rl_invoking_keyseqs_in_map: Associating Function Names and Bindings.
- (line 24)
+ (line 33)
* 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 35)
+ (line 44)
* rl_macro_bind: Miscellaneous Functions.
(line 6)
* rl_macro_dumper: Miscellaneous Functions.
@@ -4870,28 +4973,29 @@ Function and Variable Index
(line 121)
* rl_reset_line_state: Redisplay. (line 29)
* rl_reset_screen_size: Readline Signal Handling.
- (line 153)
+ (line 166)
* rl_reset_terminal: Terminal Management. (line 34)
* rl_resize_terminal: Readline Signal Handling.
- (line 136)
+ (line 149)
* 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_keymap: Keymaps. (line 43)
+* rl_set_keymap_name: Keymaps. (line 56)
* rl_set_paren_blink_timeout: Miscellaneous Functions.
(line 36)
* rl_set_prompt: Redisplay. (line 80)
* rl_set_screen_size: Readline Signal Handling.
- (line 140)
+ (line 153)
* rl_set_signals: Readline Signal Handling.
- (line 160)
+ (line 173)
* rl_show_char: Redisplay. (line 36)
* rl_signal_event_hook: Readline Variables. (line 136)
* rl_sort_completion_matches: Completion Variables.
- (line 260)
+ (line 262)
* rl_special_prefixes: Completion Variables.
(line 171)
* rl_startup_hook: Readline Variables. (line 114)
@@ -4914,7 +5018,7 @@ Function and Variable Index
(line 25)
* self-insert (a, b, A, 1, !, ...): Commands For Text. (line 33)
* set-mark (C-@): Miscellaneous Commands.
- (line 32)
+ (line 33)
* show-all-if-ambiguous: Readline Init File Syntax.
(line 273)
* show-all-if-unmodified: Readline Init File Syntax.
@@ -4924,15 +5028,15 @@ Function and Variable Index
* skip-completed-text: Readline Init File Syntax.
(line 294)
* skip-csi-sequence (): Miscellaneous Commands.
- (line 51)
+ (line 52)
* start-kbd-macro (C-x (): Keyboard Macros. (line 6)
* tab-insert (M-): Commands For Text. (line 30)
* tilde-expand (M-~): Miscellaneous Commands.
- (line 29)
+ (line 30)
* 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)
+ (line 23)
* universal-argument (): Numeric Arguments. (line 10)
* unix-filename-rubout (): Commands For Killing.
(line 32)
@@ -4944,11 +5048,11 @@ Function and Variable Index
* vi-cmd-mode-string: Readline Init File Syntax.
(line 307)
* vi-editing-mode (M-C-j): Miscellaneous Commands.
- (line 91)
+ (line 92)
* vi-ins-mode-string: Readline Init File Syntax.
- (line 317)
+ (line 318)
* visible-stats: Readline Init File Syntax.
- (line 327)
+ (line 329)
* yank (C-y): Commands For Killing.
(line 59)
* yank-last-arg (M-. or M-_): Commands For History.
@@ -4961,58 +5065,58 @@ Function and Variable Index
Tag Table:
-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
+Node: Top865
+Node: Command Line Editing1590
+Node: Introduction and Notation2242
+Node: Readline Interaction3866
+Node: Readline Bare Essentials5058
+Node: Readline Movement Commands6842
+Node: Readline Killing Commands7803
+Node: Readline Arguments9722
+Node: Searching10767
+Node: Readline Init File12920
+Node: Readline Init File Syntax14074
+Node: Conditional Init Constructs34233
+Node: Sample Init File38430
+Node: Bindable Readline Commands41548
+Node: Commands For Moving42603
+Node: Commands For History44170
+Node: Commands For Text48435
+Node: Commands For Killing51877
+Node: Numeric Arguments54044
+Node: Commands For Completion55184
+Node: Keyboard Macros57153
+Node: Miscellaneous Commands57841
+Node: Readline vi Mode61763
+Node: Programming with GNU Readline63580
+Node: Basic Behavior64566
+Node: Custom Functions68249
+Node: Readline Typedefs69732
+Node: Function Writing71366
+Node: Readline Variables72680
+Node: Readline Convenience Functions85352
+Node: Function Naming86424
+Node: Keymaps87686
+Node: Binding Keys90765
+Node: Associating Function Names and Bindings95313
+Node: Allowing Undoing98092
+Node: Redisplay100642
+Node: Modifying Text104666
+Node: Character Input105913
+Node: Terminal Management107811
+Node: Utility Functions109634
+Node: Miscellaneous Functions112962
+Node: Alternate Interface115551
+Node: A Readline Example118293
+Node: Alternate Interface Example120232
+Node: Readline Signal Handling123764
+Node: Custom Completers132813
+Node: How Completing Works133533
+Node: Completion Functions136840
+Node: Completion Variables140414
+Node: A Short Completion Example156205
+Node: GNU Free Documentation License168984
+Node: Concept Index194158
+Node: Function and Variable Index195679
End Tag Table
diff --git a/doc/readline.pdf b/doc/readline.pdf
index 01d26a6ef33c3c756ceb4c908f12b14bc1e8e39e..95f99b9e9d084e89846edbdee8171bb88735f0bb 100644
GIT binary patch
delta 183557
zc-m}wQ*@wBv}|l!6Wg{Yb~3ST+h1(k#>6%znb`Kkwypc0b06=0>guOnYgg@EwR-KP
zeeCu`ocbPUaCT?K&e4Ee8JB^f7mLymD*e`#Ky$?g6FUS~4Ic&Hoe?vyT>lB-=f65EeMK3sOYddYR
zqb%&3xhhhdPvG@O+tOTSlN_B@ELZjBL0$~xX}85?*5}T#hDVWv1@Iz&u?)PCq+K)u
zGJ4+F@t5Lm>*~PwnuQ;FiH4&knTLd5qFX!0?Y&77yzoQg1&Lk?pc)t`O;
zJomQPYf^S!wYy|{F2yeq2y17mfNKl18zZbk-#3hfXyKiv1N#$M8Oe=fLp;dbPAEF?
zPB0+_KQ8=Sv%3tsZT09}42yvcC$`t_qf%L?3U9*Y&4=w?^iI42%dLQkDo|Dke%)B)
z+|f3yWD8hoP_F-_C%FR_0l1SPUv0QoQ4GZr3$27}?MWdN-J?*y7j|!TT@u>HjW+@>
zU6SE@ddYs~LPZVFkDw*QRH00zEjHJ5s%!B;{ZTuuLAsM7C-Q}jW?_Xl1n)qVy>zRU
zCLTnEStr)KX3VX8E0*TfY*p-FyMWskw;)$vNVsCv@9w7ftll-81?aS=$U#s3v*Itg
z_*lT6*FEjLoWfa555S&Wc2|7H&%4dHaW%}%lwhSn_lGF&HcdjmSO~!ZLwX@9()L#9
zpzcq;QHQLO-pJM=I(a`LQze4WjF3}OM$WaGm2ZnnJ*eiaDNe?fe&bESsLqtI_*Xq*
zuE?~Ib}()9U}r*g!m*v^S|-Rzn>gy-KF@j
zAu>n0|B$7@byJslD-E$xqyAkU#sDK&NrZlW_I
z97(34AA^XAIl&K_ubPF>;Y$gJI1GtZI*THSwtnfwcbkh)uKUhsfa
z9*S~ue`|WmFPG<1vvw7nf5jput2kvp%MPjX6LwwD_|b+x#EArRzUZM_CYsb1h1xQB
z2jo*}k*&K20B|QfBDWajizUk&G8&By=8&olw?#GjdZbJvETosoIQsuQJyr+%ccj*t
z`v2*=j6JU}uiUGTKM+&f#Sa)Cs8{a6ahD#DsA0OYT6I`)O4GRLpZw8*LlvYK^8h-^
z${flR0n0|Q*kV7sF0z~XAOX}NQm`q{>@5sIL&BvM0fzVxCkAZZi8L0?CN}{*1^gAC
zwO`yg*!|o>I8^QJm_Cw}iWv7?1S~S!#QYEJOr6A;-2~bGE21U_r@a1oj`*YCwmrq;
z()ch&NBZG21F;F?_b?66gu9mp{Gv^L#a#aT>O`DXLM)24+i+&~rY^3|W=3}ZgB*;l
z;W(Q*5#S*J7qWsYVRiilb4j`1Gp1H!jZ|e#tvZ=iic!^$ZN{(0GNH$_J_*Z;f8t0>HTuZ!q?bA(<4oZRRg89v<)(sH3yoNxnL$o
zxNtGZGoWlNOh^cF8sN!Gu6>SSGGhYF5Fm1!Eh}8Wx%c(-+HpcKJ7&b#u~fh>!mK)^
z$Jy{>{+vk*%tw^6DuGFBUSwQ#A>|{1l4qZnr^+kF9$>(LWBchgh)*PB9J>*uM3ea!
zj9Gv9v1Y~#X%T&&D+j!m{0JCo#CQN?HmO|HMR{j~SkLQ~w#s>~w>oS(RyV
zHT0!8-|iPoMrJVS&VUO{hzHl7$M
zew@BlD;Etd#6Iw#Mky{1YE9vyiqWCoI3NN@(iWvZ26kpeRhN|p!4*yyfMTX@YG-Y1
zH(zgb8mwVBtvT$=2H?d?c~x6}DCAVb3+DvgASj^Q>~n*Py9Go}g5da@ZP?fZF7zsy3Q)x?3hwcKjS>kJf8h?G)K
zD0w}gO{BXwzYok}=uByh!TV+q)V&MoWe#XUicgClN5KE1nk%A7K0&(%9`F#AJPK&)
zPAx0{vmyk`M)(z>@S#c~dl;Ra*TW2!l`_T^UydnA`2LF^tZP}kM%<^f_oV7S=Cy^h
zFE<42=-~Ua|FOfaCEvA@m_!@U&81qwU(bp5H
zCGv9aJYHBYR$G0cunY+RX>Jw|5ySs>q-*ZlEVs$FUlV3y3|xYGDZ2l}ATc*C4EgUB
zl0qGJ?K{vjYtjD{3SB%b>%IJ_^)0nw9*9h)rXn233+HV{FoVzLEaEz
zVF|~Kkt2r`8p+$XiFp=HiM|$N{{y)yp4Z_Gy4Wg%~>*oSHdV0zQyg
zIaX0&c8<;e=(bSgxg=Op8GSRf#8>!vo&|OMuUSms{NaF$XQ=&xr626?D$ogQ?Z5S^
zI_StSO%=1J_FRISCTmc7E=ETt3U-fWESuWbi1ekCm!hteJew@&?Y|Fyd5;h9bA?6Z8*vwD3(uB_|Y&DGOz
z=l?WK5SllC!b0%7if7!KH;&fLb2s()w`+N^T346;N+$%4i6q8v+Jjr#kzX_=qikU!
zWB0o}ccO5X52{FuO9%gz!%LSK&wQd)?>N|NR&{ka-3|a@TugrnBx<_}-pkyZSOq(r
z_-`P<^_0yCDi_oq(N&$k7!w!~-k806Z0Rrg_59=N>6y8FGtci#l8B@G_p{0392|q1
zC=Z;LoeLD>zj2VdfwYc5q&-?N+LhC@&;9|f_h@fi2MZlFn~hs9HDXWl>gTz7GMCG6=$~;1
zViVJ7s}G*>1&3ux5gj8}i2qg_@2xI4vplxLB*n;yti*RcA
zlF>hje5B8^{@=OG!pz>pgG~ntI+SdNBMz#TT!q5}8kl^D;{i&XtcS}6`jniA+X$MH
zEQa?Jv^zNhj~k9fQ#=2eN$1;eI(ZzA4~dN#j!DkU-on+An1zQs*=UglXwi~&!RJEj
zz1P@j?+CDD$3s-@P&pi-l|EFanFxRM_A?}xFb}2F!)P)4e*a_^XtcDFP*ERPKwycz
zKF9vA>vbK+mUbe3m^oqSVYp=yj6|T8qi!!^4!7-D|1IW)OVWE6*0M-smW{T#)4hRE
zsazTgdBq5T27wtufPm@+z(^^uN!E9TQ=FX;<~0Atkc@M5Qql(gU@J@F9>y3lwM2v0
z7_qB_7{P(Vy$c`?#dHdU)@A6Uz1Z2$Ar>QP|Hm&MD{hiUBFKo1
zBS*3a*-ygFyn?Vo7KI1XAVR>=ha1voWyu{u@L