summaryrefslogtreecommitdiffstats
path: root/contrib/libreadline/doc
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1999-05-28 01:59:23 +0000
committerache <ache@FreeBSD.org>1999-05-28 01:59:23 +0000
commit2924f819d6394af57d520bb211ba5a0e37e6f800 (patch)
tree1f27af8c56aebf6caa6ac27d2783aed1480c1ef4 /contrib/libreadline/doc
parentbeda46afe79460ec469e1a625a7b93bfca19b818 (diff)
parent2fbece35f71145c1c63d12046e54a9c059114d69 (diff)
downloadFreeBSD-src-2924f819d6394af57d520bb211ba5a0e37e6f800.zip
FreeBSD-src-2924f819d6394af57d520bb211ba5a0e37e6f800.tar.gz
This commit was generated by cvs2svn to compensate for changes in r47558,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/libreadline/doc')
-rw-r--r--contrib/libreadline/doc/Makefile.in37
-rw-r--r--contrib/libreadline/doc/hist.texinfo19
-rw-r--r--contrib/libreadline/doc/manvers.texinfo6
-rw-r--r--contrib/libreadline/doc/rlman.texinfo19
-rw-r--r--contrib/libreadline/doc/rltech.texinfo163
-rw-r--r--contrib/libreadline/doc/rluser.texinfo50
6 files changed, 241 insertions, 53 deletions
diff --git a/contrib/libreadline/doc/Makefile.in b/contrib/libreadline/doc/Makefile.in
index 63da1be..1031472 100644
--- a/contrib/libreadline/doc/Makefile.in
+++ b/contrib/libreadline/doc/Makefile.in
@@ -10,6 +10,7 @@ infodir = @infodir@
mandir = @mandir@
man3dir = $(mandir)/man3
+SHELL = @MAKE_SHELL@
RM = rm -f
TEXINPUTDIR = $(srcdir)
@@ -25,9 +26,9 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
RLSRC = $(srcdir)/rlman.texinfo $(srcdir)/rluser.texinfo \
- $(srcdir)/rltech.texinfo
+ $(srcdir)/rltech.texinfo $(srcdir)/manvers.texinfo
HISTSRC = $(srcdir)/hist.texinfo $(srcdir)/hsuser.texinfo \
- $(srcdir)/hstech.texinfo
+ $(srcdir)/hstech.texinfo $(srcdir)/manvers.texinfo
# This should be a program that converts troff to an ascii-readable format
NROFF = groff -Tascii
@@ -42,6 +43,8 @@ HTMLOBJ = readline.html history.html
HTMLTOC = readline_toc.html history_toc.html
TEXTOBJ = readline.0
+INTERMEDIATE_OBJ = rlman.dvi hist.dvi
+
CREATED_DOCS = $(DVIOBJ) $(INFOOBJ) $(PSOBJ) $(HTMLOBJ) $(HTMLTOC) $(TEXTOBJ)
.SUFFIXES: .0 .3 .ps .txt .dvi
@@ -76,16 +79,14 @@ history.ps: history.dvi
$(DVIPS) history.dvi
readline.html: ${RLSRC}
- $(TEXI2HTML) -I $(TEXINPUTDIR) $(srcdir)/rlman.texinfo
- sed -e 's:rlman.html:readline.html:' -e 's:rlman_toc.html:readline_toc.html:' rlman.html > readline.html
- sed -e 's:rlman.html:readline.html:' -e 's:rlman_toc.html:readline_toc.html:' rlman_toc.html > readline_toc.html
- $(RM) rlman.html rlman_toc.html
+ $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texinfo
+ sed -e 's:rlman.html:readline.html:' rlman.html > readline.html
+ $(RM) rlman.html
history.html: ${HISTSRC}
- $(TEXI2HTML) -I $(TEXINPUTDIR) $(srcdir)/hist.texinfo
- sed -e 's:hist.html:history.html:' -e 's:hist_toc.html:history_toc.html:' hist.html > history.html
- sed -e 's:hist.html:history.html:' -e 's:hist_toc.html:history_toc.html:' hist_toc.html > history_toc.html
- $(RM) hist.html hist_toc.html
+ $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/hist.texinfo
+ sed -e 's:hist.html:history.html:' hist.html > history.html
+ $(RM) hist.html
info: $(INFOOBJ)
dvi: $(DVIOBJ)
@@ -101,20 +102,30 @@ clean:
distclean: clean
$(RM) $(CREATED_DOCS)
+ $(RM) $(INTERMEDIATE_OBJ)
$(RM) Makefile
mostlyclean: clean
maintainer-clean: clean
$(RM) $(CREATED_DOCS)
+ $(RM) $(INTERMEDIATE_OBJ)
$(RM) Makefile
installdirs: $(top_srcdir)/support/mkdirs
-$(SHELL) $(top_srcdir)/support/mkdirs $(infodir) $(man3dir)
-install: installdirs info
- ${INSTALL_DATA} readline.info $(infodir)/readline.info
- ${INSTALL_DATA} history.info $(infodir)/history.info
+install: installdirs
+ if test -f readline.info; then \
+ ${INSTALL_DATA} readline.info $(infodir)/readline.info; \
+ else \
+ ${INSTALL_DATA} $(srcdir)/readline.info $(infodir)/readline.info; \
+ fi
+ if test -f history.info; then \
+ ${INSTALL_DATA} history.info $(infodir)/history.info; \
+ else \
+ ${INSTALL_DATA} $(srcdir)/history.info $(infodir)/history.info; \
+ fi
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
install-info --dir-file=$(infodir)/dir $(infodir)/readline.info ; \
install-info --dir-file=$(infodir)/dir $(infodir)/history.info ; \
diff --git a/contrib/libreadline/doc/hist.texinfo b/contrib/libreadline/doc/hist.texinfo
index be8742f..31a0ba0 100644
--- a/contrib/libreadline/doc/hist.texinfo
+++ b/contrib/libreadline/doc/hist.texinfo
@@ -6,26 +6,19 @@
@setchapternewpage odd
-@ignore
-last change: Thu Apr 2 14:38:22 EST 1998
-@end ignore
-
-@set EDITION 2.2
-@set VERSION 2.2
-@set UPDATED 2 April 1998
-@set UPDATE-MONTH April 1998
+@include manvers.texinfo
+@ifinfo
@dircategory Libraries
@direntry
* History: (history). The GNU history library API
@end direntry
-@ifinfo
This document describes the GNU History library, a programming tool that
provides a consistent user interface for recalling lines of previously
typed input.
-Copyright (C) 1988, 1991, 1993, 1995, 1996, 1998 Free Software Foundation, Inc.
+Copyright (C) 1988-1999 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -46,7 +39,7 @@ notice identical to this one.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation approved
-by the Foundation.
+by the Free Software Foundation.
@end ifinfo
@titlepage
@@ -77,10 +70,10 @@ notice identical to this one.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation approved
-by the Foundation.
+by the Free Software Foundation.
@vskip 0pt plus 1filll
-Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
+Copyright @copyright{} 1988-1999 Free Software Foundation, Inc.
@end titlepage
@ifinfo
diff --git a/contrib/libreadline/doc/manvers.texinfo b/contrib/libreadline/doc/manvers.texinfo
new file mode 100644
index 0000000..63924e3
--- /dev/null
+++ b/contrib/libreadline/doc/manvers.texinfo
@@ -0,0 +1,6 @@
+@set EDITION 4.0
+@set VERSION 4.0
+@set UPDATED 31 December 1998
+@set UPDATE-MONTH December 1998
+
+@set LASTCHANGE Thu Dec 31 10:17:05 EST 1998
diff --git a/contrib/libreadline/doc/rlman.texinfo b/contrib/libreadline/doc/rlman.texinfo
index dd6478a..41bafbf 100644
--- a/contrib/libreadline/doc/rlman.texinfo
+++ b/contrib/libreadline/doc/rlman.texinfo
@@ -6,26 +6,19 @@
@synindex vr fn
@setchapternewpage odd
-@ignore
-last change: Thu Apr 2 14:39:03 EST 1998
-@end ignore
-
-@set EDITION 2.2
-@set VERSION 2.2
-@set UPDATED 2 April 1998
-@set UPDATE-MONTH April 1998
+@include manvers.texinfo
+@ifinfo
@dircategory Libraries
@direntry
* Readline: (readline). The GNU readline library API
@end direntry
-@ifinfo
This document describes the GNU Readline Library, a utility which aids
in the consistency of user interface across discrete programs that need
to provide a command line interface.
-Copyright (C) 1988, 1991, 1993, 1996, 1998 Free Software Foundation, Inc.
+Copyright (C) 1988-1999 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -46,7 +39,7 @@ notice identical to this one.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation approved
-by the Foundation.
+by the Free Software Foundation.
@end ifinfo
@titlepage
@@ -77,10 +70,10 @@ notice identical to this one.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation approved
-by the Foundation.
+by the Free Software Foundation.
@vskip 0pt plus 1filll
-Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
+Copyright @copyright{} 1988-1999 Free Software Foundation, Inc.
@end titlepage
@ifinfo
diff --git a/contrib/libreadline/doc/rltech.texinfo b/contrib/libreadline/doc/rltech.texinfo
index bce5087..ea8d7f8 100644
--- a/contrib/libreadline/doc/rltech.texinfo
+++ b/contrib/libreadline/doc/rltech.texinfo
@@ -8,7 +8,7 @@ This document describes the GNU Readline Library, a utility for aiding
in the consitency of user interface across discrete programs that need
to provide a command line interface.
-Copyright (C) 1988, 1994, 1996 Free Software Foundation, Inc.
+Copyright (C) 1988, 1994, 1996, 1998, 1999 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -47,7 +47,9 @@ in your own programs, this section is for you.
* Readline Variables:: Variables accessible to custom
functions.
* Readline Convenience Functions:: Functions which Readline supplies to
- aid in writing your own
+ aid in writing your own custom
+ functions.
+* Readline Signal Handling:: How Readline behaves when it receives signals.
* Custom Completers:: Supplanting or supplementing Readline's
completion functions.
@end menu
@@ -268,6 +270,13 @@ Setting this to a value makes it the next keystroke read. This is a
way to stuff a single character into the input stream.
@end deftypevar
+@deftypevar int rl_erase_empty_line
+Setting this to a non-zero value causes Readline to completely erase
+the current line, including any prompt, any time a newline is typed as
+the only character on an otherwise-empty line. The cursor is moved to
+the beginning of the newly-blank line.
+@end deftypevar
+
@deftypevar {char *} rl_prompt
The prompt Readline uses. This is set from the argument to
@code{readline ()}, and should not be assigned to directly.
@@ -300,6 +309,12 @@ If non-zero, this is the address of a function to call just
before @code{readline} prints the first prompt.
@end deftypevar
+@deftypevar {Function *} rl_pre_input_hook
+If non-zero, this is the address of a function to call after
+the first prompt has been printed and just before @code{readline}
+starts reading input characters.
+@end deftypevar
+
@deftypevar {Function *} rl_event_hook
If non-zero, this is the address of a function to call periodically
when readline is waiting for terminal input.
@@ -619,6 +634,16 @@ is also used to display numeric arguments and search strings.
Clear the message in the echo area.
@end deftypefun
+@deftypefun void rl_save_prompt ()
+Save the local Readline prompt display state in preparation for
+displaying a new message in the message area with @code{rl_message}.
+@end deftypefun
+
+@deftypefun void rl_restore_prompt ()
+Restore the local Readline prompt display state saved by the most
+recent call to @code{rl_save_prompt}.
+@end deftypefun
+
@node Modifying Text
@subsection Modifying Text
@@ -689,6 +714,16 @@ Return 1 if @var{c} is a numeric character.
Ring the terminal bell, obeying the setting of @code{bell-style}.
@end deftypefun
+@deftypefun void rl_display_match_list (char **matches, int len, int max)
+A convenience function for displaying a list of strings in
+columnar format on Readline's output stream. @code{matches} is the list
+of strings, in argv format, such as a list of completion matches.
+@code{len} is the number of strings in @code{matches}, and @code{max}
+is the length of the longest string in @code{matches}. This function uses
+the setting of @code{print-completions-horizontally} to select how the
+matches are displayed (@pxref{Readline Init File Syntax}).
+@end deftypefun
+
The following are implemented as macros, defined in @code{chartypes.h}.
@deftypefun int uppercase_p (int c)
@@ -814,6 +849,116 @@ invert_case_line (count, key)
@}
@end example
+@node Readline Signal Handling
+@section Readline Signal Handling
+
+Signals are asynchronous events sent to a process by the Unix kernel,
+sometimes on behalf of another process. They are intended to indicate
+exceptional events, like a user pressing the interrupt key on his
+terminal, or a network connection being broken. There is a class of
+signals that can be sent to the process currently reading input from
+the keyboard. Since Readline changes the terminal attributes when it
+is called, it needs to perform special processing when a signal is
+received to restore the terminal to a sane state, or provide application
+writers with functions to do so manually.
+
+Readline contains an internal signal handler that is installed for a
+number of signals (@code{SIGINT}, @code{SIGQUIT}, @code{SIGTERM},
+@code{SIGALRM}, @code{SIGTSTP}, @code{SIGTTIN}, and @code{SIGTTOU}).
+When one of these signals is received, the signal handler
+will reset the terminal attributes to those that were in effect before
+@code{readline ()} was called, reset the signal handling to what it was
+before @code{readline ()} was called, and resend the signal to the calling
+application.
+If and when the calling application's signal handler returns, Readline
+will reinitialize the terminal and continue to accept input.
+When a @code{SIGINT} is received, the Readline signal handler performs
+some additional work, which will cause any partially-entered line to be
+aborted (see the description of @code{rl_free_line_state ()}).
+
+There is an additional Readline signal handler, for @code{SIGWINCH}, which
+the kernel sends to a process whenever the terminal's size changes (for
+example, if a user resizes an @code{xterm}). The Readline @code{SIGWINCH}
+handler updates Readline's internal screen size state, and then calls any
+@code{SIGWINCH} signal handler the calling application has installed.
+Readline calls the application's @code{SIGWINCH} signal handler without
+resetting the terminal to its original state. If the application's signal
+handler does more than update its idea of the terminal size and return (for
+example, a @code{longjmp} back to a main processing loop), it @emph{must}
+call @code{rl_cleanup_after_signal ()} (described below), to restore the
+terminal state.
+
+Readline provides two variables that allow application writers to
+control whether or not it will catch certain signals and act on them
+when they are received. It is important that applications change the
+values of these variables only when calling @code{readline ()}, not in
+a signal handler, so Readline's internal signal state is not corrupted.
+
+@deftypevar int rl_catch_signals
+If this variable is non-zero, Readline will install signal handlers for
+@code{SIGINT}, @code{SIGQUIT}, @code{SIGTERM}, @code{SIGALRM},
+@code{SIGTSTP}, @code{SIGTTIN}, and @code{SIGTTOU}.
+
+The default value of @code{rl_catch_signals} is 1.
+@end deftypevar
+
+@deftypevar int rl_catch_sigwinch
+If this variable is non-zero, Readline will install a signal handler for
+@code{SIGWINCH}.
+
+The default value of @code{rl_catch_sigwinch} is 1.
+@end deftypevar
+
+If an application does not wish to have Readline catch any signals, or
+to handle signals other than those Readline catches (@code{SIGHUP},
+for example),
+Readline provides convenience functions to do the necessary terminal
+and internal state cleanup upon receipt of a signal.
+
+@deftypefun void rl_cleanup_after_signal (void)
+This function will reset the state of the terminal to what it was before
+@code{readline ()} was called, and remove the Readline signal handlers for
+all signals, depending on the values of @code{rl_catch_signals} and
+@code{rl_catch_sigwinch}.
+@end deftypefun
+
+@deftypefun void rl_free_line_state (void)
+This will free any partial state associated with the current input line
+(undo information, any partial history entry, any partially-entered
+keyboard macro, and any partially-entered numeric argument). This
+should be called before @code{rl_cleanup_after_signal ()}. The
+Readline signal handler for @code{SIGINT} calls this to abort the
+current input line.
+@end deftypefun
+
+@deftypefun void rl_reset_after_signal (void)
+This will reinitialize the terminal and reinstall any Readline signal
+handlers, depending on the values of @code{rl_catch_signals} and
+@code{rl_catch_sigwinch}.
+@end deftypefun
+
+If an application does not wish Readline to catch @code{SIGWINCH}, it may
+call @code{rl_resize_terminal ()} to force Readline to update its idea of
+the terminal size when a @code{SIGWINCH} is received.
+
+@deftypefun void rl_resize_terminal (void)
+Update Readline's internal screen size.
+@end deftypefun
+
+The following functions install and remove Readline's signal handlers.
+
+@deftypefun int rl_set_signals (void)
+Install Readline's signal handler for @code{SIGINT}, @code{SIGQUIT},
+@code{SIGTERM}, @code{SIGALRM}, @code{SIGTSTP}, @code{SIGTTIN},
+@code{SIGTTOU}, and @code{SIGWINCH}, depending on the values of
+@code{rl_catch_signals} and @code{rl_catch_sigwinch}.
+@end deftypefun
+
+@deftypefun int rl_clear_signals (void)
+Remove all of the Readline signal handlers installed by
+@code{rl_set_signals ()}.
+@end deftypefun
+
@node Custom Completers
@section Custom Completers
@@ -1108,6 +1253,20 @@ string (the current directory name) as an argument. It could be used
to expand symbolic links or shell variables in pathnames.
@end deftypevar
+@deftypevar {VFunction *} rl_completion_display_matches_hook
+If non-zero, then this is the address of a function to call when
+completing a word would normally display the list of possible matches.
+This function is called in lieu of Readline displaying the list.
+It takes three arguments:
+(@code{char **}@var{matches}, @code{int} @var{num_matches}, @code{int} @var{max_length})
+where @var{matches} is the array of matching strings,
+@var{num_matches} is the number of strings in that array, and
+@var{max_length} is the length of the longest string in that array.
+Readline provides a convenience function, @code{rl_display_match_list},
+that takes care of doing the display to Readline's output stream. That
+function may be called from this hook.
+@end deftypevar
+
@node A Short Completion Example
@subsection A Short Completion Example
diff --git a/contrib/libreadline/doc/rluser.texinfo b/contrib/libreadline/doc/rluser.texinfo
index b2fd060..755f7ca 100644
--- a/contrib/libreadline/doc/rluser.texinfo
+++ b/contrib/libreadline/doc/rluser.texinfo
@@ -97,7 +97,7 @@ regardless of the location of the cursor within the line.
* Readline Killing Commands:: How to delete text, and how to get it back!
* Readline Arguments:: Giving numeric arguments to commands.
* Searching:: Searching through previous lines.
- @end menu
+@end menu
@node Readline Bare Essentials
@subsection Readline Bare Essentials
@@ -252,8 +252,10 @@ As each character of the search string is typed, Readline displays
the next entry from the history matching the string typed so far.
An incremental search requires only as many characters as needed to
find the desired history entry.
-The @key{ESC} character is used to terminate an incremental search.
-@key{C-j} will also terminate the search.
+The characters present in the value of the @var{isearch-terminators} variable
+are used to terminate an incremental search.
+If that variable has not been assigned a value, the @key{ESC} and
+@key{C-J} characters will terminate an incremental search.
@key{C-g} will abort an incremental search and restore the original line.
When the search is terminated, the history entry containing the
search string becomes the current line.
@@ -396,6 +398,22 @@ horizontally on a single screen line when they are longer than the width
of the screen, instead of wrapping onto a new screen line. By default,
this variable is set to @samp{off}.
+@item input-meta
+@vindex input-meta
+@vindex meta-flag
+If set to @samp{on}, Readline will enable eight-bit input (it
+will not strip the eighth bit from the characters it reads),
+regardless of what the terminal claims it can support. The
+default value is @samp{off}. The name @code{meta-flag} is a
+synonym for this variable.
+
+@item isearch-terminators
+@vindex isearch-terminators
+The string of characters that should terminate an incremental search without
+subsequently executing the character as a command (@pxref{Searching}).
+If this variable has not been given a value, the characters @key{ESC} and
+@key{C-J} will terminate an incremental search.
+
@item keymap
@vindex keymap
Sets Readline's idea of the current keymap for key binding commands.
@@ -422,15 +440,6 @@ This variable, when set to @samp{on}, causes Readline to display an
asterisk (@samp{*}) at the start of history lines which have been modified.
This variable is @samp{off} by default.
-@item input-meta
-@vindex input-meta
-@vindex meta-flag
-If set to @samp{on}, Readline will enable eight-bit input (it
-will not strip the eighth bit from the characters it reads),
-regardless of what the terminal claims it can support. The
-default value is @samp{off}. The name @code{meta-flag} is a
-synonym for this variable.
-
@item output-meta
@vindex output-meta
If set to @samp{on}, Readline will display characters with the
@@ -876,6 +885,11 @@ return @code{EOF}.
Delete the character behind the cursor. A numeric argument means
to kill the characters instead of deleting them.
+@item forward-backward-delete-char ()
+Delete the character under the cursor, unless the cursor is at the
+end of the line, in which case the character behind the cursor is
+deleted. By default, this is not bound to a key.
+
@item quoted-insert (C-q, C-v)
Add the next character typed to the line verbatim. This is
how to insert key sequences like @key{C-q}, for example.
@@ -1039,6 +1053,13 @@ through the list.
This command is intended to be bound to @code{TAB}, but is unbound
by default.
+@item delete-char-or-list ()
+Deletes the character under the cursor if not at the beginning or
+end of the line (like @code{delete-char}).
+If at the end of the line, behaves identically to
+@code{possible-completions}.
+This command is unbound by default.
+
@ifset BashFeatures
@item complete-filename (M-/)
Attempt filename completion on the text before point.
@@ -1141,7 +1162,12 @@ Incremental undo, separately remembered for each line.
Undo all changes made to this line. This is like executing the @code{undo}
command enough times to get back to the beginning.
+@ifset BashFeatures
+@item tilde-expand (M-&)
+@end ifset
+@ifclear BashFeatures
@item tilde-expand (M-~)
+@end ifclear
Perform tilde expansion on the current word.
@item set-mark (C-@@)
OpenPOWER on IntegriCloud