Imported from ../bash-2.05b.tar.gz.
This commit is contained in:
parent
f73dda092b
commit
7117c2d221
362 changed files with 34387 additions and 15063 deletions
|
@ -1,6 +1,23 @@
|
|||
# Derived by hand from the generated readline-src/doc/Makefile
|
||||
# This makefile for Readline library documentation is in -*- text -*- mode.
|
||||
# Emacs likes it that way.
|
||||
|
||||
# Copyright (C) 1996-2002 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
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||
|
||||
topdir = .
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
|
|
@ -18,7 +18,7 @@ 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-2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2002 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of
|
||||
this manual provided the copyright notice and this permission notice
|
||||
|
@ -73,7 +73,7 @@ except that this permission notice may be stated in a translation approved
|
|||
by the Free Software Foundation.
|
||||
|
||||
@vskip 0pt plus 1filll
|
||||
Copyright @copyright{} 1988-2001 Free Software Foundation, Inc.
|
||||
Copyright @copyright{} 1988-2002 Free Software Foundation, Inc.
|
||||
@end titlepage
|
||||
|
||||
@ifinfo
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@ignore
|
||||
This file documents the user interface to the GNU History library.
|
||||
|
||||
Copyright (C) 1988-2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2002 Free Software Foundation, Inc.
|
||||
Authored by Brian Fox and Chet Ramey.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this manual
|
||||
|
@ -188,8 +188,9 @@ Stifle the history list, remembering only the last @var{max} entries.
|
|||
@end deftypefun
|
||||
|
||||
@deftypefun int unstifle_history (void)
|
||||
Stop stifling the history. This returns the previous amount the
|
||||
history was stifled. The value is positive if the history was
|
||||
Stop stifling the history. This returns the previously-set
|
||||
maximum number of history entries (as set by @code{stifle_history()}).
|
||||
The value is positive if the history was
|
||||
stifled, negative if it wasn't.
|
||||
@end deftypefun
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@ignore
|
||||
This file documents the user interface to the GNU History library.
|
||||
|
||||
Copyright (C) 1988-1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2002 Free Software Foundation, Inc.
|
||||
Authored by Brian Fox and Chet Ramey.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this manual
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
@set EDITION 4.2a
|
||||
@set VERSION 4.2a
|
||||
@set UPDATED 2001 October 9
|
||||
@set UPDATE-MONTH October 2001
|
||||
@ignore
|
||||
Copyright (C) 1988-2002 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Tue Oct 9 15:03:34 EDT 2001
|
||||
@set EDITION 4.3
|
||||
@set VERSION 4.3
|
||||
@set UPDATED 2002 March 4
|
||||
@set UPDATE-MONTH March 2002
|
||||
|
||||
@set LASTCHANGE Mon Mar 4 12:00:16 EST 2002
|
||||
|
|
|
@ -18,7 +18,7 @@ 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-2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2002 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of
|
||||
this manual provided the copyright notice and this permission notice
|
||||
|
@ -73,7 +73,7 @@ except that this permission notice may be stated in a translation approved
|
|||
by the Free Software Foundation.
|
||||
|
||||
@vskip 0pt plus 1filll
|
||||
Copyright @copyright{} 1988-2001 Free Software Foundation, Inc.
|
||||
Copyright @copyright{} 1988-2002 Free Software Foundation, Inc.
|
||||
@end titlepage
|
||||
|
||||
@ifinfo
|
||||
|
|
|
@ -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-2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2002 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of
|
||||
this manual provided the copyright notice and this permission notice
|
||||
|
@ -111,12 +111,13 @@ function, and has the advantage of no static buffer to overflow:
|
|||
/* A static variable for holding the line. */
|
||||
static char *line_read = (char *)NULL;
|
||||
|
||||
/* Read a string, and return a pointer to it. Returns NULL on EOF. */
|
||||
/* Read a string, and return a pointer to it.
|
||||
Returns NULL on EOF. */
|
||||
char *
|
||||
rl_gets ()
|
||||
@{
|
||||
/* If the buffer has already been allocated, return the memory
|
||||
to the free pool. */
|
||||
/* If the buffer has already been allocated,
|
||||
return the memory to the free pool. */
|
||||
if (line_read)
|
||||
@{
|
||||
free (line_read);
|
||||
|
@ -126,7 +127,8 @@ rl_gets ()
|
|||
/* Get a line from the user. */
|
||||
line_read = readline ("");
|
||||
|
||||
/* If the line has any text in it, save it on the history. */
|
||||
/* If the line has any text in it,
|
||||
save it on the history. */
|
||||
if (line_read && *line_read)
|
||||
add_history (line_read);
|
||||
|
||||
|
@ -263,7 +265,7 @@ variables that describe the current state of the line read so far.
|
|||
The calling sequence for a command @code{foo} looks like
|
||||
|
||||
@example
|
||||
@code{foo (int count, int key)}
|
||||
@code{int foo (int count, int key)}
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
|
@ -280,6 +282,9 @@ to do something useful with both negative and positive arguments.
|
|||
At the very least, it should be aware that it can be passed a
|
||||
negative argument.
|
||||
|
||||
A command function should return 0 if its action completes successfully,
|
||||
and a non-zero value if some error occurs.
|
||||
|
||||
@node Readline Variables
|
||||
@section Readline Variables
|
||||
|
||||
|
@ -385,10 +390,12 @@ The value allows conditional parsing of the inputrc file
|
|||
|
||||
@deftypevar {FILE *} rl_instream
|
||||
The stdio stream from which Readline reads input.
|
||||
If @code{NULL}, Readline defaults to @var{stdin}.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar {FILE *} rl_outstream
|
||||
The stdio stream to which Readline performs output.
|
||||
If @code{NULL}, Readline defaults to @var{stdout}.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar {rl_command_func_t *} rl_last_func
|
||||
|
@ -766,9 +773,9 @@ This is done with @code{rl_begin_undo_group()} and
|
|||
|
||||
The types of events that can be undone are:
|
||||
|
||||
@example
|
||||
@smallexample
|
||||
enum undo_code @{ UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END @};
|
||||
@end example
|
||||
@end smallexample
|
||||
|
||||
Notice that @code{UNDO_DELETE} means to insert some text, and
|
||||
@code{UNDO_INSERT} means to delete some text. That is, the undo code
|
||||
|
@ -901,10 +908,12 @@ to the result.
|
|||
|
||||
@deftypefun int rl_insert_text (const char *text)
|
||||
Insert @var{text} into the line at the current cursor position.
|
||||
Returns the number of characters inserted.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun int rl_delete_text (int start, int end)
|
||||
Delete the text between @var{start} and @var{end} in the current line.
|
||||
Returns the number of characters deleted.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun {char *} rl_copy_text (int start, int end)
|
||||
|
@ -947,7 +956,9 @@ be the keyboard.
|
|||
@deftypefun int rl_stuff_char (int c)
|
||||
Insert @var{c} into the Readline input stream. It will be "read"
|
||||
before Readline attempts to read characters from the terminal with
|
||||
@code{rl_read_key()}.
|
||||
@code{rl_read_key()}. Up to 512 characters may be pushed back.
|
||||
@code{rl_stuff_char} returns 1 if the character was successfully inserted;
|
||||
0 otherwise.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun int rl_execute_next (int c)
|
||||
|
@ -1000,6 +1011,13 @@ environment variable is used.
|
|||
@node Utility Functions
|
||||
@subsection Utility Functions
|
||||
|
||||
@deftypefun void rl_replace_line (const char *text, int clear_undo)
|
||||
Replace the contents of @code{rl_line_buffer} with @var{text}.
|
||||
The point and mark are preserved, if possible.
|
||||
If @var{clear_undo} is non-zero, the undo list associated with the
|
||||
current line is cleared.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun int rl_extend_line_buffer (int len)
|
||||
Ensure that @code{rl_line_buffer} has enough space to hold @var{len}
|
||||
characters, possibly reallocating it if necessary.
|
||||
|
@ -1123,16 +1141,26 @@ The function takes the text of the line as an argument.
|
|||
@deftypefun void rl_callback_read_char (void)
|
||||
Whenever an application determines that keyboard input is available, it
|
||||
should call @code{rl_callback_read_char()}, which will read the next
|
||||
character from the current input source. If that character completes the
|
||||
line, @code{rl_callback_read_char} will invoke the @var{lhandler}
|
||||
function saved by @code{rl_callback_handler_install} to process the
|
||||
line. @code{EOF} is indicated by calling @var{lhandler} with a
|
||||
character from the current input source.
|
||||
If that character completes the line, @code{rl_callback_read_char} will
|
||||
invoke the @var{lhandler} function saved by @code{rl_callback_handler_install}
|
||||
to process the line.
|
||||
Before calling the @var{lhandler} function, the terminal settings are
|
||||
reset to the values they had before calling
|
||||
@code{rl_callback_handler_install}.
|
||||
If the @var{lhandler} function returns,
|
||||
the terminal settings are modified for Readline's use again.
|
||||
@code{EOF} is indicated by calling @var{lhandler} with a
|
||||
@code{NULL} line.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void rl_callback_handler_remove (void)
|
||||
Restore the terminal to its initial state and remove the line handler.
|
||||
This may be called from within a callback as well as independently.
|
||||
If the @var{lhandler} installed by @code{rl_callback_handler_install}
|
||||
does not exit the program, either this function or the function referred
|
||||
to by the value of @code{rl_deprep_term_function} should be called before
|
||||
the program exits to reset the terminal settings.
|
||||
@end deftypefun
|
||||
|
||||
@node A Readline Example
|
||||
|
@ -1185,8 +1213,8 @@ invert_case_line (count, key)
|
|||
end = temp;
|
||||
@}
|
||||
|
||||
/* Tell readline that we are modifying the line, so it will save
|
||||
the undo information. */
|
||||
/* Tell readline that we are modifying the line,
|
||||
so it will save the undo information. */
|
||||
rl_modifying (start, end);
|
||||
|
||||
for (i = start; i != end; i++)
|
||||
|
@ -1442,6 +1470,14 @@ partially-completed word. See description of @code{rl_complete()}.
|
|||
This calls @code{rl_complete_internal()} with an argument of @samp{*}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun int rl_completion_mode (rl_command_func_t *cfunc)
|
||||
Returns the apppriate value to pass to @code{rl_complete_internal()}
|
||||
depending on whether @var{cfunc} was called twice in succession and
|
||||
the value of the @code{show-all-if-ambiguous} variable.
|
||||
Application-specific completion functions may use this function to present
|
||||
the same interface as @code{rl_complete()}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun {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
|
||||
@var{text}. If there are no completions, returns @code{NULL}.
|
||||
|
@ -1528,10 +1564,41 @@ character found in @code{rl_completer_word_break_characters} should be
|
|||
used to break words for the completer.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar int rl_completion_query_items
|
||||
Up to this many items will be displayed in response to a
|
||||
possible-completions call. After that, we ask the user if she is sure
|
||||
she wants to see them all. The default value is 100.
|
||||
@deftypevar {rl_compignore_func_t *} rl_ignore_some_completions_function
|
||||
This function, if defined, is called by the completer when real filename
|
||||
completion is done, after all the matching names have been generated.
|
||||
It is passed a @code{NULL} terminated array of matches.
|
||||
The first element (@code{matches[0]}) is the
|
||||
maximal substring common to all matches. This function can
|
||||
re-arrange the list of matches as required, but each element deleted
|
||||
from the array must be freed.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar {rl_icppfunc_t *} rl_directory_completion_hook
|
||||
This function, if defined, is allowed to modify the directory portion
|
||||
of filenames Readline completes. It is called with the address of a
|
||||
string (the current directory name) as an argument, and may modify that string.
|
||||
If the string is replaced with a new string, the old value should be freed.
|
||||
Any modified directory name should have a trailing slash.
|
||||
The modified value will be displayed as part of the completion, replacing
|
||||
the directory portion of the pathname the user typed.
|
||||
It returns an integer that should be non-zero if the function modifies
|
||||
its directory argument.
|
||||
It could be used to expand symbolic links or shell variables in pathnames.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar {rl_compdisp_func_t *} 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
|
||||
|
||||
@deftypevar {const char *} rl_basic_word_break_characters
|
||||
|
@ -1571,6 +1638,12 @@ For instance, Bash sets this variable to "$@@" so that it can complete
|
|||
shell variables and hostnames.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar int rl_completion_query_items
|
||||
Up to this many items will be displayed in response to a
|
||||
possible-completions call. After that, we ask the user if she is sure
|
||||
she wants to see them all. The default value is 100.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar {int} rl_completion_append_character
|
||||
When a single completion alternative matches at the end of the command
|
||||
line, this character is appended to the inserted completion text. The
|
||||
|
@ -1581,6 +1654,24 @@ provide the ``most sensible word separator character'' according to
|
|||
an application-specific command line syntax specification.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar int rl_completion_suppress_append
|
||||
If non-zero, @var{rl_completion_append_character} is not appended to
|
||||
matches at the end of the command line, as described above. It is
|
||||
set to 0 before any application-specific completion function is called.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar int rl_completion_mark_symlink_dirs
|
||||
If non-zero, a slash will be appended to completed filenames that are
|
||||
symbolic links to directory names, subject to the value of the
|
||||
user-settable @var{mark-directories} variable.
|
||||
This variable exists so that application completion functions can
|
||||
override the user's global preference (set via the
|
||||
@var{mark-symlinked-directories} Readline variable) if appropriate.
|
||||
This variable is set to the user's preference before any
|
||||
application completion function is called, so unless that function
|
||||
modifies the value, the user's preferences are honored.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar int rl_ignore_completion_duplicates
|
||||
If non-zero, then duplicates in the matches are removed.
|
||||
The default is 1.
|
||||
|
@ -1625,43 +1716,6 @@ If this variable is non-zero, completion is inhibited. The completion
|
|||
character will be inserted as any other bound to @code{self-insert}.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar {rl_compignore_func_t *} rl_ignore_some_completions_function
|
||||
This function, if defined, is called by the completer when real filename
|
||||
completion is done, after all the matching names have been generated.
|
||||
It is passed a @code{NULL} terminated array of matches.
|
||||
The first element (@code{matches[0]}) is the
|
||||
maximal substring common to all matches. This function can
|
||||
re-arrange the list of matches as required, but each element deleted
|
||||
from the array must be freed.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar {rl_icppfunc_t *} rl_directory_completion_hook
|
||||
This function, if defined, is allowed to modify the directory portion
|
||||
of filenames Readline completes. It is called with the address of a
|
||||
string (the current directory name) as an argument, and may modify that string.
|
||||
If the string is replaced with a new string, the old value should be freed.
|
||||
Any modified directory name should have a trailing slash.
|
||||
The modified value will be displayed as part of the completion, replacing
|
||||
the directory portion of the pathname the user typed.
|
||||
It returns an integer that should be non-zero if the function modifies
|
||||
its directory argument.
|
||||
It could be used to expand symbolic links or shell variables in pathnames.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar {rl_compdisp_func_t *} 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
|
||||
|
||||
|
@ -2089,12 +2143,13 @@ too_dangerous (caller)
|
|||
char *caller;
|
||||
@{
|
||||
fprintf (stderr,
|
||||
"%s: Too dangerous for me to distribute. Write it yourself.\n",
|
||||
"%s: Too dangerous for me to distribute.\n"
|
||||
caller);
|
||||
fprintf (stderr, "Write it yourself.\n");
|
||||
@}
|
||||
|
||||
/* Return non-zero if ARG is a valid argument for CALLER, else print
|
||||
an error message and return zero. */
|
||||
/* Return non-zero if ARG is a valid argument for CALLER,
|
||||
else print an error message and return zero. */
|
||||
int
|
||||
valid_argument (caller, arg)
|
||||
char *caller, *arg;
|
||||
|
|
|
@ -10,7 +10,7 @@ use these features. There is a document entitled "readline.texinfo"
|
|||
which contains both end-user and programmer documentation for the
|
||||
GNU Readline Library.
|
||||
|
||||
Copyright (C) 1988-2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2002 Free Software Foundation, Inc.
|
||||
|
||||
Authored by Brian Fox and Chet Ramey.
|
||||
|
||||
|
@ -512,6 +512,13 @@ 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 mark-symlinked-directories
|
||||
@vindex mark-symlinked-directories
|
||||
If set to @samp{on}, completed names which are symbolic links
|
||||
to directories have a slash appended (subject to the value of
|
||||
@code{mark-directories}).
|
||||
The default is @samp{off}.
|
||||
|
||||
@item match-hidden-files
|
||||
@vindex match-hidden-files
|
||||
This variable, when set to @samp{on}, causes Readline to match files whose
|
||||
|
@ -526,6 +533,12 @@ If set to @samp{on}, Readline will display characters with the
|
|||
eighth bit set directly rather than as a meta-prefixed escape
|
||||
sequence. The default is @samp{off}.
|
||||
|
||||
@item page-completions
|
||||
@vindex page-completions
|
||||
If set to @samp{on}, Readline uses an internal @code{more}-like pager
|
||||
to display a screenful of possible completions at a time.
|
||||
This variable is @samp{on} by default.
|
||||
|
||||
@item print-completions-horizontally
|
||||
If set to @samp{on}, Readline will display completions with matches
|
||||
sorted horizontally in alphabetical order, rather than down the screen.
|
||||
|
@ -757,14 +770,14 @@ binding, variable assignment, and conditional syntax.
|
|||
@example
|
||||
@page
|
||||
# This file controls the behaviour of line input editing for
|
||||
# programs that use the Gnu Readline library. Existing programs
|
||||
# include FTP, Bash, and Gdb.
|
||||
# programs that use the GNU Readline library. Existing
|
||||
# programs include FTP, Bash, and GDB.
|
||||
#
|
||||
# You can re-read the inputrc file with C-x C-r.
|
||||
# Lines beginning with '#' are comments.
|
||||
#
|
||||
# First, include any systemwide bindings and variable assignments from
|
||||
# /etc/Inputrc
|
||||
# First, include any systemwide bindings and variable
|
||||
# assignments from /etc/Inputrc
|
||||
$include /etc/Inputrc
|
||||
|
||||
#
|
||||
|
@ -816,10 +829,12 @@ TAB: complete
|
|||
$if Bash
|
||||
# edit the path
|
||||
"\C-xp": "PATH=$@{PATH@}\e\C-e\C-a\ef\C-f"
|
||||
# prepare to type a quoted word -- insert open and close double quotes
|
||||
# prepare to type a quoted word --
|
||||
# insert open and close double quotes
|
||||
# and move to just after the open quote
|
||||
"\C-x\"": "\"\"\C-b"
|
||||
# insert a backslash (testing backslash escapes in sequences and macros)
|
||||
# insert a backslash (testing backslash escapes
|
||||
# in sequences and macros)
|
||||
"\C-x\\": "\\"
|
||||
# Quote the current or previous word
|
||||
"\C-xq": "\eb\"\ef\""
|
||||
|
@ -835,16 +850,16 @@ set bell-style visible
|
|||
# don't strip characters to 7 bits when reading
|
||||
set input-meta on
|
||||
|
||||
# allow iso-latin1 characters to be inserted rather than converted to
|
||||
# prefix-meta sequences
|
||||
# allow iso-latin1 characters to be inserted rather
|
||||
# than converted to prefix-meta sequences
|
||||
set convert-meta off
|
||||
|
||||
# display characters with the eighth bit set directly rather than
|
||||
# as meta-prefixed characters
|
||||
# display characters with the eighth bit set directly
|
||||
# rather than as meta-prefixed characters
|
||||
set output-meta on
|
||||
|
||||
# if there are more than 150 possible completions for a word, ask the
|
||||
# user if he wants to see all of them
|
||||
# if there are more than 150 possible completions for
|
||||
# a word, ask the user if he wants to see all of them
|
||||
set completion-query-items 150
|
||||
|
||||
# For FTP
|
||||
|
@ -1053,6 +1068,20 @@ lowercase the previous word, but do not move the cursor.
|
|||
Capitalize the current (or following) word. With a negative argument,
|
||||
capitalize the previous word, but do not move the cursor.
|
||||
|
||||
@item overwrite-mode ()
|
||||
Toggle overwrite mode. With an explicit positive numeric argument,
|
||||
switches to overwrite mode. With an explicit non-positive numeric
|
||||
argument, switches to insert mode. This command affects only
|
||||
@code{emacs} mode; @code{vi} mode does overwrite differently.
|
||||
Each call to @code{readline()} starts in insert mode.
|
||||
|
||||
In overwrite mode, characters bound to @code{self-insert} replace
|
||||
the text at point rather than pushing the text to the right.
|
||||
Characters bound to @code{backward-delete-char} replace the character
|
||||
before point with a space.
|
||||
|
||||
By default, this command is unbound.
|
||||
|
||||
@end ftable
|
||||
|
||||
@node Commands For Killing
|
||||
|
@ -1312,12 +1341,19 @@ of that character. A negative count searches for subsequent
|
|||
occurrences.
|
||||
|
||||
@item insert-comment (M-#)
|
||||
The value of the @code{comment-begin}
|
||||
variable is inserted at the beginning of the current line,
|
||||
and the line is accepted as if a newline had been typed.
|
||||
Without a numeric argument, the value of the @code{comment-begin}
|
||||
variable is inserted at the beginning of the current line.
|
||||
If a numeric argument is supplied, this command acts as a toggle: if
|
||||
the characters at the beginning of the line do not match the value
|
||||
of @code{comment-begin}, the value is inserted, otherwise
|
||||
the characters in @code{comment-begin} are deleted from the beginning of
|
||||
the line.
|
||||
In either case, the line is accepted as if a newline had been typed.
|
||||
@ifset BashFeatures
|
||||
The default value of @code{comment-begin} causes this command
|
||||
to make the current line a shell comment.
|
||||
If a numeric argument causes the comment character to be removed, the line
|
||||
will be executed by the shell.
|
||||
@end ifset
|
||||
|
||||
@item dump-functions ()
|
||||
|
@ -1339,13 +1375,22 @@ the output is formatted in such a way that it can be made part
|
|||
of an @var{inputrc} file. This command is unbound by default.
|
||||
|
||||
@ifset BashFeatures
|
||||
@item glob-complete-word (M-g)
|
||||
The word before point is treated as a pattern for pathname expansion,
|
||||
with an asterisk implicitly appended. This pattern is used to
|
||||
generate a list of matching file names for possible completions.
|
||||
|
||||
@item glob-expand-word (C-x *)
|
||||
The word before point is treated as a pattern for pathname expansion,
|
||||
and the list of matching file names is inserted, replacing the word.
|
||||
If a numeric argument is supplied, a @samp{*} is appended before
|
||||
pathname expansion.
|
||||
|
||||
@item glob-list-expansions (C-x g)
|
||||
The list of expansions that would have been generated by
|
||||
@code{glob-expand-word} is displayed, and the line is redrawn.
|
||||
If a numeric argument is supplied, a @samp{*} is appended before
|
||||
pathname expansion.
|
||||
|
||||
@item display-shell-version (C-x C-v)
|
||||
Display version information about the current instance of Bash.
|
||||
|
@ -1376,13 +1421,26 @@ Accept the current line for execution and fetch the next line
|
|||
relative to the current line from the history for editing. Any
|
||||
argument is ignored.
|
||||
|
||||
@item emacs-editing-mode (C-e)
|
||||
When in @code{vi} editing mode, this causes a switch back to
|
||||
@code{emacs} editing mode, as if the command @samp{set -o emacs} had
|
||||
been executed.
|
||||
@item edit-and-execute-command (C-xC-e)
|
||||
Invoke an editor on the current command line, and execute the result as shell
|
||||
commands.
|
||||
Bash attempts to invoke
|
||||
@code{$FCEDIT}, @code{$EDITOR}, and @code{emacs}
|
||||
as the editor, in that order.
|
||||
|
||||
@end ifset
|
||||
|
||||
@ifclear BashFeatures
|
||||
@item emacs-editing-mode (C-e)
|
||||
When in @code{vi} command mode, this causes a switch to @code{emacs}
|
||||
editing mode.
|
||||
|
||||
@item vi-editing-mode (M-C-j)
|
||||
When in @code{emacs} editing mode, this causes a switch to @code{vi}
|
||||
editing mode.
|
||||
|
||||
@end ifclear
|
||||
|
||||
@end ftable
|
||||
|
||||
@node Readline vi Mode
|
||||
|
@ -1518,6 +1576,12 @@ If the @option{-o default} option was supplied to @code{complete} when the
|
|||
compspec was defined, Readline's default completion will be performed
|
||||
if the compspec generates no matches.
|
||||
|
||||
When a compspec indicates that directory name completion is desired,
|
||||
the programmable completion functions force Readline to append a slash
|
||||
to completed names which are symbolic links to directories, subject to
|
||||
the value of the @var{mark-directories} Readline variable, regardless
|
||||
of the setting of the @var{mark-symlinked-directories} Readline variable.
|
||||
|
||||
@node Programmable Completion Builtins
|
||||
@section Programmable Completion Builtins
|
||||
@cindex completion builtins
|
||||
|
@ -1553,7 +1617,7 @@ matches were generated.
|
|||
@item complete
|
||||
@btindex complete
|
||||
@example
|
||||
@code{complete [-abcdefgjkvu] [-o @var{comp-option}] [-A @var{action}] [-G @var{globpat}] [-W @var{wordlist}]
|
||||
@code{complete [-abcdefgjksuv] [-o @var{comp-option}] [-A @var{action}] [-G @var{globpat}] [-W @var{wordlist}]
|
||||
[-P @var{prefix}] [-S @var{suffix}] [-X @var{filterpat}] [-F @var{function}]
|
||||
[-C @var{command}] @var{name} [@var{name} @dots{}]}
|
||||
@code{complete -pr [@var{name} @dots{}]}
|
||||
|
@ -1586,7 +1650,8 @@ beyond the simple generation of completions.
|
|||
@table @code
|
||||
|
||||
@item default
|
||||
Use readline's default completion if the compspec generates no matches.
|
||||
Use Readline's default filename completion if the compspec generates
|
||||
no matches.
|
||||
|
||||
@item dirnames
|
||||
Perform directory name completion if the compspec generates no matches.
|
||||
|
@ -1596,6 +1661,10 @@ Tell Readline that the compspec generates filenames, so it can perform any
|
|||
filename\-specific processing (like adding a slash to directory names or
|
||||
suppressing trailing spaces). This option is intended to be used with
|
||||
shell functions specified with @option{-F}.
|
||||
|
||||
@item nospace
|
||||
Tell Readline not to append a space (the default) to words completed at
|
||||
the end of the line.
|
||||
@end table
|
||||
|
||||
@item -A @var{action}
|
||||
|
@ -1655,6 +1724,9 @@ Shell reserved words. May also be specified as @option{-k}.
|
|||
@item running
|
||||
Names of running jobs, if job control is active.
|
||||
|
||||
@item service
|
||||
Service names. May also be specified as @option{-s}.
|
||||
|
||||
@item setopt
|
||||
Valid arguments for the @option{-o} option to the @code{set} builtin
|
||||
(@pxref{The Set Builtin}).
|
||||
|
|
|
@ -17,7 +17,7 @@ This document describes the end user interface of 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-2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2002 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of
|
||||
this manual provided the copyright notice and this permission notice
|
||||
|
@ -72,7 +72,7 @@ except that this permission notice may be stated in a translation approved
|
|||
by the Free Software Foundation.
|
||||
|
||||
@vskip 0pt plus 1filll
|
||||
Copyright @copyright{} 1988-2001 Free Software Foundation, Inc.
|
||||
Copyright @copyright{} 1988-2002 Free Software Foundation, Inc.
|
||||
@end titlepage
|
||||
|
||||
@ifinfo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue