commit bash-20090806 snapshot

This commit is contained in:
Chet Ramey
2011-12-08 20:13:46 -05:00
parent 9dd88db757
commit 3eb2d94ad7
47 changed files with 8193 additions and 6281 deletions
+120
View File
@@ -8345,3 +8345,123 @@ lib/readline/display.c
second, we need to update OMAX and the line indices to account for
the moved data. Bug report and fix from Martin Hamrle
<martin.hamrle@gmail.com>
8/3
---
pcomplete.h
- defines for EMPTYCMD ("_EmptycmD_") and DEFAULTCMD ("_DefaultCmD_")
builtins/complete.def
- change compopt_builtin to make -E work on the "empty" command
completion
- fix print_compitem and print_compopts to replace EMPTYCMD with -E
- added -D (default) option to complete/compgen/compopt. No supporting
code yet
doc/bash.1,lib/readline/doc/rluser.texi
- document new -D, -E options to compopt
- document new -D option to complete/compgen
shell.h
- new define, EX_WEXPCOMSUB, value of 125
- new define, EX_RETRYFAIL, value of 124 (for programmable completion)
subst.c
- use EX_WEXPCOMSUB instead of literal 125 as exit status when a shell
invoked to run wordexp(3) with the -n option supplied attempts a
command substitution
pcomplete.c
- new define, PCOMP_RETRYFAIL, used to indicate a "failure, retry with
next completion" status to the programmable completion code
8/4
---
pcomplete.c
- changed gen_shell_function_matches to take an extra parameter
indicating whether the specified shell function was not found or
returned the special "fail/retry" status, and, if it was either,
to not bother returning any matches list
- changed gen_compspec_completions to take an extra parameter to pass
through the "found" status from gen_shell_function_completions
- new function gen_progcomp_completions to take care of searching for
and evaluating a compspec for a particular word, saving its status,
and returning to its caller (programmable_completions) whether or
not to retry completion. This function also checks whether a
retry changed the compspec associated with a command and short-
circuits the retry if it has not
- changed programmable_completions to try default completion (if set)
if a specific completion was not found for a command
- changed programmable_completions to implement "fail/retry" semantics
for a shell function that returns 124 and changes the compspec
associated with the command. All based on proposal and changes from
Behdad Esfahbod (Red Hat bugzilla 475229)
doc/bash.1,lib/readline/doc/rluser.texi
- documented new dynamic programmable completion functionality
8/5
---
stringlib.c
- first argument to substring() is now `const char *'
externs.h
- changed extern declaration for substring()
subst.c
- skipsubscript now takes a third FLAGS argument, passes to
skip_matched_pair
- skip_matched_pair now interprets flags&1 to mean not to parse
matched pairs of quotes, backquotes, or shell word expansion
constructs
{subst,general,expr}.c
- changed skipsubscript() callers
assoc.c
- changed assoc_to_assign to double-quote the key if it contains any
shell metacharacters
arrayfunc.c
- use skipsubscript in quote_assign rather than quote any glob
characters in the subscript of an array assignment
- in assign_compound_array_list, call skipsubscript with a flags
argument of 1 if assigning an associative array to avoid trying
to re-parse quoted strings
redir.c
- set expanding_redir before expanding body of here documents and
here strings to avoid looking for variables in temporary env
8/7
---
lib/readline/readline.c
- in _rl_dispatch_callback, return value of -3 means that we have
added to a key sequence, but there are previous matches in the
sequence. Don't call _rl_subseq_result if we get a -3 from a
previous context in the chain; just go back up the chain. Report
and fix from <freehaha@gmail.com>
bashline.c
- fixes to history_completion_generator and bash_dabbrev_expand to
make dabbrev-expand inhibit suppressing of appending space char
to matches. Have to do it with the generator too because
rl_menu_complete turns off suppressing the appended space in
set_completion_defaults(). Suggestion from Dan Nicolaescu
<dann@ics.uci.edu>
- suppress completion match sorting in bash_dabbrev_expand by
setting rl_sort_completion_matches = 0. Suggestion from Dan
Nicolaescu <dann@ics.uci.edu>
- don't qsort history match list in build_history_completion_array
if dabbrev_expand_active == 1
- start the loop in build_history_completion_array that gathers words
from history for possible completions from the end of the list
rather than the beginning. It doesn't matter where you start if
the results are sorted, and dabbrev-expand is supposed to offer
the most recent completions first
8/12
----
execute_cmd.c
- change to execute_command_internal to make [[ ... ]] conditional
command subject to settings of `set -e' and the ERR trap
+121
View File
@@ -8338,3 +8338,124 @@ bashline.c
- fix clear_hostname_list by setting hostname_list_initialized to 0
after freeing all list members. Fixes bug reported by Freddy
Vulto <fvulto@gmail.com>
lib/readline/display.c
- in update_line, if we copy data from one line to another because we
are wrapping a multibyte character from, say, the first line to the
second, we need to update OMAX and the line indices to account for
the moved data. Bug report and fix from Martin Hamrle
<martin.hamrle@gmail.com>
8/3
---
pcomplete.h
- defines for EMPTYCMD ("_EmptycmD_") and DEFAULTCMD ("_DefaultCmD_")
builtins/complete.def
- change compopt_builtin to make -E work on the "empty" command
completion
- fix print_compitem and print_compopts to replace EMPTYCMD with -E
- added -D (default) option to complete/compgen/compopt. No supporting
code yet
doc/bash.1,lib/readline/doc/rluser.texi
- document new -D, -E options to compopt
- document new -D option to complete/compgen
shell.h
- new define, EX_WEXPCOMSUB, value of 125
- new define, EX_RETRYFAIL, value of 124 (for programmable completion)
subst.c
- use EX_WEXPCOMSUB instead of literal 125 as exit status when a shell
invoked to run wordexp(3) with the -n option supplied attempts a
command substitution
pcomplete.c
- new define, PCOMP_RETRYFAIL, used to indicate a "failure, retry with
next completion" status to the programmable completion code
8/4
---
pcomplete.c
- changed gen_shell_function_matches to take an extra parameter
indicating whether the specified shell function was not found or
returned the special "fail/retry" status, and, if it was either,
to not bother returning any matches list
- changed gen_compspec_completions to take an extra parameter to pass
through the "found" status from gen_shell_function_completions
- new function gen_progcomp_completions to take care of searching for
and evaluating a compspec for a particular word, saving its status,
and returning to its caller (programmable_completions) whether or
not to retry completion. This function also checks whether a
retry changed the compspec associated with a command and short-
circuits the retry if it has not
- changed programmable_completions to try default completion (if set)
if a specific completion was not found for a command
- changed programmable_completions to implement "fail/retry" semantics
for a shell function that returns 124 and changes the compspec
associated with the command. All based on proposal and changes from
Behdad Esfahbod (Red Hat bugzilla 475229)
doc/bash.1,lib/readline/doc/rluser.texi
- documented new dynamic programmable completion functionality
8/5
---
stringlib.c
- first argument to substring() is now `const char *'
externs.h
- changed extern declaration for substring()
subst.c
- skipsubscript now takes a third FLAGS argument, passes to
skip_matched_pair
- skip_matched_pair now interprets flags&1 to mean not to parse
matched pairs of quotes, backquotes, or shell word expansion
constructs
{subst,general,expr}.c
- changed skipsubscript() callers
assoc.c
- changed assoc_to_assign to double-quote the key if it contains any
shell metacharacters
arrayfunc.c
- use skipsubscript in quote_assign rather than quote any glob
characters in the subscript of an array assignment
- in assign_compound_array_list, call skipsubscript with a flags
argument of 1 if assigning an associative array to avoid trying
to re-parse quoted strings
redir.c
- set expanding_redir before expanding body of here documents and
here strings to avoid looking for variables in temporary env
8/7
---
lib/readline/readline.c
- in _rl_dispatch_callback, return value of -3 means that we have
added to a key sequence, but there are previous matches in the
sequence. Don't call _rl_subseq_result if we get a -3 from a
previous context in the chain; just go back up the chain. Report
and fix from <freehaha@gmail.com>
bashline.c
- fixes to history_completion_generator and bash_dabbrev_expand to
make dabbrev-expand inhibit suppressing of appending space char
to matches. Have to do it with the generator too because
rl_menu_complete turns off suppressing the appended space in
set_completion_defaults(). Suggestion from Dan Nicolaescu
<dann@ics.uci.edu>
- suppress completion match sorting in bash_dabbrev_expand by
setting rl_sort_completion_matches = 0. Suggestion from Dan
Nicolaescu <dann@ics.uci.edu>
- don't qsort history match list in build_history_completion_array
if dabbrev_expand_active == 1
- start the loop in build_history_completion_array that gathers words
from history for possible completions from the end of the list
rather than the beginning. It doesn't matter where you start if
the results are sorted, and dabbrev-expand is supposed to offer
the most recent completions first
+1
View File
@@ -757,6 +757,7 @@ tests/assoc2.sub f
tests/assoc3.sub f
tests/assoc4.sub f
tests/assoc5.sub f
tests/assoc6.sub f
tests/braces.tests f
tests/braces.right f
tests/builtins.tests f
+20 -5
View File
@@ -447,7 +447,7 @@ assign_compound_array_list (var, nlist, flags)
/* We have a word of the form [ind]=value */
if ((list->word->flags & W_ASSIGNMENT) && w[0] == '[')
{
len = skipsubscript (w, 0);
len = skipsubscript (w, 0, assoc_p (var) != 0);
/* XXX - changes for `+=' */
if (w[len] != ']' || (w[len+1] != '=' && (w[len+1] != '+' || w[len+2] != '=')))
@@ -560,8 +560,9 @@ quote_assign (string)
{
size_t slen;
int saw_eq;
char *temp, *t;
char *temp, *t, *subs;
const char *s, *send;
int ss, se;
DECLARE_MBSTATE;
slen = strlen (string);
@@ -573,6 +574,20 @@ quote_assign (string)
{
if (*s == '=')
saw_eq = 1;
if (saw_eq == 0 && *s == '[') /* looks like a subscript */
{
ss = s - string;
se = skipsubscript (string, ss, 0);
subs = substring (s, ss, se);
*t++ = '\\';
strcpy (t, subs);
t += se - ss;
*t++ = '\\';
*t++ = ']';
s += se + 1;
free (subs);
continue;
}
if (saw_eq == 0 && (glob_char_p (s) || isifs (*s)))
*t++ = '\\';
@@ -619,7 +634,7 @@ unbind_array_element (var, sub)
char *akey;
ARRAY_ELEMENT *ae;
len = skipsubscript (sub, 0);
len = skipsubscript (sub, 0, 0);
if (sub[len] != ']' || len == 0)
{
builtin_error ("%s[%s: %s", var->name, sub, _(bash_badsub_errmsg));
@@ -722,7 +737,7 @@ valid_array_reference (name)
if (r == 0)
return 0;
/* Check for a properly-terminated non-blank subscript. */
len = skipsubscript (t, 0);
len = skipsubscript (t, 0, 0);
if (t[len] != ']' || len == 1)
return 0;
for (r = 1; r < len; r++)
@@ -783,7 +798,7 @@ array_variable_name (s, subp, lenp)
return ((char *)NULL);
}
ind = t - s;
ni = skipsubscript (s, ind);
ni = skipsubscript (s, ind, 0);
if (ni <= ind + 1 || s[ni] != ']')
{
err_badarraysub (s);
+998
View File
@@ -0,0 +1,998 @@
/* arrayfunc.c -- High-level array functions used by other parts of the shell. */
/* Copyright (C) 2001-2009 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash 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 3 of the License, or
(at your option) any later version.
Bash 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 Bash. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#if defined (ARRAY_VARS)
#if defined (HAVE_UNISTD_H)
# include <unistd.h>
#endif
#include <stdio.h>
#include "bashintl.h"
#include "shell.h"
#include "pathexp.h"
#include "shmbutil.h"
#include "builtins/common.h"
extern char *this_command_name;
extern int last_command_exit_value;
extern int array_needs_making;
static SHELL_VAR *bind_array_var_internal __P((SHELL_VAR *, arrayind_t, char *, char *, int));
static char *quote_assign __P((const char *));
static void quote_array_assignment_chars __P((WORD_LIST *));
static char *array_value_internal __P((char *, int, int, int *));
/* Standard error message to use when encountering an invalid array subscript */
const char * const bash_badsub_errmsg = N_("bad array subscript");
/* **************************************************************** */
/* */
/* Functions to manipulate array variables and perform assignments */
/* */
/* **************************************************************** */
/* Convert a shell variable to an array variable. The original value is
saved as array[0]. */
SHELL_VAR *
convert_var_to_array (var)
SHELL_VAR *var;
{
char *oldval;
ARRAY *array;
oldval = value_cell (var);
array = array_create ();
if (oldval)
array_insert (array, 0, oldval);
FREE (value_cell (var));
var_setarray (var, array);
/* these aren't valid anymore */
var->dynamic_value = (sh_var_value_func_t *)NULL;
var->assign_func = (sh_var_assign_func_t *)NULL;
INVALIDATE_EXPORTSTR (var);
if (exported_p (var))
array_needs_making++;
VSETATTR (var, att_array);
VUNSETATTR (var, att_invisible);
return var;
}
/* Convert a shell variable to an array variable. The original value is
saved as array[0]. */
SHELL_VAR *
convert_var_to_assoc (var)
SHELL_VAR *var;
{
char *oldval;
HASH_TABLE *hash;
oldval = value_cell (var);
hash = assoc_create (0);
if (oldval)
assoc_insert (hash, "0", oldval);
FREE (value_cell (var));
var_setassoc (var, hash);
/* these aren't valid anymore */
var->dynamic_value = (sh_var_value_func_t *)NULL;
var->assign_func = (sh_var_assign_func_t *)NULL;
INVALIDATE_EXPORTSTR (var);
if (exported_p (var))
array_needs_making++;
VSETATTR (var, att_assoc);
VUNSETATTR (var, att_invisible);
return var;
}
static SHELL_VAR *
bind_array_var_internal (entry, ind, key, value, flags)
SHELL_VAR *entry;
arrayind_t ind;
char *key;
char *value;
int flags;
{
SHELL_VAR *dentry;
char *newval;
/* If we're appending, we need the old value of the array reference, so
fake out make_variable_value with a dummy SHELL_VAR */
if (flags & ASS_APPEND)
{
dentry = (SHELL_VAR *)xmalloc (sizeof (SHELL_VAR));
dentry->name = savestring (entry->name);
if (assoc_p (entry))
newval = assoc_reference (assoc_cell (entry), key);
else
newval = array_reference (array_cell (entry), ind);
if (newval)
dentry->value = savestring (newval);
else
{
dentry->value = (char *)xmalloc (1);
dentry->value[0] = '\0';
}
dentry->exportstr = 0;
dentry->attributes = entry->attributes & ~(att_array|att_assoc|att_exported);
/* Leave the rest of the members uninitialized; the code doesn't look
at them. */
newval = make_variable_value (dentry, value, flags);
dispose_variable (dentry);
}
else
newval = make_variable_value (entry, value, flags);
if (entry->assign_func)
(*entry->assign_func) (entry, newval, ind, key);
else if (assoc_p (entry))
assoc_insert (assoc_cell (entry), key, newval);
else
array_insert (array_cell (entry), ind, newval);
FREE (newval);
return (entry);
}
/* Perform an array assignment name[ind]=value. If NAME already exists and
is not an array, and IND is 0, perform name=value instead. If NAME exists
and is not an array, and IND is not 0, convert it into an array with the
existing value as name[0].
If NAME does not exist, just create an array variable, no matter what
IND's value may be. */
SHELL_VAR *
bind_array_variable (name, ind, value, flags)
char *name;
arrayind_t ind;
char *value;
int flags;
{
SHELL_VAR *entry;
entry = var_lookup (name, shell_variables);
if (entry == (SHELL_VAR *) 0)
entry = make_new_array_variable (name);
else if (readonly_p (entry) || noassign_p (entry))
{
if (readonly_p (entry))
err_readonly (name);
return (entry);
}
else if (array_p (entry) == 0)
entry = convert_var_to_array (entry);
/* ENTRY is an array variable, and ARRAY points to the value. */
return (bind_array_var_internal (entry, ind, 0, value, flags));
}
SHELL_VAR *
bind_array_element (entry, ind, value, flags)
SHELL_VAR *entry;
arrayind_t ind;
char *value;
int flags;
{
return (bind_array_var_internal (entry, ind, 0, value, flags));
}
SHELL_VAR *
bind_assoc_variable (entry, name, key, value, flags)
SHELL_VAR *entry;
char *name;
char *key;
char *value;
int flags;
{
SHELL_VAR *dentry;
char *newval;
if (readonly_p (entry) || noassign_p (entry))
{
if (readonly_p (entry))
err_readonly (name);
return (entry);
}
return (bind_array_var_internal (entry, 0, key, value, flags));
}
/* Parse NAME, a lhs of an assignment statement of the form v[s], and
assign VALUE to that array element by calling bind_array_variable(). */
SHELL_VAR *
assign_array_element (name, value, flags)
char *name, *value;
int flags;
{
char *sub, *vname, *akey;
arrayind_t ind;
int sublen;
SHELL_VAR *entry;
vname = array_variable_name (name, &sub, &sublen);
if (vname == 0)
return ((SHELL_VAR *)NULL);
if ((ALL_ELEMENT_SUB (sub[0]) && sub[1] == ']') || (sublen <= 1))
{
free (vname);
err_badarraysub (name);
return ((SHELL_VAR *)NULL);
}
entry = find_variable (vname);
if (entry && assoc_p (entry))
{
sub[sublen-1] = '\0';
akey = expand_assignment_string_to_string (sub, 0); /* [ */
sub[sublen-1] = ']';
if (akey == 0 || *akey == 0)
{
free (vname);
err_badarraysub (name);
return ((SHELL_VAR *)NULL);
}
entry = bind_assoc_variable (entry, vname, akey, value, flags);
}
else
{
ind = array_expand_index (sub, sublen);
if (ind < 0)
{
free (vname);
err_badarraysub (name);
return ((SHELL_VAR *)NULL);
}
entry = bind_array_variable (vname, ind, value, flags);
}
free (vname);
return (entry);
}
/* Find the array variable corresponding to NAME. If there is no variable,
create a new array variable. If the variable exists but is not an array,
convert it to an indexed array. If FLAGS&1 is non-zero, an existing
variable is checked for the readonly or noassign attribute in preparation
for assignment (e.g., by the `read' builtin). If FLAGS&2 is non-zero, we
create an associative array. */
SHELL_VAR *
find_or_make_array_variable (name, flags)
char *name;
int flags;
{
SHELL_VAR *var;
var = find_variable (name);
if (var == 0)
var = (flags & 2) ? make_new_assoc_variable (name) : make_new_array_variable (name);
else if ((flags & 1) && (readonly_p (var) || noassign_p (var)))
{
if (readonly_p (var))
err_readonly (name);
return ((SHELL_VAR *)NULL);
}
else if ((flags & 2) && array_p (var))
{
report_error (_("%s: cannot convert indexed to associative array"), name);
return ((SHELL_VAR *)NULL);
}
else if (array_p (var) == 0 && assoc_p (var) == 0)
var = convert_var_to_array (var);
return (var);
}
/* Perform a compound assignment statement for array NAME, where VALUE is
the text between the parens: NAME=( VALUE ) */
SHELL_VAR *
assign_array_from_string (name, value, flags)
char *name, *value;
int flags;
{
SHELL_VAR *var;
int vflags;
vflags = 1;
if (flags & ASS_MKASSOC)
vflags |= 2;
var = find_or_make_array_variable (name, vflags);
if (var == 0)
return ((SHELL_VAR *)NULL);
return (assign_array_var_from_string (var, value, flags));
}
/* Sequentially assign the indices of indexed array variable VAR from the
words in LIST. */
SHELL_VAR *
assign_array_var_from_word_list (var, list, flags)
SHELL_VAR *var;
WORD_LIST *list;
int flags;
{
register arrayind_t i;
register WORD_LIST *l;
ARRAY *a;
a = array_cell (var);
i = (flags & ASS_APPEND) ? array_max_index (a) + 1 : 0;
for (l = list; l; l = l->next, i++)
if (var->assign_func)
(*var->assign_func) (var, l->word->word, i, 0);
else
array_insert (a, i, l->word->word);
return var;
}
WORD_LIST *
expand_compound_array_assignment (var, value, flags)
SHELL_VAR *var;
char *value;
int flags;
{
WORD_LIST *list, *nlist;
char *val;
int ni;
/* I don't believe this condition is ever true any more. */
if (*value == '(') /*)*/
{
ni = 1;
val = extract_array_assignment_list (value, &ni);
if (val == 0)
return (WORD_LIST *)NULL;
}
else
val = value;
/* Expand the value string into a list of words, performing all the
shell expansions including pathname generation and word splitting. */
/* First we split the string on whitespace, using the shell parser
(ksh93 seems to do this). */
list = parse_string_to_word_list (val, 1, "array assign");
/* If we're using [subscript]=value, we need to quote each [ and ] to
prevent unwanted filename expansion. */
if (list)
quote_array_assignment_chars (list);
/* Now that we've split it, perform the shell expansions on each
word in the list. */
nlist = list ? expand_words_no_vars (list) : (WORD_LIST *)NULL;
dispose_words (list);
if (val != value)
free (val);
return nlist;
}
void
assign_compound_array_list (var, nlist, flags)
SHELL_VAR *var;
WORD_LIST *nlist;
int flags;
{
ARRAY *a;
HASH_TABLE *h;
WORD_LIST *list;
char *w, *val, *nval;
int len, iflags;
arrayind_t ind, last_ind;
char *akey;
a = (var && array_p (var)) ? array_cell (var) : (ARRAY *)0;
h = (var && assoc_p (var)) ? assoc_cell (var) : (HASH_TABLE *)0;
akey = (char *)0;
ind = 0;
/* Now that we are ready to assign values to the array, kill the existing
value. */
if ((flags & ASS_APPEND) == 0)
{
if (array_p (var) && a)
array_flush (a);
else if (assoc_p (var) && h)
assoc_flush (h);
}
last_ind = (a && (flags & ASS_APPEND)) ? array_max_index (a) + 1 : 0;
for (list = nlist; list; list = list->next)
{
iflags = flags;
w = list->word->word;
/* We have a word of the form [ind]=value */
if ((list->word->flags & W_ASSIGNMENT) && w[0] == '[')
{
len = skipsubscript (w, 0);
/* XXX - changes for `+=' */
if (w[len] != ']' || (w[len+1] != '=' && (w[len+1] != '+' || w[len+2] != '=')))
{
if (assoc_p (var))
{
err_badarraysub (w);
continue;
}
nval = make_variable_value (var, w, flags);
if (var->assign_func)
(*var->assign_func) (var, nval, last_ind, 0);
else
array_insert (a, last_ind, nval);
FREE (nval);
last_ind++;
continue;
}
if (len == 1)
{
err_badarraysub (w);
continue;
}
if (ALL_ELEMENT_SUB (w[1]) && len == 2)
{
if (assoc_p (var))
report_error (_("%s: invalid associative array key"), w);
else
report_error (_("%s: cannot assign to non-numeric index"), w);
continue;
}
if (array_p (var))
{
ind = array_expand_index (w + 1, len);
if (ind < 0)
{
err_badarraysub (w);
continue;
}
last_ind = ind;
}
else if (assoc_p (var))
{
akey = substring (w, 1, len);
if (akey == 0 || *akey == 0)
{
err_badarraysub (w);
continue;
}
}
/* XXX - changes for `+=' -- just accept the syntax. ksh93 doesn't do this */
if (w[len + 1] == '+' && w[len + 2] == '=')
{
iflags |= ASS_APPEND;
val = w + len + 3;
}
else
val = w + len + 2;
}
else if (assoc_p (var))
{
report_error (_("%s: %s: must use subscript when assigning associative array"), var->name, w);
continue;
}
else /* No [ind]=value, just a stray `=' */
{
ind = last_ind;
val = w;
}
if (integer_p (var))
this_command_name = (char *)NULL; /* no command name for errors */
bind_array_var_internal (var, ind, akey, val, iflags);
last_ind++;
}
}
/* Perform a compound array assignment: VAR->name=( VALUE ). The
VALUE has already had the parentheses stripped. */
SHELL_VAR *
assign_array_var_from_string (var, value, flags)
SHELL_VAR *var;
char *value;
int flags;
{
WORD_LIST *nlist;
if (value == 0)
return var;
nlist = expand_compound_array_assignment (var, value, flags);
assign_compound_array_list (var, nlist, flags);
if (nlist)
dispose_words (nlist);
return (var);
}
/* Quote globbing chars and characters in $IFS before the `=' in an assignment
statement (usually a compound array assignment) to protect them from
unwanted filename expansion or word splitting. */
static char *
quote_assign (string)
const char *string;
{
size_t slen;
int saw_eq;
char *temp, *t;
const char *s, *send;
DECLARE_MBSTATE;
slen = strlen (string);
send = string + slen;
t = temp = (char *)xmalloc (slen * 2 + 1);
saw_eq = 0;
for (s = string; *s; )
{
if (*s == '=')
saw_eq = 1;
if (saw_eq == 0 && (glob_char_p (s) || isifs (*s)))
*t++ = '\\';
COPY_CHAR_P (t, s, send);
}
*t = '\0';
return temp;
}
/* For each word in a compound array assignment, if the word looks like
[ind]=value, quote globbing chars and characters in $IFS before the `='. */
static void
quote_array_assignment_chars (list)
WORD_LIST *list;
{
char *nword;
WORD_LIST *l;
for (l = list; l; l = l->next)
{
if (l->word == 0 || l->word->word == 0 || l->word->word[0] == '\0')
continue; /* should not happen, but just in case... */
/* Don't bother if it doesn't look like [ind]=value */
if (l->word->word[0] != '[' || mbschr (l->word->word, '=') == 0) /* ] */
continue;
nword = quote_assign (l->word->word);
free (l->word->word);
l->word->word = nword;
}
}
/* skipsubscript moved to subst.c to use private functions. 2009/02/24. */
/* This function is called with SUB pointing to just after the beginning
`[' of an array subscript and removes the array element to which SUB
expands from array VAR. A subscript of `*' or `@' unsets the array. */
int
unbind_array_element (var, sub)
SHELL_VAR *var;
char *sub;
{
int len;
arrayind_t ind;
char *akey;
ARRAY_ELEMENT *ae;
len = skipsubscript (sub, 0);
if (sub[len] != ']' || len == 0)
{
builtin_error ("%s[%s: %s", var->name, sub, _(bash_badsub_errmsg));
return -1;
}
sub[len] = '\0';
if (ALL_ELEMENT_SUB (sub[0]) && sub[1] == 0)
{
unbind_variable (var->name);
return (0);
}
if (assoc_p (var))
{
akey = expand_assignment_string_to_string (sub, 0); /* [ */
if (akey == 0 || *akey == 0)
{
builtin_error ("[%s]: %s", sub, _(bash_badsub_errmsg));
return -1;
}
assoc_remove (assoc_cell (var), akey);
}
else
{
ind = array_expand_index (sub, len+1);
if (ind < 0)
{
builtin_error ("[%s]: %s", sub, _(bash_badsub_errmsg));
return -1;
}
ae = array_remove (array_cell (var), ind);
if (ae)
array_dispose_element (ae);
}
return 0;
}
/* Format and output an array assignment in compound form VAR=(VALUES),
suitable for re-use as input. */
void
print_array_assignment (var, quoted)
SHELL_VAR *var;
int quoted;
{
char *vstr;
vstr = array_to_assign (array_cell (var), quoted);
if (vstr == 0)
printf ("%s=%s\n", var->name, quoted ? "'()'" : "()");
else
{
printf ("%s=%s\n", var->name, vstr);
free (vstr);
}
}
/* Format and output an associative array assignment in compound form
VAR=(VALUES), suitable for re-use as input. */
void
print_assoc_assignment (var, quoted)
SHELL_VAR *var;
int quoted;
{
char *vstr;
vstr = assoc_to_assign (assoc_cell (var), quoted);
if (vstr == 0)
printf ("%s=%s\n", var->name, quoted ? "'()'" : "()");
else
{
printf ("%s=%s\n", var->name, vstr);
free (vstr);
}
}
/***********************************************************************/
/* */
/* Utility functions to manage arrays and their contents for expansion */
/* */
/***********************************************************************/
/* Return 1 if NAME is a properly-formed array reference v[sub]. */
int
valid_array_reference (name)
char *name;
{
char *t;
int r, len;
t = mbschr (name, '['); /* ] */
if (t)
{
*t = '\0';
r = legal_identifier (name);
*t = '[';
if (r == 0)
return 0;
/* Check for a properly-terminated non-blank subscript. */
len = skipsubscript (t, 0);
if (t[len] != ']' || len == 1)
return 0;
for (r = 1; r < len; r++)
if (whitespace (t[r]) == 0)
return 1;
return 0;
}
return 0;
}
/* Expand the array index beginning at S and extending LEN characters. */
arrayind_t
array_expand_index (s, len)
char *s;
int len;
{
char *exp, *t;
int expok;
arrayind_t val;
exp = (char *)xmalloc (len);
strncpy (exp, s, len - 1);
exp[len - 1] = '\0';
t = expand_arith_string (exp, 0);
this_command_name = (char *)NULL;
val = evalexp (t, &expok);
free (t);
free (exp);
if (expok == 0)
{
last_command_exit_value = EXECUTION_FAILURE;
top_level_cleanup ();
jump_to_top_level (DISCARD);
}
return val;
}
/* Return the name of the variable specified by S without any subscript.
If SUBP is non-null, return a pointer to the start of the subscript
in *SUBP. If LENP is non-null, the length of the subscript is returned
in *LENP. This returns newly-allocated memory. */
char *
array_variable_name (s, subp, lenp)
char *s, **subp;
int *lenp;
{
char *t, *ret;
int ind, ni;
t = mbschr (s, '[');
if (t == 0)
{
if (subp)
*subp = t;
if (lenp)
*lenp = 0;
return ((char *)NULL);
}
ind = t - s;
ni = skipsubscript (s, ind);
if (ni <= ind + 1 || s[ni] != ']')
{
err_badarraysub (s);
if (subp)
*subp = t;
if (lenp)
*lenp = 0;
return ((char *)NULL);
}
*t = '\0';
ret = savestring (s);
*t++ = '['; /* ] */
if (subp)
*subp = t;
if (lenp)
*lenp = ni - ind;
return ret;
}
/* Return the variable specified by S without any subscript. If SUBP is
non-null, return a pointer to the start of the subscript in *SUBP.
If LENP is non-null, the length of the subscript is returned in *LENP. */
SHELL_VAR *
array_variable_part (s, subp, lenp)
char *s, **subp;
int *lenp;
{
char *t;
SHELL_VAR *var;
t = array_variable_name (s, subp, lenp);
if (t == 0)
return ((SHELL_VAR *)NULL);
var = find_variable (t);
free (t);
return (var == 0 || invisible_p (var)) ? (SHELL_VAR *)0 : var;
}
/* Return a string containing the elements in the array and subscript
described by S. If the subscript is * or @, obeys quoting rules akin
to the expansion of $* and $@ including double quoting. If RTYPE
is non-null it gets 1 if the array reference is name[*], 2 if the
reference is name[@], and 0 otherwise. */
static char *
array_value_internal (s, quoted, allow_all, rtype)
char *s;
int quoted, allow_all, *rtype;
{
int len;
arrayind_t ind;
char *akey;
char *retval, *t, *temp;
WORD_LIST *l;
SHELL_VAR *var;
var = array_variable_part (s, &t, &len);
/* Expand the index, even if the variable doesn't exist, in case side
effects are needed, like ${w[i++]} where w is unset. */
#if 0
if (var == 0)
return (char *)NULL;
#endif
if (len == 0)
return ((char *)NULL); /* error message already printed */
/* [ */
if (ALL_ELEMENT_SUB (t[0]) && t[1] == ']')
{
if (rtype)
*rtype = (t[0] == '*') ? 1 : 2;
if (allow_all == 0)
{
err_badarraysub (s);
return ((char *)NULL);
}
else if (var == 0 || value_cell (var) == 0)
return ((char *)NULL);
else if (array_p (var) == 0 && assoc_p (var) == 0)
l = add_string_to_list (value_cell (var), (WORD_LIST *)NULL);
else if (assoc_p (var))
{
l = assoc_to_word_list (assoc_cell (var));
if (l == (WORD_LIST *)NULL)
return ((char *)NULL);
}
else
{
l = array_to_word_list (array_cell (var));
if (l == (WORD_LIST *)NULL)
return ((char *) NULL);
}
if (t[0] == '*' && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
{
temp = string_list_dollar_star (l);
retval = quote_string (temp);
free (temp);
}
else /* ${name[@]} or unquoted ${name[*]} */
retval = string_list_dollar_at (l, quoted);
dispose_words (l);
}
else
{
if (rtype)
*rtype = 0;
if (var == 0 || array_p (var) || assoc_p (var) == 0)
{
ind = array_expand_index (t, len);
if (ind < 0)
{
index_error:
if (var)
err_badarraysub (var->name);
else
{
t[-1] = '\0';
err_badarraysub (s);
t[-1] = '['; /* ] */
}
return ((char *)NULL);
}
}
else if (assoc_p (var))
{
t[len - 1] = '\0';
akey = expand_assignment_string_to_string (t, 0); /* [ */
t[len - 1] = ']';
if (akey == 0 || *akey == 0)
goto index_error;
}
if (var == 0)
return ((char *)NULL);
if (array_p (var) == 0 && assoc_p (var) == 0)
return (ind == 0 ? value_cell (var) : (char *)NULL);
else if (assoc_p (var))
retval = assoc_reference (assoc_cell (var), akey);
else
retval = array_reference (array_cell (var), ind);
}
return retval;
}
/* Return a string containing the elements described by the array and
subscript contained in S, obeying quoting for subscripts * and @. */
char *
array_value (s, quoted, rtype)
char *s;
int quoted, *rtype;
{
return (array_value_internal (s, quoted, 1, rtype));
}
/* Return the value of the array indexing expression S as a single string.
If ALLOW_ALL is 0, do not allow `@' and `*' subscripts. This is used
by other parts of the shell such as the arithmetic expression evaluator
in expr.c. */
char *
get_array_value (s, allow_all, rtype)
char *s;
int allow_all, *rtype;
{
return (array_value_internal (s, 0, allow_all, rtype));
}
char *
array_keys (s, quoted)
char *s;
int quoted;
{
int len;
char *retval, *t, *temp;
WORD_LIST *l;
SHELL_VAR *var;
var = array_variable_part (s, &t, &len);
/* [ */
if (var == 0 || ALL_ELEMENT_SUB (t[0]) == 0 || t[1] != ']')
return (char *)NULL;
if (array_p (var) == 0 && assoc_p (var) == 0)
l = add_string_to_list ("0", (WORD_LIST *)NULL);
else if (assoc_p (var))
l = assoc_keys_to_word_list (assoc_cell (var));
else
l = array_keys_to_word_list (array_cell (var));
if (l == (WORD_LIST *)NULL)
return ((char *) NULL);
if (t[0] == '*' && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
{
temp = string_list_dollar_star (l);
retval = quote_string (temp);
free (temp);
}
else /* ${!name[@]} or unquoted ${!name[*]} */
retval = string_list_dollar_at (l, quoted);
dispose_words (l);
return retval;
}
#endif /* ARRAY_VARS */
+1 -1
View File
@@ -42,7 +42,7 @@ extern void assign_compound_array_list __P((SHELL_VAR *, WORD_LIST *, int));
extern SHELL_VAR *assign_array_var_from_string __P((SHELL_VAR *, char *, int));
extern int unbind_array_element __P((SHELL_VAR *, char *));
extern int skipsubscript __P((const char *, int));
extern int skipsubscript __P((const char *, int, int));
extern void print_array_assignment __P((SHELL_VAR *, int));
extern void print_assoc_assignment __P((SHELL_VAR *, int));
+9 -5
View File
@@ -405,8 +405,11 @@ assoc_to_assign (hash, quoted)
for (i = 0; i < hash->nbuckets; i++)
for (tlist = hash_items (i, hash); tlist; tlist = tlist->next)
{
#if 0
istr = sh_double_quote (tlist->key);
#if 1
if (sh_contains_shell_metas (tlist->key))
istr = sh_double_quote (tlist->key);
else
istr = tlist->key;
#else
istr = tlist->key;
#endif
@@ -427,9 +430,10 @@ assoc_to_assign (hash, quoted)
}
ret[rlen++] = ' ';
#if 0
FREE (istr);
#endif
if (istr != tlist->key)
FREE (istr);
FREE (vstr);
}
+18 -2
View File
@@ -249,6 +249,9 @@ static rl_hook_func_t *old_rl_startup_hook = (rl_hook_func_t *)NULL;
static int dot_in_path = 0;
/* Set to non-zero when dabbrev-expand is running */
static int dabbrev_expand_active = 0;
/* What kind of quoting is performed by bash_quote_filename:
COMPLETE_DQUOTE = double-quoting the filename
COMPLETE_SQUOTE = single_quoting the filename
@@ -2791,6 +2794,8 @@ build_history_completion_array ()
if (hlist)
{
for (i = 0; hlist[i]; i++)
;
for ( --i; i >= 0; i--)
{
/* Separate each token, and place into an array. */
tokens = history_tokenize (hlist[i]->line);
@@ -2807,7 +2812,8 @@ build_history_completion_array ()
}
/* Sort the complete list of tokens. */
qsort (history_completion_array, harry_len, sizeof (char *), (QSFUNC *)strvec_strcmp);
if (dabbrev_expand_active == 0)
qsort (history_completion_array, harry_len, sizeof (char *), (QSFUNC *)strvec_strcmp);
}
}
@@ -2823,6 +2829,8 @@ history_completion_generator (hint_text, state)
list of strings to complete over. */
if (state == 0)
{
if (dabbrev_expand_active) /* This is kind of messy */
rl_completion_suppress_append = 1;
local_index = 0;
build_history_completion_array ();
text = hint_text;
@@ -2866,25 +2874,33 @@ static int
bash_dabbrev_expand (count, key)
int count, key;
{
int r;
int r, orig_suppress, orig_sort;
rl_compentry_func_t *orig_func;
rl_completion_func_t *orig_attempt_func;
orig_func = rl_menu_completion_entry_function;
orig_attempt_func = rl_attempted_completion_function;
orig_suppress = rl_completion_suppress_append;
orig_sort = rl_sort_completion_matches;
rl_menu_completion_entry_function = history_completion_generator;
rl_attempted_completion_function = (rl_completion_func_t *)NULL;
rl_filename_completion_desired = 0;
rl_completion_suppress_append = 1;
rl_sort_completion_matches = 0;
/* XXX - use rl_completion_mode here? */
dabbrev_expand_active = 1;
if (rl_last_func == bash_dabbrev_expand)
rl_last_func = rl_menu_complete;
r = rl_menu_complete (count, key);
dabbrev_expand_active = 0;
rl_last_func = bash_dabbrev_expand;
rl_menu_completion_entry_function = orig_func;
rl_attempted_completion_function = orig_attempt_func;
rl_completion_suppress_append = orig_suppress;
rl_sort_completion_matches = orig_sort;
return r;
}
+19 -3
View File
@@ -249,6 +249,9 @@ static rl_hook_func_t *old_rl_startup_hook = (rl_hook_func_t *)NULL;
static int dot_in_path = 0;
/* Set to non-zero when dabbrev-expand is running */
static int dabbrev_expand_active = 0;
/* What kind of quoting is performed by bash_quote_filename:
COMPLETE_DQUOTE = double-quoting the filename
COMPLETE_SQUOTE = single_quoting the filename
@@ -752,7 +755,7 @@ clear_hostname_list ()
return;
for (i = 0; i < hostname_list_length; i++)
free (hostname_list[i]);
hostname_list_length = 0;
hostname_list_length = hostname_list_initialized = 0;
}
/* Return a NULL terminated list of hostnames which begin with TEXT.
@@ -2791,6 +2794,8 @@ build_history_completion_array ()
if (hlist)
{
for (i = 0; hlist[i]; i++)
;
for ( ; i > 0; i--)
{
/* Separate each token, and place into an array. */
tokens = history_tokenize (hlist[i]->line);
@@ -2807,7 +2812,8 @@ build_history_completion_array ()
}
/* Sort the complete list of tokens. */
qsort (history_completion_array, harry_len, sizeof (char *), (QSFUNC *)strvec_strcmp);
if (dabbrev_expand_active == 0)
qsort (history_completion_array, harry_len, sizeof (char *), (QSFUNC *)strvec_strcmp);
}
}
@@ -2823,6 +2829,8 @@ history_completion_generator (hint_text, state)
list of strings to complete over. */
if (state == 0)
{
if (dabbrev_expand_active) /* This is kind of messy */
rl_completion_suppress_append = 1;
local_index = 0;
build_history_completion_array ();
text = hint_text;
@@ -2866,25 +2874,33 @@ static int
bash_dabbrev_expand (count, key)
int count, key;
{
int r;
int r, orig_suppress, orig_sort;
rl_compentry_func_t *orig_func;
rl_completion_func_t *orig_attempt_func;
orig_func = rl_menu_completion_entry_function;
orig_attempt_func = rl_attempted_completion_function;
orig_suppress = rl_completion_suppress_append;
orig_sort = rl_sort_completion_matches;
rl_menu_completion_entry_function = history_completion_generator;
rl_attempted_completion_function = (rl_completion_func_t *)NULL;
rl_filename_completion_desired = 0;
rl_completion_suppress_append = 1;
rl_sort_completion_matches = 0;
/* XXX - use rl_completion_mode here? */
dabbrev_expand_active = 1;
if (rl_last_func == bash_dabbrev_expand)
rl_last_func = rl_menu_complete;
r = rl_menu_complete (count, key);
dabbrev_expand_active = 0;
rl_last_func = bash_dabbrev_expand;
rl_menu_completion_entry_function = orig_func;
rl_attempted_completion_function = orig_attempt_func;
rl_completion_suppress_append = orig_suppress;
rl_sort_completion_matches = orig_sort;
return r;
}
+55 -15
View File
@@ -23,7 +23,7 @@ $PRODUCES complete.c
$BUILTIN complete
$DEPENDS_ON PROGRAMMABLE_COMPLETION
$FUNCTION complete_builtin
$SHORT_DOC complete [-abcdefgjksuv] [-pr] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]
$SHORT_DOC complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]
Specify how arguments are to be completed by Readline.
For each NAME, specify how arguments are to be completed. If no options
@@ -34,9 +34,14 @@ Options:
-p print existing completion specifications in a reusable format
-r remove a completion specification for each NAME, or, if no
NAMEs are supplied, all completion specifications
-D apply the completions and actions as the default for commands
without any specific completion defined
-E apply the completions and actions to "empty" commands --
completion attempted on a blank line
When completion is attempted, the actions are applied in the order the
uppercase-letter options are listed above.
uppercase-letter options are listed above. The -D option takes
precedence over -E.
Exit Status:
Returns success unless an invalid option is supplied or an error occurs.
@@ -72,6 +77,7 @@ $END
struct _optflags {
int pflag;
int rflag;
int Dflag;
int Eflag;
};
@@ -187,7 +193,7 @@ build_actions (list, flagp, actp, optp)
opt_given = 0;
reset_internal_getopt ();
while ((opt = internal_getopt (list, "abcdefgjko:prsuvA:G:W:P:S:X:F:C:E")) != -1)
while ((opt = internal_getopt (list, "abcdefgjko:prsuvA:G:W:P:S:X:F:C:DE")) != -1)
{
opt_given = 1;
switch (opt)
@@ -275,6 +281,18 @@ build_actions (list, flagp, actp, optp)
case 'C':
Carg = list_optarg;
break;
case 'D':
if (flagp)
{
flagp->Dflag = 1;
break;
}
else
{
sh_invalidopt ("-D");
builtin_usage ();
return (EX_USAGE);
}
case 'E':
if (flagp)
{
@@ -334,7 +352,7 @@ complete_builtin (list)
return (EXECUTION_SUCCESS);
}
opt_given = oflags.pflag = oflags.rflag = oflags.Eflag = 0;
opt_given = oflags.pflag = oflags.rflag = oflags.Dflag = oflags.Eflag = 0;
acts = copts = (unsigned long)0L;
Garg = Warg = Parg = Sarg = Xarg = Farg = Carg = (char *)NULL;
@@ -349,7 +367,8 @@ complete_builtin (list)
list = loptend;
wl = oflags.Eflag ? make_word_list (make_bare_word ("_EmptycmD_"), (WORD_LIST *)NULL) : 0;
wl = oflags.Dflag ? make_word_list (make_bare_word (DEFAULTCMD), (WORD_LIST *)NULL)
: (oflags.Eflag ? make_word_list (make_bare_word (EMPTYCMD), (WORD_LIST *)NULL) : 0);
/* -p overrides everything else */
if (oflags.pflag || (list == 0 && opt_given == 0))
@@ -540,7 +559,12 @@ print_one_completion (cmd, cs)
/* simple arguments that don't require quoting */
PRINTARG (cs->funcname, "-F");
printf ("%s\n", cmd);
if (STREQ (cmd, EMPTYCMD))
printf ("-E\n");
else if (STREQ (cmd, DEFAULTCMD))
printf ("-D\n");
else
printf ("%s\n", cmd);
return (0);
}
@@ -575,7 +599,12 @@ print_compopts (cmd, cs, full)
PRINTCOMPOPT (COPT_PLUSDIRS, "plusdirs");
}
printf ("%s\n", cmd);
if (STREQ (cmd, EMPTYCMD))
printf ("-E\n");
else if (STREQ (cmd, DEFAULTCMD))
printf ("-D\n");
else
printf ("%s\n", cmd);
}
static int
@@ -683,7 +712,7 @@ compgen_builtin (list)
cs->filterpat = STRDUP (Xarg);
rval = EXECUTION_FAILURE;
sl = gen_compspec_completions (cs, "compgen", word, 0, 0);
sl = gen_compspec_completions (cs, "compgen", word, 0, 0, 0);
/* If the compspec wants the bash default completions, temporarily
turn off programmable completion and call the bash completion code. */
@@ -720,7 +749,7 @@ compgen_builtin (list)
$BUILTIN compopt
$DEPENDS_ON PROGRAMMABLE_COMPLETION
$FUNCTION compopt_builtin
$SHORT_DOC compopt [-o|+o option] [name ...]
$SHORT_DOC compopt [-o|+o option] [-DE] [name ...]
Modify or display completion options.
Modify the completion options for each NAME, or, if no NAMEs are supplied,
@@ -729,6 +758,8 @@ the completion options for each NAME or the current completion specification.
Options:
-o option Set completion option OPTION for each NAME
-D Change options for the "default" command completion
-E Change options for the "empty" command completion
Using `+o' instead of `-o' turns off the specified option.
@@ -749,15 +780,15 @@ int
compopt_builtin (list)
WORD_LIST *list;
{
int opts_on, opts_off, *opts, opt, oind, ret, Eflag;
WORD_LIST *l;
int opts_on, opts_off, *opts, opt, oind, ret, Dflag, Eflag;
WORD_LIST *l, *wl;
COMPSPEC *cs;
opts_on = opts_off = 0;
opts_on = opts_off = Eflag = Dflag = 0;
ret = EXECUTION_SUCCESS;
reset_internal_getopt ();
while ((opt = internal_getopt (list, "+o:")) != EOF)
while ((opt = internal_getopt (list, "+o:DE")) != EOF)
{
opts = (list_opttype == '-') ? &opts_on : &opts_off;
@@ -772,6 +803,12 @@ compopt_builtin (list)
}
*opts |= compopts[oind].optflag;
break;
case 'D':
Dflag = 1;
break;
case 'E':
Eflag = 1;
break;
default:
builtin_usage ();
return (EX_USAGE);
@@ -779,7 +816,10 @@ compopt_builtin (list)
}
list = loptend;
if (list == 0)
wl = Dflag ? make_word_list (make_bare_word (DEFAULTCMD), (WORD_LIST *)NULL)
: (Eflag ? make_word_list (make_bare_word (EMPTYCMD), (WORD_LIST *)NULL) : 0);
if (list == 0 && wl == 0)
{
if (RL_ISSTATE (RL_STATE_COMPLETING) == 0 || pcomp_curcs == 0)
{
@@ -805,7 +845,7 @@ compopt_builtin (list)
return (ret);
}
for (l = list; l; l = l->next)
for (l = wl ? wl : list; l; l = l->next)
{
cs = progcomp_search (l->word->word);
if (cs == 0)
+640 -604
View File
File diff suppressed because it is too large Load Diff
+46 -3
View File
@@ -5698,12 +5698,17 @@ using the \fBcomplete\fP builtin (see
below), the programmable completion facilities are invoked.
.PP
First, the command name is identified.
If the command word is the empty string (completion attempted at the
beginning of an empty line), any compspec defined with
the \fB\-E\fP option to \fBcomplete\fP is used.
If a compspec has been defined for that command, the
compspec is used to generate the list of possible completions for the word.
If the command word is a full pathname, a compspec for the full
pathname is searched for first.
If no compspec is found for the full pathname, an attempt is made to
find a compspec for the portion following the final slash.
If those searches to not result in a compspec, any compspec defined with
the \fB\-D\fP option to \fBcomplete\fP is used as the default.
.PP
Once a compspec has been found, it is used to generate the list of
matching words.
@@ -5836,6 +5841,35 @@ 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 \fBmark\-directories\fP readline variable, regardless
of the setting of the \fBmark-symlinked\-directories\fP readline variable.
.PP
There is some support for dynamically modifying completions. This is
most useful when used in combination with a default completion specified
with \fBcomplete -D\fP.
It's possible for shell functions executed as completion
handlers to indicate that completion should be retried by returning an
exit status of 124. If a shell function returns 124, and changes
the compspec associated with the command on which completion is being
attempted (supplied as the first argument when the function is executed),
programmable completion restarts from the beginning, with an
attempt to find a compspec for that command. This allows a set of
completions to be built dynamically as completion is attempted, rather than
being loaded all at once.
.PP
For instance, assuming that there is a library of compspecs, each kept in a
file corresponding to the name of the command, the following default
completion function would load completions dynamically:
.PP
\f(CW_completion_loader()
.br
{
.br
. "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124
.br
}
.br
complete -D -F _completion_loader
.br
\fP
.SH HISTORY
When the
.B \-o history
@@ -6567,12 +6601,12 @@ will be displayed.
The return value is true unless an invalid option is supplied, or no
matches were generated.
.TP
\fBcomplete\fP [\fB\-abcdefgjksuv\fP] [\fB\-o\fP \fIcomp-option\fP] [\fB\-E\fP] [\fB\-A\fP \fIaction\fP] [\fB\-G\fP \fIglobpat\fP] [\fB\-W\fP \fIwordlist\fP] [\fB\-F\fP \fIfunction\fP] [\fB\-C\fP \fIcommand\fP]
\fBcomplete\fP [\fB\-abcdefgjksuv\fP] [\fB\-o\fP \fIcomp-option\fP] [\fB\-DE\fP] [\fB\-A\fP \fIaction\fP] [\fB\-G\fP \fIglobpat\fP] [\fB\-W\fP \fIwordlist\fP] [\fB\-F\fP \fIfunction\fP] [\fB\-C\fP \fIcommand\fP]
.br
[\fB\-X\fP \fIfilterpat\fP] [\fB\-P\fP \fIprefix\fP] [\fB\-S\fP \fIsuffix\fP] \fIname\fP [\fIname ...\fP]
.PD 0
.TP
\fBcomplete\fP \fB\-pr\fP [\fB\-E\fP] [\fIname\fP ...]
\fBcomplete\fP \fB\-pr\fP [\fB\-DE\fP] [\fIname\fP ...]
.PD
Specify how arguments to each \fIname\fP should be completed.
If the \fB\-p\fP option is supplied, or if no options are supplied,
@@ -6581,6 +6615,9 @@ them to be reused as input.
The \fB\-r\fP option removes a completion specification for
each \fIname\fP, or, if no \fIname\fPs are supplied, all
completion specifications.
The \fB\-D\fP option indicates that the remaining options and actions should
apply to the ``default'' command completion; that is, completion attempted
on a command for which no completion has previously been defined.
The \fB\-E\fP option indicates that the remaining options and actions should
apply to ``empty'' command completion; that is, completion attempted on a
blank line.
@@ -6760,7 +6797,7 @@ a \fIname\fP for which no specification exists, or
an error occurs adding a completion specification.
.RE
.TP
\fBcompopt\fP [\fB\-o\fP \fIoption\fP] [\fB+o\fP \fIoption\fP] [\fIname\fP]
\fBcompopt\fP [\fB\-o\fP \fIoption\fP] [\fB\-DE\fP] [\fB+o\fP \fIoption\fP] [\fIname\fP]
Modify completion options for each \fIname\fP according to the
\fIoption\fPs, or for the
currently-execution completion if no \fIname\fPs are supplied.
@@ -6768,6 +6805,12 @@ If no \fIoption\fPs are given, display the completion options for each
\fIname\fP or the current completion.
The possible values of \fIoption\fP are those valid for the \fBcomplete\fP
builtin described above.
The \fB\-D\fP option indicates that the remaining options should
apply to the ``default'' command completion; that is, completion attempted
on a command for which no completion has previously been defined.
The \fB\-E\fP option indicates that the remaining options should
apply to ``empty'' command completion; that is, completion attempted on a
blank line.
.PP
The return value is true unless an invalid option is supplied, an attempt
is made to modify the options for a \fIname\fP for which no completion
+23 -7
View File
@@ -3,7 +3,7 @@
</HEAD>
<BODY><TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2009 June 17<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2009 July 30<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<BR><A HREF="#index">Index</A>
@@ -2374,7 +2374,8 @@ If
<FONT SIZE=-1><B>HOSTFILE</B>
</FONT>
is set, but has no value, <B>bash</B> attempts to read
is set, but has no value, or does not name a readable file,
<B>bash</B> attempts to read
<I>/etc/hosts</I>
@@ -7112,6 +7113,12 @@ of matches; a negative argument may be used to move backward
through the list.
This command is intended to be bound to <B>TAB</B>, but is unbound
by default.
<DT><B>menu-complete-rd</B>
<DD>
Identical to <B>menu-complete</B>, but moves backward through the list
of possible completions, as if <B>menu-complete</B> had been given a
negative argument. This command is unbound by default.
<DT><B>delete-char-or-list</B>
<DD>
@@ -8475,12 +8482,12 @@ will be displayed.
<P>
The return value is true unless an invalid option is supplied, or no
matches were generated.
<DT><B>complete</B> [<B>-abcdefgjksuv</B>] [<B>-o</B> <I>comp-option</I>] [<B>-E</B>] [<B>-A</B> <I>action</I>] [<B>-G</B> <I>globpat</I>] [<B>-W</B> <I>wordlist</I>] [<B>-F</B> <I>function</I>] [<B>-C</B> <I>command</I>]<DD>
<DT><B>complete</B> [<B>-abcdefgjksuv</B>] [<B>-o</B> <I>comp-option</I>] [<B>-DE</B>] [<B>-A</B> <I>action</I>] [<B>-G</B> <I>globpat</I>] [<B>-W</B> <I>wordlist</I>] [<B>-F</B> <I>function</I>] [<B>-C</B> <I>command</I>]<DD>
<BR>
[<B>-X</B> <I>filterpat</I>] [<B>-P</B> <I>prefix</I>] [<B>-S</B> <I>suffix</I>] <I>name</I> [<I>name ...</I>]
<DT><B>complete</B> <B>-pr</B> [<B>-E</B>] [<I>name</I> ...]<DD>
<DT><B>complete</B> <B>-pr</B> [<B>-DE</B>] [<I>name</I> ...]<DD>
Specify how arguments to each <I>name</I> should be completed.
If the <B>-p</B> option is supplied, or if no options are supplied,
@@ -8489,6 +8496,9 @@ them to be reused as input.
The <B>-r</B> option removes a completion specification for
each <I>name</I>, or, if no <I>name</I>s are supplied, all
completion specifications.
The <B>-D</B> option indicates that the remaining options and actions should
apply to the ``default'' command completion; that is, completion attempted
on a command for which no completion has previously been defined.
The <B>-E</B> option indicates that the remaining options and actions should
apply to ``empty'' command completion; that is, completion attempted on a
blank line.
@@ -8700,7 +8710,7 @@ a <I>name</I> for which no specification exists, or
an error occurs adding a completion specification.
</DL>
<DT><B>compopt</B> [<B>-o</B> <I>option</I>] [<B>+o</B> <I>option</I>] [<I>name</I>]<DD>
<DT><B>compopt</B> [<B>-o</B> <I>option</I>] [<B>-DE</B>] [<B>+o</B> <I>option</I>] [<I>name</I>]<DD>
Modify completion options for each <I>name</I> according to the
<I>option</I>s, or for the
currently-execution completion if no <I>name</I>s are supplied.
@@ -8708,6 +8718,12 @@ If no <I>option</I>s are given, display the completion options for each
<I>name</I> or the current completion.
The possible values of <I>option</I> are those valid for the <B>complete</B>
builtin described above.
The <B>-D</B> option indicates that the remaining options should
apply to the ``default'' command completion; that is, completion attempted
on a command for which no completion has previously been defined.
The <B>-E</B> option indicates that the remaining options should
apply to ``empty'' command completion; that is, completion attempted on a
blank line.
</DL>
<P>
@@ -12093,7 +12109,7 @@ There may be only one active coprocess at a time.
<HR>
<TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>GNU Bash-4.0<TH ALIGN=CENTER width=33%>2009 June 17<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>GNU Bash-4.0<TH ALIGN=CENTER width=33%>2009 July 30<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<HR>
@@ -12199,6 +12215,6 @@ There may be only one active coprocess at a time.
</DL>
<HR>
This document was created by man2html from bash.1.<BR>
Time: 17 June 2009 08:51:37 EDT
Time: 03 August 2009 10:10:44 EDT
</BODY>
</HTML>
BIN
View File
Binary file not shown.
+2359 -2339
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -294,9 +294,9 @@
@xrdef{Miscellaneous Commands-pg}{109}
@xrdef{Readline vi Mode-title}{Readline vi Mode}
@xrdef{Readline vi Mode-snt}{Section@tie 8.5}
@xrdef{Readline vi Mode-pg}{111}
@xrdef{Programmable Completion-title}{Programmable Completion}
@xrdef{Programmable Completion-snt}{Section@tie 8.6}
@xrdef{Readline vi Mode-pg}{111}
@xrdef{Programmable Completion-pg}{112}
@xrdef{Programmable Completion Builtins-title}{Programmable Completion Builtins}
@xrdef{Programmable Completion Builtins-snt}{Section@tie 8.7}
BIN
View File
Binary file not shown.
+4 -3
View File
@@ -55,6 +55,7 @@
\entry{possible-completions (M-?)}{107}{\code {possible-completions (M-?)}}
\entry{insert-completions (M-*)}{108}{\code {insert-completions (M-*)}}
\entry{menu-complete ()}{108}{\code {menu-complete ()}}
\entry{menu-complete-backward ()}{108}{\code {menu-complete-backward ()}}
\entry{delete-char-or-list ()}{108}{\code {delete-char-or-list ()}}
\entry{complete-filename (M-/)}{108}{\code {complete-filename (M-/)}}
\entry{possible-filename-completions (C-x /)}{108}{\code {possible-filename-completions (C-x /)}}
@@ -65,7 +66,7 @@
\entry{complete-hostname (M-@)}{108}{\code {complete-hostname (M-@)}}
\entry{possible-hostname-completions (C-x @)}{108}{\code {possible-hostname-completions (C-x @)}}
\entry{complete-command (M-!)}{108}{\code {complete-command (M-!)}}
\entry{possible-command-completions (C-x !)}{108}{\code {possible-command-completions (C-x !)}}
\entry{possible-command-completions (C-x !)}{109}{\code {possible-command-completions (C-x !)}}
\entry{dynamic-complete-history (M-TAB)}{109}{\code {dynamic-complete-history (M-\key {TAB})}}
\entry{dabbrev-expand ()}{109}{\code {dabbrev-expand ()}}
\entry{complete-into-braces (M-{\tt \char 123})}{109}{\code {complete-into-braces (M-{\tt \char 123})}}
@@ -78,7 +79,7 @@
\entry{prefix-meta (ESC)}{109}{\code {prefix-meta (\key {ESC})}}
\entry{undo (C-_ or C-x C-u)}{109}{\code {undo (C-_ or C-x C-u)}}
\entry{revert-line (M-r)}{109}{\code {revert-line (M-r)}}
\entry{tilde-expand (M-&)}{109}{\code {tilde-expand (M-&)}}
\entry{tilde-expand (M-&)}{110}{\code {tilde-expand (M-&)}}
\entry{set-mark (C-@)}{110}{\code {set-mark (C-@)}}
\entry{exchange-point-and-mark (C-x C-x)}{110}{\code {exchange-point-and-mark (C-x C-x)}}
\entry{character-search (C-])}{110}{\code {character-search (C-])}}
@@ -88,7 +89,7 @@
\entry{dump-variables ()}{110}{\code {dump-variables ()}}
\entry{dump-macros ()}{110}{\code {dump-macros ()}}
\entry{glob-complete-word (M-g)}{110}{\code {glob-complete-word (M-g)}}
\entry{glob-expand-word (C-x *)}{110}{\code {glob-expand-word (C-x *)}}
\entry{glob-expand-word (C-x *)}{111}{\code {glob-expand-word (C-x *)}}
\entry{glob-list-expansions (C-x g)}{111}{\code {glob-list-expansions (C-x g)}}
\entry{display-shell-version (C-x C-v)}{111}{\code {display-shell-version (C-x C-v)}}
\entry{shell-expand-line (M-C-e)}{111}{\code {shell-expand-line (M-C-e)}}
+4 -3
View File
@@ -53,7 +53,7 @@
\entry {\code {forward-word (M-f)}}{103}
\initial {G}
\entry {\code {glob-complete-word (M-g)}}{110}
\entry {\code {glob-expand-word (C-x *)}}{110}
\entry {\code {glob-expand-word (C-x *)}}{111}
\entry {\code {glob-list-expansions (C-x g)}}{111}
\initial {H}
\entry {\code {history-and-alias-expand-line ()}}{111}
@@ -72,6 +72,7 @@
\initial {M}
\entry {\code {magic-space ()}}{111}
\entry {\code {menu-complete ()}}{108}
\entry {\code {menu-complete-backward ()}}{108}
\initial {N}
\entry {\code {next-history (C-n)}}{104}
\entry {\code {non-incremental-forward-search-history (M-n)}}{104}
@@ -80,7 +81,7 @@
\entry {\code {operate-and-get-next (C-o)}}{111}
\entry {\code {overwrite-mode ()}}{106}
\initial {P}
\entry {\code {possible-command-completions (C-x !)}}{108}
\entry {\code {possible-command-completions (C-x !)}}{109}
\entry {\code {possible-completions (M-?)}}{107}
\entry {\code {possible-filename-completions (C-x /)}}{108}
\entry {\code {possible-hostname-completions (C-x @)}}{108}
@@ -104,7 +105,7 @@
\entry {\code {shell-kill-word ()}}{106}
\entry {\code {start-kbd-macro (C-x ()}}{109}
\initial {T}
\entry {\code {tilde-expand (M-&)}}{109}
\entry {\code {tilde-expand (M-&)}}{110}
\entry {\code {transpose-chars (C-t)}}{105}
\entry {\code {transpose-words (M-t)}}{105}
\initial {U}
+216 -196
View File
@@ -1,6 +1,6 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on June, 17 2009 by texi2html 1.64 -->
<!-- Created on August, 3 2009 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
@@ -6486,7 +6486,8 @@ is running;
the next time hostname completion is attempted after the
value is changed, Bash adds the contents of the new file to the
existing list.
If <CODE>HOSTFILE</CODE> is set, but has no value, Bash attempts to read
If <CODE>HOSTFILE</CODE> is set, but has no value, or does not name a readable file,
Bash attempts to read
<TT>`/etc/hosts'</TT> to obtain the list of possible hostname completions.
When <CODE>HOSTFILE</CODE> is unset, the hostname list is cleared.
<P>
@@ -10726,8 +10727,16 @@ by default.
<P>
<A NAME="IDX443"></A>
<DT><CODE>delete-char-or-list ()</CODE>
<DT><CODE>menu-complete-backward ()</CODE>
<DD><A NAME="IDX444"></A>
Identical to <CODE>menu-complete</CODE>, but moves backward through the list
of possible completions, as if <CODE>menu-complete</CODE> had been given a
negative argument.
<P>
<A NAME="IDX445"></A>
<DT><CODE>delete-char-or-list ()</CODE>
<DD><A NAME="IDX446"></A>
Deletes the character under the cursor if not at the beginning or
end of the line (like <CODE>delete-char</CODE>).
If at the end of the line, behaves identically to
@@ -10735,64 +10744,64 @@ If at the end of the line, behaves identically to
This command is unbound by default.
<P>
<A NAME="IDX445"></A>
<A NAME="IDX447"></A>
<DT><CODE>complete-filename (M-/)</CODE>
<DD><A NAME="IDX446"></A>
<DD><A NAME="IDX448"></A>
Attempt filename completion on the text before point.
<P>
<A NAME="IDX447"></A>
<A NAME="IDX449"></A>
<DT><CODE>possible-filename-completions (C-x /)</CODE>
<DD><A NAME="IDX448"></A>
<DD><A NAME="IDX450"></A>
List the possible completions of the text before point,
treating it as a filename.
<P>
<A NAME="IDX449"></A>
<A NAME="IDX451"></A>
<DT><CODE>complete-username (M-~)</CODE>
<DD><A NAME="IDX450"></A>
<DD><A NAME="IDX452"></A>
Attempt completion on the text before point, treating
it as a username.
<P>
<A NAME="IDX451"></A>
<A NAME="IDX453"></A>
<DT><CODE>possible-username-completions (C-x ~)</CODE>
<DD><A NAME="IDX452"></A>
<DD><A NAME="IDX454"></A>
List the possible completions of the text before point,
treating it as a username.
<P>
<A NAME="IDX453"></A>
<A NAME="IDX455"></A>
<DT><CODE>complete-variable (M-$)</CODE>
<DD><A NAME="IDX454"></A>
<DD><A NAME="IDX456"></A>
Attempt completion on the text before point, treating
it as a shell variable.
<P>
<A NAME="IDX455"></A>
<A NAME="IDX457"></A>
<DT><CODE>possible-variable-completions (C-x $)</CODE>
<DD><A NAME="IDX456"></A>
<DD><A NAME="IDX458"></A>
List the possible completions of the text before point,
treating it as a shell variable.
<P>
<A NAME="IDX457"></A>
<A NAME="IDX459"></A>
<DT><CODE>complete-hostname (M-@)</CODE>
<DD><A NAME="IDX458"></A>
<DD><A NAME="IDX460"></A>
Attempt completion on the text before point, treating
it as a hostname.
<P>
<A NAME="IDX459"></A>
<A NAME="IDX461"></A>
<DT><CODE>possible-hostname-completions (C-x @)</CODE>
<DD><A NAME="IDX460"></A>
<DD><A NAME="IDX462"></A>
List the possible completions of the text before point,
treating it as a hostname.
<P>
<A NAME="IDX461"></A>
<A NAME="IDX463"></A>
<DT><CODE>complete-command (M-!)</CODE>
<DD><A NAME="IDX462"></A>
<DD><A NAME="IDX464"></A>
Attempt completion on the text before point, treating
it as a command name. Command completion attempts to
match the text against aliases, reserved words, shell
@@ -10800,32 +10809,32 @@ functions, shell builtins, and finally executable filenames,
in that order.
<P>
<A NAME="IDX463"></A>
<A NAME="IDX465"></A>
<DT><CODE>possible-command-completions (C-x !)</CODE>
<DD><A NAME="IDX464"></A>
<DD><A NAME="IDX466"></A>
List the possible completions of the text before point,
treating it as a command name.
<P>
<A NAME="IDX465"></A>
<A NAME="IDX467"></A>
<DT><CODE>dynamic-complete-history (M-<KBD>TAB</KBD>)</CODE>
<DD><A NAME="IDX466"></A>
<DD><A NAME="IDX468"></A>
Attempt completion on the text before point, comparing
the text against lines from the history list for possible
completion matches.
<P>
<A NAME="IDX467"></A>
<A NAME="IDX469"></A>
<DT><CODE>dabbrev-expand ()</CODE>
<DD><A NAME="IDX468"></A>
<DD><A NAME="IDX470"></A>
Attempt menu completion on the text before point, comparing
the text against lines from the history list for possible
completion matches.
<P>
<A NAME="IDX469"></A>
<A NAME="IDX471"></A>
<DT><CODE>complete-into-braces (M-{)</CODE>
<DD><A NAME="IDX470"></A>
<DD><A NAME="IDX472"></A>
Perform filename completion and insert the list of possible completions
enclosed within braces so the list is available to the shell
(see section <A HREF="bashref.html#SEC29">3.5.1 Brace Expansion</A>).
@@ -10852,22 +10861,22 @@ enclosed within braces so the list is available to the shell
<!--docid::SEC114::-->
<DL COMPACT>
<A NAME="IDX471"></A>
<A NAME="IDX473"></A>
<DT><CODE>start-kbd-macro (C-x ()</CODE>
<DD><A NAME="IDX472"></A>
<DD><A NAME="IDX474"></A>
Begin saving the characters typed into the current keyboard macro.
<P>
<A NAME="IDX473"></A>
<A NAME="IDX475"></A>
<DT><CODE>end-kbd-macro (C-x ))</CODE>
<DD><A NAME="IDX474"></A>
<DD><A NAME="IDX476"></A>
Stop saving the characters typed into the current keyboard macro
and save the definition.
<P>
<A NAME="IDX475"></A>
<A NAME="IDX477"></A>
<DT><CODE>call-last-kbd-macro (C-x e)</CODE>
<DD><A NAME="IDX476"></A>
<DD><A NAME="IDX478"></A>
Re-execute the last keyboard macro defined, by making the characters
in the macro appear as if typed at the keyboard.
<P>
@@ -10893,87 +10902,87 @@ in the macro appear as if typed at the keyboard.
<!--docid::SEC115::-->
<DL COMPACT>
<A NAME="IDX477"></A>
<A NAME="IDX479"></A>
<DT><CODE>re-read-init-file (C-x C-r)</CODE>
<DD><A NAME="IDX478"></A>
<DD><A NAME="IDX480"></A>
Read in the contents of the <VAR>inputrc</VAR> file, and incorporate
any bindings or variable assignments found there.
<P>
<A NAME="IDX479"></A>
<A NAME="IDX481"></A>
<DT><CODE>abort (C-g)</CODE>
<DD><A NAME="IDX480"></A>
<DD><A NAME="IDX482"></A>
Abort the current editing command and
ring the terminal's bell (subject to the setting of
<CODE>bell-style</CODE>).
<P>
<A NAME="IDX481"></A>
<A NAME="IDX483"></A>
<DT><CODE>do-uppercase-version (M-a, M-b, M-<VAR>x</VAR>, <small>...</small>)</CODE>
<DD><A NAME="IDX482"></A>
<DD><A NAME="IDX484"></A>
If the metafied character <VAR>x</VAR> is lowercase, run the command
that is bound to the corresponding uppercase character.
<P>
<A NAME="IDX483"></A>
<A NAME="IDX485"></A>
<DT><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE>
<DD><A NAME="IDX484"></A>
<DD><A NAME="IDX486"></A>
Metafy the next character typed. This is for keyboards
without a meta key. Typing <SAMP>`<KBD>ESC</KBD> f'</SAMP> is equivalent to typing
<KBD>M-f</KBD>.
<P>
<A NAME="IDX485"></A>
<A NAME="IDX487"></A>
<DT><CODE>undo (C-_ or C-x C-u)</CODE>
<DD><A NAME="IDX486"></A>
<DD><A NAME="IDX488"></A>
Incremental undo, separately remembered for each line.
<P>
<A NAME="IDX487"></A>
<A NAME="IDX489"></A>
<DT><CODE>revert-line (M-r)</CODE>
<DD><A NAME="IDX488"></A>
<DD><A NAME="IDX490"></A>
Undo all changes made to this line. This is like executing the <CODE>undo</CODE>
command enough times to get back to the beginning.
<P>
<A NAME="IDX489"></A>
<A NAME="IDX491"></A>
<DT><CODE>tilde-expand (M-&#38;)</CODE>
<DD><A NAME="IDX490"></A>
<DD><A NAME="IDX492"></A>
Perform tilde expansion on the current word.
<P>
<A NAME="IDX491"></A>
<A NAME="IDX493"></A>
<DT><CODE>set-mark (C-@)</CODE>
<DD><A NAME="IDX492"></A>
<DD><A NAME="IDX494"></A>
Set the mark to the point. If a
numeric argument is supplied, the mark is set to that position.
<P>
<A NAME="IDX493"></A>
<A NAME="IDX495"></A>
<DT><CODE>exchange-point-and-mark (C-x C-x)</CODE>
<DD><A NAME="IDX494"></A>
<DD><A NAME="IDX496"></A>
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.
<P>
<A NAME="IDX495"></A>
<A NAME="IDX497"></A>
<DT><CODE>character-search (C-])</CODE>
<DD><A NAME="IDX496"></A>
<DD><A NAME="IDX498"></A>
A character is read and point is moved to the next occurrence of that
character. A negative count searches for previous occurrences.
<P>
<A NAME="IDX497"></A>
<A NAME="IDX499"></A>
<DT><CODE>character-search-backward (M-C-])</CODE>
<DD><A NAME="IDX498"></A>
<DD><A NAME="IDX500"></A>
A character is read and point is moved to the previous occurrence
of that character. A negative count searches for subsequent
occurrences.
<P>
<A NAME="IDX499"></A>
<A NAME="IDX501"></A>
<DT><CODE>insert-comment (M-#)</CODE>
<DD><A NAME="IDX500"></A>
<DD><A NAME="IDX502"></A>
Without a numeric argument, the value of the <CODE>comment-begin</CODE>
variable is inserted at the beginning of the current line.
If a numeric argument is supplied, this command acts as a toggle: if
@@ -10988,115 +10997,115 @@ If a numeric argument causes the comment character to be removed, the line
will be executed by the shell.
<P>
<A NAME="IDX501"></A>
<A NAME="IDX503"></A>
<DT><CODE>dump-functions ()</CODE>
<DD><A NAME="IDX502"></A>
<DD><A NAME="IDX504"></A>
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 <VAR>inputrc</VAR> file. This command is unbound by default.
<P>
<A NAME="IDX503"></A>
<A NAME="IDX505"></A>
<DT><CODE>dump-variables ()</CODE>
<DD><A NAME="IDX504"></A>
<DD><A NAME="IDX506"></A>
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 <VAR>inputrc</VAR> file. This command is unbound by default.
<P>
<A NAME="IDX505"></A>
<A NAME="IDX507"></A>
<DT><CODE>dump-macros ()</CODE>
<DD><A NAME="IDX506"></A>
<DD><A NAME="IDX508"></A>
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 <VAR>inputrc</VAR> file. This command is unbound by default.
<P>
<A NAME="IDX507"></A>
<A NAME="IDX509"></A>
<DT><CODE>glob-complete-word (M-g)</CODE>
<DD><A NAME="IDX508"></A>
<DD><A NAME="IDX510"></A>
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.
<P>
<A NAME="IDX509"></A>
<A NAME="IDX511"></A>
<DT><CODE>glob-expand-word (C-x *)</CODE>
<DD><A NAME="IDX510"></A>
<DD><A NAME="IDX512"></A>
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>`*'</SAMP> is appended before
pathname expansion.
<P>
<A NAME="IDX511"></A>
<A NAME="IDX513"></A>
<DT><CODE>glob-list-expansions (C-x g)</CODE>
<DD><A NAME="IDX512"></A>
<DD><A NAME="IDX514"></A>
The list of expansions that would have been generated by
<CODE>glob-expand-word</CODE> is displayed, and the line is redrawn.
If a numeric argument is supplied, a <SAMP>`*'</SAMP> is appended before
pathname expansion.
<P>
<A NAME="IDX513"></A>
<A NAME="IDX515"></A>
<DT><CODE>display-shell-version (C-x C-v)</CODE>
<DD><A NAME="IDX514"></A>
<DD><A NAME="IDX516"></A>
Display version information about the current instance of Bash.
<P>
<A NAME="IDX515"></A>
<A NAME="IDX517"></A>
<DT><CODE>shell-expand-line (M-C-e)</CODE>
<DD><A NAME="IDX516"></A>
<DD><A NAME="IDX518"></A>
Expand the line as the shell does.
This performs alias and history expansion as well as all of the shell
word expansions (see section <A HREF="bashref.html#SEC28">3.5 Shell Expansions</A>).
<P>
<A NAME="IDX517"></A>
<A NAME="IDX519"></A>
<DT><CODE>history-expand-line (M-^)</CODE>
<DD><A NAME="IDX518"></A>
<DD><A NAME="IDX520"></A>
Perform history expansion on the current line.
<P>
<A NAME="IDX519"></A>
<A NAME="IDX521"></A>
<DT><CODE>magic-space ()</CODE>
<DD><A NAME="IDX520"></A>
<DD><A NAME="IDX522"></A>
Perform history expansion on the current line and insert a space
(see section <A HREF="bashref.html#SEC122">9.3 History Expansion</A>).
<P>
<A NAME="IDX521"></A>
<A NAME="IDX523"></A>
<DT><CODE>alias-expand-line ()</CODE>
<DD><A NAME="IDX522"></A>
<DD><A NAME="IDX524"></A>
Perform alias expansion on the current line (see section <A HREF="bashref.html#SEC84">6.6 Aliases</A>).
<P>
<A NAME="IDX523"></A>
<A NAME="IDX525"></A>
<DT><CODE>history-and-alias-expand-line ()</CODE>
<DD><A NAME="IDX524"></A>
<DD><A NAME="IDX526"></A>
Perform history and alias expansion on the current line.
<P>
<A NAME="IDX525"></A>
<A NAME="IDX527"></A>
<DT><CODE>insert-last-argument (M-. or M-_)</CODE>
<DD><A NAME="IDX526"></A>
<DD><A NAME="IDX528"></A>
A synonym for <CODE>yank-last-arg</CODE>.
<P>
<A NAME="IDX527"></A>
<A NAME="IDX529"></A>
<DT><CODE>operate-and-get-next (C-o)</CODE>
<DD><A NAME="IDX528"></A>
<DD><A NAME="IDX530"></A>
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.
<P>
<A NAME="IDX529"></A>
<A NAME="IDX531"></A>
<DT><CODE>edit-and-execute-command (C-xC-e)</CODE>
<DD><A NAME="IDX530"></A>
<DD><A NAME="IDX532"></A>
Invoke an editor on the current command line, and execute the result as shell
commands.
Bash attempts to invoke
@@ -11317,7 +11326,7 @@ facilities.
<DL COMPACT>
<DT><CODE>compgen</CODE>
<DD><A NAME="IDX531"></A>
<DD><A NAME="IDX533"></A>
<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>compgen [<VAR>option</VAR>] [<VAR>word</VAR>]</CODE>
</pre></td></tr></table><P>
@@ -11343,11 +11352,11 @@ matches were generated.
</P><P>
<DT><CODE>complete</CODE>
<DD><A NAME="IDX532"></A>
<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>complete [-abcdefgjksuv] [-o <VAR>comp-option</VAR>] [-E] [-A <VAR>action</VAR>] [-G <VAR>globpat</VAR>] [-W <VAR>wordlist</VAR>]
<DD><A NAME="IDX534"></A>
<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>complete [-abcdefgjksuv] [-o <VAR>comp-option</VAR>] [-DE] [-A <VAR>action</VAR>] [-G <VAR>globpat</VAR>] [-W <VAR>wordlist</VAR>]
[-F <VAR>function</VAR>] [-C <VAR>command</VAR>] [-X <VAR>filterpat</VAR>]
[-P <VAR>prefix</VAR>] [-S <VAR>suffix</VAR>] <VAR>name</VAR> [<VAR>name</VAR> <small>...</small>]</CODE>
<CODE>complete -pr [-E] [<VAR>name</VAR> <small>...</small>]</CODE>
<CODE>complete -pr [-DE] [<VAR>name</VAR> <small>...</small>]</CODE>
</pre></td></tr></table><P>
Specify how arguments to each <VAR>name</VAR> should be completed.
@@ -11357,6 +11366,9 @@ reused as input.
The <SAMP>`-r'</SAMP> option removes a completion specification for
each <VAR>name</VAR>, or, if no <VAR>name</VAR>s are supplied, all
completion specifications.
The <SAMP>`-D'</SAMP> option indicates that the remaining options and actions should
apply to the "default" command completion; that is, completion attempted
on a command for which no completion has previously been defined.
The <SAMP>`-E'</SAMP> option indicates that the remaining options and actions should
apply to "empty" command completion; that is, completion attempted on a
blank line.
@@ -11577,8 +11589,8 @@ an error occurs adding a completion specification.
</P><P>
<DT><CODE>compopt</CODE>
<DD><A NAME="IDX533"></A>
<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>compopt</CODE> [-o <VAR>option</VAR>] [+o <VAR>option</VAR>] [<VAR>name</VAR>]
<DD><A NAME="IDX535"></A>
<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>compopt</CODE> [-o <VAR>option</VAR>] [-DE] [+o <VAR>option</VAR>] [<VAR>name</VAR>]
</pre></td></tr></table>Modify completion options for each <VAR>name</VAR> according to the
<VAR>option</VAR>s, or for the currently-execution completion if no <VAR>name</VAR>s
are supplied.
@@ -11586,6 +11598,12 @@ If no <VAR>option</VAR>s are given, display the completion options for each
<VAR>name</VAR> or the current completion.
The possible values of <VAR>option</VAR> are those valid for the <CODE>complete</CODE>
builtin described above.
The <SAMP>`-D'</SAMP> option indicates that the remaining options should
apply to the "default" command completion; that is, completion attempted
on a command for which no completion has previously been defined.
The <SAMP>`-E'</SAMP> option indicates that the remaining options should
apply to "empty" command completion; that is, completion attempted on a
blank line.
<P>
The return value is true unless an invalid option is supplied, an attempt
@@ -11596,7 +11614,7 @@ specification exists, or an output error occurs.
</DL>
<P>
<A NAME="IDX534"></A>
<A NAME="IDX536"></A>
</P><P>
<A NAME="Using History Interactively"></A>
@@ -11741,7 +11759,7 @@ history list and history file.
<DL COMPACT>
<DT><CODE>fc</CODE>
<DD><A NAME="IDX535"></A>
<DD><A NAME="IDX537"></A>
<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>fc [-e <VAR>ename</VAR>] [-lnr] [<VAR>first</VAR>] [<VAR>last</VAR>]</CODE>
<CODE>fc -s [<VAR>pat</VAR>=<VAR>rep</VAR>] [<VAR>command</VAR>]</CODE>
</pre></td></tr></table><P>
@@ -11775,7 +11793,7 @@ and typing <SAMP>`r'</SAMP> re-executes the last command (see section <A HREF="b
</P><P>
<DT><CODE>history</CODE>
<DD><A NAME="IDX536"></A>
<DD><A NAME="IDX538"></A>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>history [<VAR>n</VAR>]
history -c
history -d <VAR>offset</VAR>
@@ -11948,7 +11966,7 @@ writing the history file.
An event designator is a reference to a command line entry in the
history list.
<A NAME="IDX537"></A>
<A NAME="IDX539"></A>
</P><P>
<DL COMPACT>
@@ -14210,9 +14228,9 @@ to permit their use in free software.
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX92"><CODE>caller</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX71"><CODE>cd</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX93"><CODE>command</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX531"><CODE>compgen</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC118">8.7 Programmable Completion Builtins</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX532"><CODE>complete</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC118">8.7 Programmable Completion Builtins</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX533"><CODE>compopt</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC118">8.7 Programmable Completion Builtins</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX533"><CODE>compgen</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC118">8.7 Programmable Completion Builtins</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX534"><CODE>complete</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC118">8.7 Programmable Completion Builtins</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX535"><CODE>compopt</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC118">8.7 Programmable Completion Builtins</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX72"><CODE>continue</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="bt_D"></A>D</TH><TD></TD><TD></TD></TR>
@@ -14229,7 +14247,7 @@ to permit their use in free software.
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX76"><CODE>export</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="bt_F"></A>F</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX535"><CODE>fc</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC121">9.2 Bash History Builtins</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX537"><CODE>fc</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC121">9.2 Bash History Builtins</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX290"><CODE>fg</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC93">7.2 Job Control Builtins</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="bt_G"></A>G</TH><TD></TD><TD></TD></TR>
@@ -14238,7 +14256,7 @@ to permit their use in free software.
<TR><TH><A NAME="bt_H"></A>H</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX78"><CODE>hash</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX97"><CODE>help</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX536"><CODE>history</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC121">9.2 Bash History Builtins</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX538"><CODE>history</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC121">9.2 Bash History Builtins</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="bt_J"></A>J</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX291"><CODE>jobs</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC93">7.2 Job Control Builtins</A></TD></TR>
@@ -14937,12 +14955,12 @@ to permit their use in free software.
<TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_A"></A>A</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX479"><CODE>abort (C-g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX480"><CODE>abort (C-g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX481"><CODE>abort (C-g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX482"><CODE>abort (C-g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX349"><CODE>accept-line (Newline or Return)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX350"><CODE>accept-line (Newline or Return)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX521"><CODE>alias-expand-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX522"><CODE>alias-expand-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX523"><CODE>alias-expand-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX524"><CODE>alias-expand-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_B"></A>B</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX335"><CODE>backward-char (C-b)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
@@ -14963,30 +14981,30 @@ to permit their use in free software.
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX330"><CODE>beginning-of-line (C-a)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_C"></A>C</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX475"><CODE>call-last-kbd-macro (C-x e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX476"><CODE>call-last-kbd-macro (C-x e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX477"><CODE>call-last-kbd-macro (C-x e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX478"><CODE>call-last-kbd-macro (C-x e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX393"><CODE>capitalize-word (M-c)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX394"><CODE>capitalize-word (M-c)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX495"><CODE>character-search (C-])</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX496"><CODE>character-search (C-])</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX497"><CODE>character-search-backward (M-C-])</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX498"><CODE>character-search-backward (M-C-])</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX497"><CODE>character-search (C-])</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX498"><CODE>character-search (C-])</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX499"><CODE>character-search-backward (M-C-])</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX500"><CODE>character-search-backward (M-C-])</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX345"><CODE>clear-screen (C-l)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX346"><CODE>clear-screen (C-l)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX435"><CODE>complete (<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX436"><CODE>complete (<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX461"><CODE>complete-command (M-!)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX462"><CODE>complete-command (M-!)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX445"><CODE>complete-filename (M-/)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX446"><CODE>complete-filename (M-/)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX457"><CODE>complete-hostname (M-@)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX458"><CODE>complete-hostname (M-@)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX469"><CODE>complete-into-braces (M-{)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX470"><CODE>complete-into-braces (M-{)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX449"><CODE>complete-username (M-~)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX450"><CODE>complete-username (M-~)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX453"><CODE>complete-variable (M-$)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX454"><CODE>complete-variable (M-$)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX463"><CODE>complete-command (M-!)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX464"><CODE>complete-command (M-!)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX447"><CODE>complete-filename (M-/)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX448"><CODE>complete-filename (M-/)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX459"><CODE>complete-hostname (M-@)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX460"><CODE>complete-hostname (M-@)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX471"><CODE>complete-into-braces (M-{)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX472"><CODE>complete-into-braces (M-{)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX451"><CODE>complete-username (M-~)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX452"><CODE>complete-username (M-~)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX455"><CODE>complete-variable (M-$)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX456"><CODE>complete-variable (M-$)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX423"><CODE>copy-backward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX424"><CODE>copy-backward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX425"><CODE>copy-forward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
@@ -14995,42 +15013,42 @@ to permit their use in free software.
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX422"><CODE>copy-region-as-kill ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_D"></A>D</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX467"><CODE>dabbrev-expand ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX468"><CODE>dabbrev-expand ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX469"><CODE>dabbrev-expand ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX470"><CODE>dabbrev-expand ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX375"><CODE>delete-char (C-d)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX376"><CODE>delete-char (C-d)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX443"><CODE>delete-char-or-list ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX444"><CODE>delete-char-or-list ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX445"><CODE>delete-char-or-list ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX446"><CODE>delete-char-or-list ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX417"><CODE>delete-horizontal-space ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX418"><CODE>delete-horizontal-space ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX431"><CODE>digit-argument (<KBD>M-0</KBD>, <KBD>M-1</KBD>, &#60;small&#62;...&#60;/small&#62; <KBD>M--</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC112">8.4.5 Specifying Numeric Arguments</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX432"><CODE>digit-argument (<KBD>M-0</KBD>, <KBD>M-1</KBD>, &#60;small&#62;...&#60;/small&#62; <KBD>M--</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC112">8.4.5 Specifying Numeric Arguments</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX513"><CODE>display-shell-version (C-x C-v)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX514"><CODE>display-shell-version (C-x C-v)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX481"><CODE>do-uppercase-version (M-a, M-b, M-<VAR>x</VAR>, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX482"><CODE>do-uppercase-version (M-a, M-b, M-<VAR>x</VAR>, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX515"><CODE>display-shell-version (C-x C-v)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX516"><CODE>display-shell-version (C-x C-v)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX483"><CODE>do-uppercase-version (M-a, M-b, M-<VAR>x</VAR>, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX484"><CODE>do-uppercase-version (M-a, M-b, M-<VAR>x</VAR>, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX391"><CODE>downcase-word (M-l)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX392"><CODE>downcase-word (M-l)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX501"><CODE>dump-functions ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX502"><CODE>dump-functions ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX505"><CODE>dump-macros ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX506"><CODE>dump-macros ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX503"><CODE>dump-variables ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX504"><CODE>dump-variables ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX465"><CODE>dynamic-complete-history (M-<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX466"><CODE>dynamic-complete-history (M-<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX503"><CODE>dump-functions ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX504"><CODE>dump-functions ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX507"><CODE>dump-macros ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX508"><CODE>dump-macros ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX505"><CODE>dump-variables ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX506"><CODE>dump-variables ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX467"><CODE>dynamic-complete-history (M-<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX468"><CODE>dynamic-complete-history (M-<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_E"></A>E</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX529"><CODE>edit-and-execute-command (C-xC-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX530"><CODE>edit-and-execute-command (C-xC-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX473"><CODE>end-kbd-macro (C-x ))</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX474"><CODE>end-kbd-macro (C-x ))</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX531"><CODE>edit-and-execute-command (C-xC-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX532"><CODE>edit-and-execute-command (C-xC-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX475"><CODE>end-kbd-macro (C-x ))</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX476"><CODE>end-kbd-macro (C-x ))</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX357"><CODE>end-of-history (M-&#38;#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX358"><CODE>end-of-history (M-&#38;#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX331"><CODE>end-of-line (C-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX332"><CODE>end-of-line (C-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX493"><CODE>exchange-point-and-mark (C-x C-x)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX494"><CODE>exchange-point-and-mark (C-x C-x)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX495"><CODE>exchange-point-and-mark (C-x C-x)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX496"><CODE>exchange-point-and-mark (C-x C-x)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_F"></A>F</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX379"><CODE>forward-backward-delete-char ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
@@ -15043,30 +15061,30 @@ to permit their use in free software.
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX338"><CODE>forward-word (M-f)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_G"></A>G</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX507"><CODE>glob-complete-word (M-g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX508"><CODE>glob-complete-word (M-g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX509"><CODE>glob-expand-word (C-x *)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX510"><CODE>glob-expand-word (C-x *)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX511"><CODE>glob-list-expansions (C-x g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX512"><CODE>glob-list-expansions (C-x g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX509"><CODE>glob-complete-word (M-g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX510"><CODE>glob-complete-word (M-g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX511"><CODE>glob-expand-word (C-x *)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX512"><CODE>glob-expand-word (C-x *)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX513"><CODE>glob-list-expansions (C-x g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX514"><CODE>glob-list-expansions (C-x g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_H"></A>H</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX523"><CODE>history-and-alias-expand-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX524"><CODE>history-and-alias-expand-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX517"><CODE>history-expand-line (M-^)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX518"><CODE>history-expand-line (M-^)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX525"><CODE>history-and-alias-expand-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX526"><CODE>history-and-alias-expand-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX519"><CODE>history-expand-line (M-^)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX520"><CODE>history-expand-line (M-^)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX369"><CODE>history-search-backward ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX370"><CODE>history-search-backward ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX367"><CODE>history-search-forward ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX368"><CODE>history-search-forward ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_I"></A>I</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX499"><CODE>insert-comment (M-#)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX500"><CODE>insert-comment (M-#)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX501"><CODE>insert-comment (M-#)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX502"><CODE>insert-comment (M-#)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX439"><CODE>insert-completions (M-*)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX440"><CODE>insert-completions (M-*)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX525"><CODE>insert-last-argument (M-. or M-_)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX526"><CODE>insert-last-argument (M-. or M-_)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX527"><CODE>insert-last-argument (M-. or M-_)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX528"><CODE>insert-last-argument (M-. or M-_)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_K"></A>K</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX397"><CODE>kill-line (C-k)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
@@ -15079,10 +15097,12 @@ to permit their use in free software.
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX406"><CODE>kill-word (M-d)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_M"></A>M</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX519"><CODE>magic-space ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX520"><CODE>magic-space ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX521"><CODE>magic-space ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX522"><CODE>magic-space ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX441"><CODE>menu-complete ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX442"><CODE>menu-complete ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX443"><CODE>menu-complete-backward ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX444"><CODE>menu-complete-backward ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_N"></A>N</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX353"><CODE>next-history (C-n)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
@@ -15093,26 +15113,26 @@ to permit their use in free software.
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX364"><CODE>non-incremental-reverse-search-history (M-p)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_O"></A>O</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX527"><CODE>operate-and-get-next (C-o)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX528"><CODE>operate-and-get-next (C-o)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX529"><CODE>operate-and-get-next (C-o)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX530"><CODE>operate-and-get-next (C-o)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX395"><CODE>overwrite-mode ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX396"><CODE>overwrite-mode ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_P"></A>P</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX463"><CODE>possible-command-completions (C-x !)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX464"><CODE>possible-command-completions (C-x !)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX465"><CODE>possible-command-completions (C-x !)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX466"><CODE>possible-command-completions (C-x !)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX437"><CODE>possible-completions (M-?)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX438"><CODE>possible-completions (M-?)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX447"><CODE>possible-filename-completions (C-x /)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX448"><CODE>possible-filename-completions (C-x /)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX459"><CODE>possible-hostname-completions (C-x @)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX460"><CODE>possible-hostname-completions (C-x @)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX451"><CODE>possible-username-completions (C-x ~)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX452"><CODE>possible-username-completions (C-x ~)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX455"><CODE>possible-variable-completions (C-x $)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX456"><CODE>possible-variable-completions (C-x $)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX483"><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX484"><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX449"><CODE>possible-filename-completions (C-x /)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX450"><CODE>possible-filename-completions (C-x /)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX461"><CODE>possible-hostname-completions (C-x @)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX462"><CODE>possible-hostname-completions (C-x @)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX453"><CODE>possible-username-completions (C-x ~)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX454"><CODE>possible-username-completions (C-x ~)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX457"><CODE>possible-variable-completions (C-x $)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX458"><CODE>possible-variable-completions (C-x $)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX485"><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX486"><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX351"><CODE>previous-history (C-p)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX352"><CODE>previous-history (C-p)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
@@ -15121,42 +15141,42 @@ to permit their use in free software.
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX382"><CODE>quoted-insert (C-q or C-v)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_R"></A>R</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX477"><CODE>re-read-init-file (C-x C-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX478"><CODE>re-read-init-file (C-x C-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX479"><CODE>re-read-init-file (C-x C-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX480"><CODE>re-read-init-file (C-x C-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX347"><CODE>redraw-current-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX348"><CODE>redraw-current-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX359"><CODE>reverse-search-history (C-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX360"><CODE>reverse-search-history (C-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX487"><CODE>revert-line (M-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX488"><CODE>revert-line (M-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX489"><CODE>revert-line (M-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX490"><CODE>revert-line (M-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_S"></A>S</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX383"><CODE>self-insert (a, b, A, 1, !, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX384"><CODE>self-insert (a, b, A, 1, !, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX491"><CODE>set-mark (C-@)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX492"><CODE>set-mark (C-@)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX493"><CODE>set-mark (C-@)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX494"><CODE>set-mark (C-@)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX343"><CODE>shell-backward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX344"><CODE>shell-backward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX515"><CODE>shell-expand-line (M-C-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX516"><CODE>shell-expand-line (M-C-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX517"><CODE>shell-expand-line (M-C-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX518"><CODE>shell-expand-line (M-C-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX341"><CODE>shell-forward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX342"><CODE>shell-forward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX409"><CODE>shell-kill-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX410"><CODE>shell-kill-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX471"><CODE>start-kbd-macro (C-x ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX472"><CODE>start-kbd-macro (C-x ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX473"><CODE>start-kbd-macro (C-x ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX474"><CODE>start-kbd-macro (C-x ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_T"></A>T</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX489"><CODE>tilde-expand (M-&#38;#38;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX490"><CODE>tilde-expand (M-&#38;#38;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX491"><CODE>tilde-expand (M-&#38;#38;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX492"><CODE>tilde-expand (M-&#38;#38;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX385"><CODE>transpose-chars (C-t)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX386"><CODE>transpose-chars (C-t)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX387"><CODE>transpose-words (M-t)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX388"><CODE>transpose-words (M-t)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_U"></A>U</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX485"><CODE>undo (C-_ or C-x C-u)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX486"><CODE>undo (C-_ or C-x C-u)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX487"><CODE>undo (C-_ or C-x C-u)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX488"><CODE>undo (C-_ or C-x C-u)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX433"><CODE>universal-argument ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC112">8.4.5 Specifying Numeric Arguments</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX434"><CODE>universal-argument ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC112">8.4.5 Specifying Numeric Arguments</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX415"><CODE>unix-filename-rubout ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
@@ -15351,10 +15371,10 @@ to permit their use in free software.
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="cp_H"></A>H</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC121">history builtins</A></TD><TD valign=top><A HREF="bashref.html#SEC121">9.2 Bash History Builtins</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX537">history events</A></TD><TD valign=top><A HREF="bashref.html#SEC123">9.3.1 Event Designators</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX539">history events</A></TD><TD valign=top><A HREF="bashref.html#SEC123">9.3.1 Event Designators</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC122">history expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC122">9.3 History Expansion</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC120">history list</A></TD><TD valign=top><A HREF="bashref.html#SEC120">9.1 Bash History Facilities</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX534">History, how to use</A></TD><TD valign=top><A HREF="bashref.html#SEC118">8.7 Programmable Completion Builtins</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX536">History, how to use</A></TD><TD valign=top><A HREF="bashref.html#SEC118">8.7 Programmable Completion Builtins</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="cp_I"></A>I</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX11">identifier</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
@@ -15880,7 +15900,7 @@ to permit their use in free software.
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1>About this document</H1>
This document was generated by <I>Chet Ramey</I> on <I>June, 17 2009</I>
This document was generated by <I>Chet Ramey</I> on <I>August, 3 2009</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
<P></P>
@@ -16042,7 +16062,7 @@ the following structure:
<BR>
<FONT SIZE="-1">
This document was generated
by <I>Chet Ramey</I> on <I>June, 17 2009</I>
by <I>Chet Ramey</I> on <I>August, 3 2009</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
+100 -83
View File
@@ -4357,10 +4357,10 @@ Variables::).
list of possible hostname completions may be changed while the
shell is running; the next time hostname completion is attempted
after the value is changed, Bash adds the contents of the new file
to the existing list. If `HOSTFILE' is set, but has no value,
Bash attempts to read `/etc/hosts' to obtain the list of possible
hostname completions. When `HOSTFILE' is unset, the hostname list
is cleared.
to the existing list. If `HOSTFILE' is set, but has no value, or
does not name a readable file, Bash attempts to read `/etc/hosts'
to obtain the list of possible hostname completions. When
`HOSTFILE' is unset, the hostname list is cleared.
`HOSTNAME'
The name of the current host.
@@ -7190,6 +7190,11 @@ File: bashref.info, Node: Commands For Completion, Next: Keyboard Macros, Pre
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,
@@ -7562,19 +7567,23 @@ completion facilities.
no matches were generated.
`complete'
`complete [-abcdefgjksuv] [-o COMP-OPTION] [-E] [-A ACTION] [-G GLOBPAT] [-W WORDLIST]
`complete [-abcdefgjksuv] [-o COMP-OPTION] [-DE] [-A ACTION] [-G GLOBPAT] [-W WORDLIST]
[-F FUNCTION] [-C COMMAND] [-X FILTERPAT]
[-P PREFIX] [-S SUFFIX] NAME [NAME ...]'
`complete -pr [-E] [NAME ...]'
`complete -pr [-DE] [NAME ...]'
Specify how arguments to each NAME should be completed. If the
`-p' option is supplied, or if no options are supplied, existing
completion specifications are printed in a way that allows them to
be reused as input. The `-r' option removes a completion
specification for each NAME, or, if no NAMEs are supplied, all
completion specifications. The `-E' option indicates that the
remaining options and actions should apply to "empty" command
completion; that is, completion attempted on a blank line.
completion specifications. The `-D' option indicates that the
remaining options and actions should apply to the "default"
command completion; that is, completion attempted on a command for
which no completion has previously been defined. The `-E' option
indicates that the remaining options and actions should apply to
"empty" command completion; that is, completion attempted on a
blank line.
The process of applying these completion specifications when word
completion is attempted is described above (*note Programmable
@@ -7747,12 +7756,18 @@ completion facilities.
adding a completion specification.
`compopt'
`compopt' [-o OPTION] [+o OPTION] [NAME]
`compopt' [-o OPTION] [-DE] [+o OPTION] [NAME]
Modify completion options for each NAME according to the OPTIONs,
or for the currently-execution completion if no NAMEs are supplied.
If no OPTIONs are given, display the completion options for each
NAME or the current completion. The possible values of OPTION are
those valid for the `complete' builtin described above.
those valid for the `complete' builtin described above. The `-D'
option indicates that the remaining options should apply to the
"default" command completion; that is, completion attempted on a
command for which no completion has previously been defined. The
`-E' option indicates that the remaining options should apply to
"empty" command completion; that is, completion attempted on a
blank line.
The return value is true unless an invalid option is supplied, an
attempt is made to modify the options for a NAME for which no
@@ -9526,7 +9541,7 @@ D.1 Index of Shell Builtin Commands
* complete: Programmable Completion Builtins.
(line 28)
* compopt: Programmable Completion Builtins.
(line 213)
(line 217)
* continue: Bourne Shell Builtins.
(line 55)
* declare: Bash Builtins. (line 142)
@@ -9847,7 +9862,7 @@ D.4 Function Index
* copy-region-as-kill (): Commands For Killing. (line 54)
* delete-char (C-d): Commands For Text. (line 6)
* delete-char-or-list (): Commands For Completion.
(line 34)
(line 39)
* delete-horizontal-space (): Commands For Killing. (line 46)
* digit-argument (M-0, M-1, ... M--): Numeric Arguments. (line 6)
* do-uppercase-version (M-a, M-b, M-X, ...): Miscellaneous Commands.
@@ -9880,6 +9895,8 @@ D.4 Function Index
* kill-word (M-d): Commands For Killing. (line 19)
* menu-complete (): Commands For Completion.
(line 22)
* menu-complete-backward (): Commands For Completion.
(line 34)
* next-history (C-n): Commands For History. (line 17)
* non-incremental-forward-search-history (M-n): Commands For History.
(line 41)
@@ -10000,7 +10017,7 @@ D.5 Concept Index
* history list: Bash History Facilities.
(line 6)
* History, how to use: Programmable Completion Builtins.
(line 225)
(line 235)
* identifier: Definitions. (line 51)
* initialization file, readline: Readline Init File. (line 6)
* installation: Basic Installation. (line 6)
@@ -10135,74 +10152,74 @@ Node: Special Builtins165022
Node: Shell Variables166001
Node: Bourne Shell Variables166441
Node: Bash Variables168422
Node: Bash Features190761
Node: Invoking Bash191644
Node: Bash Startup Files197453
Node: Interactive Shells202422
Node: What is an Interactive Shell?202832
Node: Is this Shell Interactive?203481
Node: Interactive Shell Behavior204296
Node: Bash Conditional Expressions207576
Node: Shell Arithmetic211101
Node: Aliases213847
Node: Arrays216419
Node: The Directory Stack220377
Node: Directory Stack Builtins221091
Node: Printing a Prompt223983
Node: The Restricted Shell226735
Node: Bash POSIX Mode228567
Node: Job Control236420
Node: Job Control Basics236880
Node: Job Control Builtins241597
Node: Job Control Variables245961
Node: Command Line Editing247119
Node: Introduction and Notation248686
Node: Readline Interaction250308
Node: Readline Bare Essentials251499
Node: Readline Movement Commands253288
Node: Readline Killing Commands254253
Node: Readline Arguments256173
Node: Searching257217
Node: Readline Init File259403
Node: Readline Init File Syntax260550
Node: Conditional Init Constructs273784
Node: Sample Init File276317
Node: Bindable Readline Commands279434
Node: Commands For Moving280641
Node: Commands For History281785
Node: Commands For Text284940
Node: Commands For Killing287613
Node: Numeric Arguments290064
Node: Commands For Completion291203
Node: Keyboard Macros294970
Node: Miscellaneous Commands295541
Node: Readline vi Mode300852
Node: Programmable Completion301766
Node: Programmable Completion Builtins307599
Node: Using History Interactively316025
Node: Bash History Facilities316709
Node: Bash History Builtins319623
Node: History Interaction323480
Node: Event Designators326185
Node: Word Designators327200
Node: Modifiers328839
Node: Installing Bash330243
Node: Basic Installation331380
Node: Compilers and Options334072
Node: Compiling For Multiple Architectures334813
Node: Installation Names336477
Node: Specifying the System Type337295
Node: Sharing Defaults338011
Node: Operation Controls338684
Node: Optional Features339642
Node: Reporting Bugs349044
Node: Major Differences From The Bourne Shell350245
Node: GNU Free Documentation License366932
Node: Indexes392128
Node: Builtin Index392582
Node: Reserved Word Index399409
Node: Variable Index401857
Node: Function Index413663
Node: Concept Index420395
Node: Bash Features190795
Node: Invoking Bash191678
Node: Bash Startup Files197487
Node: Interactive Shells202456
Node: What is an Interactive Shell?202866
Node: Is this Shell Interactive?203515
Node: Interactive Shell Behavior204330
Node: Bash Conditional Expressions207610
Node: Shell Arithmetic211135
Node: Aliases213881
Node: Arrays216453
Node: The Directory Stack220411
Node: Directory Stack Builtins221125
Node: Printing a Prompt224017
Node: The Restricted Shell226769
Node: Bash POSIX Mode228601
Node: Job Control236454
Node: Job Control Basics236914
Node: Job Control Builtins241631
Node: Job Control Variables245995
Node: Command Line Editing247153
Node: Introduction and Notation248720
Node: Readline Interaction250342
Node: Readline Bare Essentials251533
Node: Readline Movement Commands253322
Node: Readline Killing Commands254287
Node: Readline Arguments256207
Node: Searching257251
Node: Readline Init File259437
Node: Readline Init File Syntax260584
Node: Conditional Init Constructs273818
Node: Sample Init File276351
Node: Bindable Readline Commands279468
Node: Commands For Moving280675
Node: Commands For History281819
Node: Commands For Text284974
Node: Commands For Killing287647
Node: Numeric Arguments290098
Node: Commands For Completion291237
Node: Keyboard Macros295197
Node: Miscellaneous Commands295768
Node: Readline vi Mode301079
Node: Programmable Completion301993
Node: Programmable Completion Builtins307826
Node: Using History Interactively316867
Node: Bash History Facilities317551
Node: Bash History Builtins320465
Node: History Interaction324322
Node: Event Designators327027
Node: Word Designators328042
Node: Modifiers329681
Node: Installing Bash331085
Node: Basic Installation332222
Node: Compilers and Options334914
Node: Compiling For Multiple Architectures335655
Node: Installation Names337319
Node: Specifying the System Type338137
Node: Sharing Defaults338853
Node: Operation Controls339526
Node: Optional Features340484
Node: Reporting Bugs349886
Node: Major Differences From The Bourne Shell351087
Node: GNU Free Documentation License367774
Node: Indexes392970
Node: Builtin Index393424
Node: Reserved Word Index400251
Node: Variable Index402699
Node: Function Index414505
Node: Concept Index421376

End Tag Table
+23 -10
View File
@@ -1,4 +1,4 @@
This is TeX, Version 3.141592 (Web2C 7.5.4) (format=tex 2008.12.11) 17 JUN 2009 08:51
This is TeX, Version 3.141592 (Web2C 7.5.4) (format=tex 2008.12.11) 3 AUG 2009 10:10
**/Users/chet/src/bash/src/doc/bashref.texi
(/Users/chet/src/bash/src/doc/bashref.texi (./texinfo.tex
Loading texinfo [version 2009-01-18.17]:
@@ -237,7 +237,7 @@ Underfull \hbox (badness 2573) in paragraph at lines 4390--4394
[56] [57] [58] Chapter 5 [59] [60] [61] [62] [63] [64] [65] [66] [67] [68]
Chapter 6 [69] [70]
Overfull \hbox (51.96864pt too wide) in paragraph at lines 5233--5233
Overfull \hbox (51.96864pt too wide) in paragraph at lines 5234--5234
[]@texttt bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@t
exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
@@ -250,7 +250,7 @@ exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
.etc.
Overfull \hbox (76.23077pt too wide) in paragraph at lines 5234--5234
Overfull \hbox (76.23077pt too wide) in paragraph at lines 5235--5235
[]@texttt bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@texttt
] [-O @textttsl shopt_option@texttt ] -c @textttsl string @texttt [@textttsl ar
-
@@ -264,7 +264,7 @@ Overfull \hbox (76.23077pt too wide) in paragraph at lines 5234--5234
.etc.
Overfull \hbox (34.72258pt too wide) in paragraph at lines 5235--5235
Overfull \hbox (34.72258pt too wide) in paragraph at lines 5236--5236
[]@texttt bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@text
tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
@@ -277,7 +277,7 @@ tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
.etc.
[71] [72]
Underfull \hbox (badness 2245) in paragraph at lines 5409--5411
Underfull \hbox (badness 2245) in paragraph at lines 5410--5412
[]@textrm When a lo-gin shell ex-its, Bash reads and ex-e-cutes com-mands from
the file
@@ -290,7 +290,7 @@ the file
.etc.
[73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85]
Underfull \hbox (badness 2521) in paragraph at lines 6547--6550
Underfull \hbox (badness 2521) in paragraph at lines 6548--6551
@textrm `@texttt --enable-strict-posix-default[]@textrm '[] to @texttt configur
e[] @textrm when build-ing (see Sec-tion 10.8
@@ -331,8 +331,21 @@ gnored[]
.etc.
[101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112]
[113] [114]
Underfull \hbox (badness 2753) in paragraph at lines 1827--1830
[113]
Overfull \hbox (12.05716pt too wide) in paragraph at lines 1726--1726
[]@texttt complete [-abcdefgjksuv] [-o @textttsl comp-option@texttt ] [-DE] [-
A @textttsl ac-tion@texttt ] [-
@hbox(7.60416+2.43333)x433.62
.@glue(@leftskip) 86.72375
.@hbox(0.0+0.0)x0.0
.@texttt c
.@texttt o
.@texttt m
.etc.
[114]
Underfull \hbox (badness 2753) in paragraph at lines 1835--1838
@texttt hostname[]@textrm Hostnames, as taken from the file spec-i-fied by
@hbox(7.60416+2.12917)x433.62, glue set 3.02202
@@ -346,7 +359,7 @@ Underfull \hbox (badness 2753) in paragraph at lines 1827--1830
[115] [116]) (/Users/chet/src/bash/src/lib/readline/doc/hsuser.texi Chapter 9
[117] [118] [119] [120] [121] [122]) Chapter 10 [123] [124] [125] [126]
[127]
Underfull \hbox (badness 2772) in paragraph at lines 7148--7152
Underfull \hbox (badness 2772) in paragraph at lines 7149--7153
[]@textrm Enable sup-port for large files (@texttt http://www.sas.com/standard
s/large_
@@ -372,4 +385,4 @@ Here is how much of TeX's memory you used:
51 hyphenation exceptions out of 8191
16i,6n,14p,315b,699s stack positions out of 5000i,500n,6000p,200000b,5000s
Output written on bashref.dvi (162 pages, 653572 bytes).
Output written on bashref.dvi (162 pages, 654776 bytes).
BIN
View File
Binary file not shown.
+786 -769
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -63,7 +63,7 @@
\entry{HOSTFILE}{66}{\code {HOSTFILE}}
\entry{HOSTNAME}{66}{\code {HOSTNAME}}
\entry{HOSTTYPE}{66}{\code {HOSTTYPE}}
\entry{IGNOREEOF}{66}{\code {IGNOREEOF}}
\entry{IGNOREEOF}{67}{\code {IGNOREEOF}}
\entry{INPUTRC}{67}{\code {INPUTRC}}
\entry{LANG}{67}{\code {LANG}}
\entry{LC_ALL}{67}{\code {LC_ALL}}
@@ -78,7 +78,7 @@
\entry{OLDPWD}{67}{\code {OLDPWD}}
\entry{OPTERR}{67}{\code {OPTERR}}
\entry{OSTYPE}{67}{\code {OSTYPE}}
\entry{PIPESTATUS}{67}{\code {PIPESTATUS}}
\entry{PIPESTATUS}{68}{\code {PIPESTATUS}}
\entry{POSIXLY_CORRECT}{68}{\code {POSIXLY_CORRECT}}
\entry{PPID}{68}{\code {PPID}}
\entry{PROMPT_COMMAND}{68}{\code {PROMPT_COMMAND}}
+2 -2
View File
@@ -85,7 +85,7 @@
\entry {\code {HOSTTYPE}}{66}
\initial {I}
\entry {\code {IFS}}{61}
\entry {\code {IGNOREEOF}}{66}
\entry {\code {IGNOREEOF}}{67}
\entry {\code {input-meta}}{96}
\entry {\code {INPUTRC}}{67}
\entry {\code {isearch-terminators}}{96}
@@ -119,7 +119,7 @@
\initial {P}
\entry {\code {page-completions}}{97}
\entry {\code {PATH}}{61}
\entry {\code {PIPESTATUS}}{67}
\entry {\code {PIPESTATUS}}{68}
\entry {\code {POSIXLY_CORRECT}}{68}
\entry {\code {PPID}}{68}
\entry {\code {PROMPT_COMMAND}}{68}
+581 -572
View File
File diff suppressed because it is too large Load Diff
+1604 -1587
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.19.2
%%CreationDate: Wed Jun 17 08:51:31 2009
%%CreationDate: Mon Aug 3 10:10:38 2009
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%DocumentSuppliedResources: procset grops 1.19 2
+20 -1
View File
@@ -891,11 +891,30 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
#if defined (COND_COMMAND)
case cm_cond:
was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0;
if (ignore_return)
command->value.Cond->flags |= CMD_IGNORE_RETURN;
save_line_number = line_number;
line_number_for_err_trap = save_line_number = line_number;
exec_result = execute_cond_command (command->value.Cond);
line_number = save_line_number;
if (was_error_trap && ignore_return == 0 && invert == 0 && exec_result != EXECUTION_SUCCESS)
{
last_command_exit_value = exec_result;
save_line_number = line_number;
line_number = line_number_for_err_trap;
run_error_trap ();
line_number = save_line_number;
}
if (ignore_return == 0 && invert == 0 && exit_immediately_on_error && exec_result != EXECUTION_SUCCESS)
{
last_command_exit_value = exec_result;
run_pending_traps ();
jump_to_top_level (ERREXIT);
}
break;
#endif
+24 -2
View File
@@ -891,11 +891,30 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
#if defined (COND_COMMAND)
case cm_cond:
was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0;
if (ignore_return)
command->value.Cond->flags |= CMD_IGNORE_RETURN;
save_line_number = line_number;
line_number_for_err_trap = save_line_number = line_number;
exec_result = execute_cond_command (command->value.Cond);
line_number = save_line_number;
if (was_error_trap && ignore_return == 0 && invert == 0 && exec_result != EXECUTION_SUCCESS)
{
last_command_exit_value = exec_result;
save_line_number = line_number
line_number = line_number_for_err_trap;
run_error_trap ();
line_number = save_line_number;
}
if (ignore_return == 0 && invert == 0 && exit_immediately_on_error && exec_result != EXECUTION_SUCCESS)
{
last_command_exit_value = exec_result;
run_pending_traps ();
jump_to_top_level (ERREXIT);
}
break;
#endif
@@ -3251,7 +3270,9 @@ static int
execute_cond_command (cond_command)
COND_COM *cond_command;
{
int retval, save_line_number;
int retval, save_line_number, invert;
invert = cond_command->flags & CMD_I
retval = EXECUTION_SUCCESS;
save_line_number = line_number;
@@ -3821,6 +3842,7 @@ execute_builtin (builtin, words, flags, subshell)
terminate_immediately++;
#endif
error_trap = 0;
old_e_flag = exit_immediately_on_error;
/* The eval builtin calls parse_and_execute, which does not know about
the setting of flags, and always calls the execution functions with
+1 -1
View File
@@ -1058,7 +1058,7 @@ readtok ()
#if defined (ARRAY_VARS)
if (c == '[')
{
e = skipsubscript (cp, 0);
e = skipsubscript (cp, 0, 0);
if (cp[e] == ']')
{
cp += e + 1;
+1 -1
View File
@@ -135,7 +135,7 @@ extern int find_string_in_alist __P((char *, STRING_INT_ALIST *, int));
extern char *find_token_in_alist __P((int, STRING_INT_ALIST *, int));
extern int find_index_in_alist __P((char *, STRING_INT_ALIST *, int));
extern char *substring __P((char *, int, int));
extern char *substring __P((const char *, int, int));
extern char *strsub __P((char *, char *, char *, int));
extern char *strcreplace __P((char *, int, char *, int));
extern void strip_leading __P((char *));
+1 -1
View File
@@ -285,7 +285,7 @@ assignment (string, flags)
#if defined (ARRAY_VARS)
if (c == '[')
{
newi = skipsubscript (string, indx);
newi = skipsubscript (string, indx, 0);
if (string[newi++] != ']')
return (0);
if (string[newi] == '+' && string[newi+1] == '=')
+43 -4
View File
@@ -1579,10 +1579,15 @@ the programmable completion facilities are invoked.
First, the command name is identified.
If a compspec has been defined for that command, the
compspec is used to generate the list of possible completions for the word.
If the command word is the empty string (completion attempted at the
beginning of an empty line), any compspec defined with
the @option{-E} option to @code{complete} is used.
If the command word is a full pathname, a compspec for the full
pathname is searched for first.
If no compspec is found for the full pathname, an attempt is made to
find a compspec for the portion following the final slash.
If those searches do not result in a compspec, any compspec defined with
the @option{-D} option to @code{complete} is used as the default.
Once a compspec has been found, it is used to generate the list of
matching words.
@@ -1686,6 +1691,28 @@ 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.
There is some support for dynamically modifying completions. This is
most useful when used in combination with a default completion specified
with @option{-D}. It's possible for shell functions executed as completion
handlers to indicate that completion should be retried by returning an
exit status of 124. If a shell function returns 124, and changes
the compspec associated with the command on which completion is being
attempted (supplied as the first argument when the function is executed),
programmable completion restarts from the beginning, with an
attempt to find a compspec for that command. This allows a set of
completions to be built dynamically as completion is attempted, rather than
being loaded all at once.
For instance, assuming that there is a library of compspecs, each kept in a
file corresponding to the name of the command, the following default
completion function would load completions dynamically:
_completion_loader()
{
. "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124
}
complete -D -F _completion_loader
@node Programmable Completion Builtins
@section Programmable Completion Builtins
@cindex completion builtins
@@ -1721,10 +1748,10 @@ matches were generated.
@item complete
@btindex complete
@example
@code{complete [-abcdefgjksuv] [-o @var{comp-option}] [-E] [-A @var{action}] [-G @var{globpat}] [-W @var{wordlist}]
@code{complete [-abcdefgjksuv] [-o @var{comp-option}] [-DE] [-A @var{action}] [-G @var{globpat}] [-W @var{wordlist}]
[-F @var{function}] [-C @var{command}] [-X @var{filterpat}]
[-P @var{prefix}] [-S @var{suffix}] @var{name} [@var{name} @dots{}]}
@code{complete -pr [-E] [@var{name} @dots{}]}
@code{complete -pr [-DE] [@var{name} @dots{}]}
@end example
Specify how arguments to each @var{name} should be completed.
@@ -1734,12 +1761,16 @@ reused as input.
The @option{-r} option removes a completion specification for
each @var{name}, or, if no @var{name}s are supplied, all
completion specifications.
The @option{-D} option indicates that the remaining options and actions should
apply to the ``default'' command completion; that is, completion attempted
on a command for which no completion has previously been defined.
The @option{-E} option indicates that the remaining options and actions should
apply to ``empty'' command completion; that is, completion attempted on a
blank line.
The process of applying these completion specifications when word completion
is attempted is described above (@pxref{Programmable Completion}).
is attempted is described above (@pxref{Programmable Completion}). The
@option{-D} option takes precedence over @option{-E}.
Other options, if specified, have the following meanings.
The arguments to the @option{-G}, @option{-W}, and @option{-X} options
@@ -1913,7 +1944,7 @@ an error occurs adding a completion specification.
@item compopt
@btindex compopt
@example
@code{compopt} [-o @var{option}] [+o @var{option}] [@var{name}]
@code{compopt} [-o @var{option}] [-DE] [+o @var{option}] [@var{name}]
@end example
Modify completion options for each @var{name} according to the
@var{option}s, or for the currently-execution completion if no @var{name}s
@@ -1922,6 +1953,14 @@ If no @var{option}s are given, display the completion options for each
@var{name} or the current completion.
The possible values of @var{option} are those valid for the @code{complete}
builtin described above.
The @option{-D} option indicates that the remaining options should
apply to the ``default'' command completion; that is, completion attempted
on a command for which no completion has previously been defined.
The @option{-E} option indicates that the remaining options should
apply to ``empty'' command completion; that is, completion attempted on a
blank line.
The @option{-D} option takes precedence over @option{-E}.
The return value is true unless an invalid option is supplied, an attempt
is made to modify the options for a @var{name} for which no completion
+3 -2
View File
@@ -686,7 +686,8 @@ _rl_dispatch_callback (cxt)
r = cxt->childval;
/* For now */
r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ));
if (r != -3) /* don't do this if we indicate there will be other matches */
r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ));
RL_CHECK_SIGNALS ();
if (r == 0) /* success! */
@@ -831,7 +832,7 @@ _rl_dispatch_subseq (key, map, got_subseq)
{
/* Return 0 only the first time, to indicate success to
_rl_callback_read_char. The rest of the time, we're called
from _rl_dispatch_callback, so we return 3 to indicate
from _rl_dispatch_callback, so we return -3 to indicate
special handling is necessary. */
r = RL_ISSTATE (RL_STATE_MULTIKEY) ? -3 : 0;
cxt = _rl_keyseq_cxt_alloc ();
+1 -1
View File
@@ -1172,7 +1172,7 @@ bind_arrow_keys ()
/* Unbind vi_movement_keymap[ESC] to allow users to repeatedly hit ESC
in vi command mode while still allowing the arrow keys to work. */
if (vi_movement_keymap[ESC].type == ISKMAP)
rl_bind_key_in_map (ESC, (rl_command_func_t *)NULL, vi_movement_keymap);
rl_bind_keyseq_in_map ("\033", (rl_command_func_t *)NULL, vi_movement_keymap);
bind_arrow_keys_internal (vi_insertion_keymap);
#endif
}
+1 -1
View File
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
#define PATCHLEVEL 24
#define PATCHLEVEL 28
#endif /* _PATCHLEVEL_H_ */
+117 -34
View File
@@ -66,6 +66,8 @@
#include <readline/readline.h>
#include <readline/history.h>
#define PCOMP_RETRYFAIL 256
#ifdef STRDUP
# undef STRDUP
#endif
@@ -118,10 +120,15 @@ static STRINGLIST *gen_globpat_matches __P((COMPSPEC *, const char *));
static STRINGLIST *gen_wordlist_matches __P((COMPSPEC *, const char *));
static STRINGLIST *gen_shell_function_matches __P((COMPSPEC *, const char *,
char *, int, WORD_LIST *,
int, int));
int, int, int *));
static STRINGLIST *gen_command_matches __P((COMPSPEC *, const char *, char *,
int, WORD_LIST *, int, int));
static STRINGLIST *gen_progcomp_completions __P((const char *, const char *,
const char *,
int, int, int *, int *,
COMPSPEC **));
static char *pcomp_filename_completion_function __P((const char *, int));
#if defined (ARRAY_VARS)
@@ -992,25 +999,30 @@ build_arg_list (cmd, text, lwords, ind)
variable, this does nothing if arrays are not compiled into the shell. */
static STRINGLIST *
gen_shell_function_matches (cs, text, line, ind, lwords, nw, cw)
gen_shell_function_matches (cs, text, line, ind, lwords, nw, cw, foundp)
COMPSPEC *cs;
const char *text;
char *line;
int ind;
WORD_LIST *lwords;
int nw, cw;
int *foundp;
{
char *funcname;
STRINGLIST *sl;
SHELL_VAR *f, *v;
WORD_LIST *cmdlist;
int fval;
int fval, found;
sh_parser_state_t ps;
sh_parser_state_t * restrict pps;
#if defined (ARRAY_VARS)
ARRAY *a;
#endif
found = 0;
if (foundp)
*foundp = found;
funcname = cs->funcname;
f = find_function (funcname);
if (f == 0)
@@ -1043,6 +1055,12 @@ gen_shell_function_matches (cs, text, line, ind, lwords, nw, cw)
discard_unwind_frame ("gen-shell-function-matches");
restore_parser_state (pps);
found = fval != EX_NOTFOUND;
if (fval == EX_RETRYFAIL)
found |= PCOMP_RETRYFAIL;
if (foundp)
*foundp = found;
/* Now clean up and destroy everything. */
dispose_words (cmdlist);
unbind_compfunc_variables (0);
@@ -1057,7 +1075,7 @@ gen_shell_function_matches (cs, text, line, ind, lwords, nw, cw)
VUNSETATTR (v, att_invisible);
a = array_cell (v);
if (a == 0 || array_empty (a))
if (found == 0 || (found & PCOMP_RETRYFAIL) || a == 0 || array_empty (a))
sl = (STRINGLIST *)NULL;
else
{
@@ -1188,18 +1206,21 @@ command_line_to_word_list (line, llen, sentinel, nwp, cwp)
/* Evaluate COMPSPEC *cs and return all matches for WORD. */
STRINGLIST *
gen_compspec_completions (cs, cmd, word, start, end)
gen_compspec_completions (cs, cmd, word, start, end, foundp)
COMPSPEC *cs;
const char *cmd;
const char *word;
int start, end;
int *foundp;
{
STRINGLIST *ret, *tmatches;
char *line;
int llen, nw, cw;
int llen, nw, cw, found, foundf;
WORD_LIST *lwords;
COMPSPEC *tcs;
found = 1;
#ifdef DEBUG
debug_printf ("gen_compspec_completions (%s, %s, %d, %d)", cmd, word, start, end);
debug_printf ("gen_compspec_completions: %s -> %p", cmd, cs);
@@ -1284,7 +1305,10 @@ gen_compspec_completions (cs, cmd, word, start, end)
if (cs->funcname)
{
tmatches = gen_shell_function_matches (cs, word, line, rl_point - start, lwords, nw, cw);
foundf = 0;
tmatches = gen_shell_function_matches (cs, word, line, rl_point - start, lwords, nw, cw, &foundf);
if (foundf != 0)
found = foundf;
if (tmatches)
{
#ifdef DEBUG
@@ -1325,6 +1349,15 @@ gen_compspec_completions (cs, cmd, word, start, end)
FREE (line);
}
if (foundp)
*foundp = found;
if (found == 0 || (found & PCOMP_RETRYFAIL))
{
strlist_dispose (ret);
return NULL;
}
if (cs->filterpat)
{
tmatches = filter_stringlist (ret, cs->filterpat, word);
@@ -1399,35 +1432,28 @@ pcomp_set_compspec_options (cs, flags, set_or_unset)
cs->options &= ~flags;
}
/* The driver function for the programmable completion code. Returns a list
of matches for WORD, which is an argument to command CMD. START and END
bound the command currently being completed in rl_line_buffer. */
char **
programmable_completions (cmd, word, start, end, foundp)
static STRINGLIST *
gen_progcomp_completions (ocmd, cmd, word, start, end, foundp, retryp, lastcs)
const char *ocmd;
const char *cmd;
const char *word;
int start, end, *foundp;
int start, end;
int *foundp, *retryp;
COMPSPEC **lastcs;
{
COMPSPEC *cs, *oldcs;
STRINGLIST *ret;
char **rmatches, *t;
const char *oldcmd;
STRINGLIST *ret;
/* We look at the basename of CMD if the full command does not have
an associated COMPSPEC. */
cs = progcomp_search (cmd);
if (cs == 0)
{
t = strrchr (cmd, '/');
if (t)
cs = progcomp_search (++t);
}
if (cs == 0)
{
if (foundp)
*foundp = 0;
return ((char **)NULL);
}
cs = progcomp_search (ocmd);
if (cs == 0 || cs == *lastcs)
return (NULL);
if (*lastcs)
compspec_dispose (*lastcs);
cs->refcount++; /* XXX */
*lastcs = cs;
cs = compspec_copy (cs);
@@ -1437,17 +1463,68 @@ programmable_completions (cmd, word, start, end, foundp)
pcomp_curcs = cs;
pcomp_curcmd = cmd;
ret = gen_compspec_completions (cs, cmd, word, start, end);
ret = gen_compspec_completions (cs, cmd, word, start, end, foundp);
pcomp_curcs = oldcs;
pcomp_curcmd = oldcmd;
/* Signal the caller that we found a COMPSPEC for this command, and pass
back any meta-options associated with the compspec. */
/* We need to conditionally handle setting *retryp here */
if (retryp)
*retryp = foundp && (*foundp & PCOMP_RETRYFAIL);
if (foundp)
*foundp = 1|cs->options;
{
*foundp &= ~PCOMP_RETRYFAIL;
*foundp |= cs->options;
}
compspec_dispose (cs);
return ret;
}
/* The driver function for the programmable completion code. Returns a list
of matches for WORD, which is an argument to command CMD. START and END
bound the command currently being completed in rl_line_buffer. */
char **
programmable_completions (cmd, word, start, end, foundp)
const char *cmd;
const char *word;
int start, end, *foundp;
{
COMPSPEC *cs, *lastcs;
STRINGLIST *ret;
char **rmatches, *t;
int found, retry, count;
lastcs = 0;
found = count = 0;
do
{
retry = 0;
/* We look at the basename of CMD if the full command does not have
an associated COMPSPEC. */
ret = gen_progcomp_completions (cmd, cmd, word, start, end, &found, &retry, &lastcs);
if (found == 0)
{
t = strrchr (cmd, '/');
if (t && *(++t))
ret = gen_progcomp_completions (t, cmd, word, start, end, &found, &retry, &lastcs);
}
if (found == 0)
ret = gen_progcomp_completions (DEFAULTCMD, cmd, word, start, end, &found, &retry, &lastcs);
count++;
if (count > 32)
{
internal_warning ("programmable_completion: %s: possible retry loop", cmd);
break;
}
}
while (retry);
if (ret)
{
@@ -1457,6 +1534,12 @@ programmable_completions (cmd, word, start, end, foundp)
else
rmatches = (char **)NULL;
if (foundp)
*foundp = found;
if (lastcs) /* XXX - should be while? */
compspec_dispose (lastcs);
return (rmatches);
}
+5 -2
View File
@@ -1,5 +1,5 @@
/* pcomplete.h - structure definitions and other stuff for programmable
n completion. */
completion. */
/* Copyright (C) 1999-2009 Free Software Foundation, Inc.
@@ -96,6 +96,9 @@ typedef struct _list_of_items {
#define LIST_DONTFREE 0x010
#define LIST_DONTFREEMEMBERS 0x020
#define EMPTYCMD "_EmptycmD_"
#define DEFAULTCMD "_DefaultCmD_"
extern HASH_TABLE *prog_completes;
extern int prog_completion_enabled;
@@ -150,7 +153,7 @@ extern void set_itemlist_dirty __P((ITEMLIST *));
extern STRINGLIST *completions_to_stringlist __P((char **));
extern STRINGLIST *gen_compspec_completions __P((COMPSPEC *, const char *, const char *, int, int));
extern STRINGLIST *gen_compspec_completions __P((COMPSPEC *, const char *, const char *, int, int, int *));
extern char **programmable_completions __P((const char *, const char *, int, int, int *));
extern void pcomp_set_readline_variables __P((int, int));
+5
View File
@@ -275,7 +275,9 @@ write_here_string (fd, redirectee)
char *herestr;
int herelen, n, e;
expanding_redir = 1;
herestr = expand_string_to_string (redirectee->word, 0);
expanding_redir = 0;
herelen = STRLEN (herestr);
n = write (fd, herestr, herelen);
@@ -327,7 +329,10 @@ write_here_document (fd, redirectee)
return 0;
}
expanding_redir = 1;
tlist = expand_string (redirectee->word, Q_HERE_DOCUMENT);
expanding_redir = 0;
if (tlist)
{
/* Try using buffered I/O (stdio) and writing a word
+2
View File
@@ -56,6 +56,8 @@ extern int EOF_Reached;
#define EX_BADUSAGE 2
/* Special exit statuses used by the shell, internally and externally. */
#define EX_RETRYFAIL 124
#define EX_WEXPCOMSUB 125
#define EX_BINARY_FILE 126
#define EX_NOEXEC 126
#define EX_NOINPUT 126
+1 -1
View File
@@ -125,7 +125,7 @@ find_index_in_alist (string, alist, flags)
not including END. */
char *
substring (string, start, end)
char *string;
const char *string;
int start, end;
{
register int len;
+13 -10
View File
@@ -717,7 +717,7 @@ string_extract (string, sindex, charlist, flags)
{
int ni;
/* If this is an array subscript, skip over it and continue. */
ni = skipsubscript (string, i);
ni = skipsubscript (string, i, 0);
if (string[ni] == ']')
i = ni;
}
@@ -1509,7 +1509,10 @@ unquote_bang (string)
#define CQ_RETURN(x) do { no_longjmp_on_fatal_error = 0; return (x); } while (0)
/* This function assumes s[i] == open; returns with s[ret] == close; used to
parse array subscripts. FLAGS currently unused. */
parse array subscripts. FLAGS & 1 means to not attempt to skip over
matched pairs of quotes or backquotes, or skip word expansions; it is
intended to be used after expansion has been performed and during final
assignment parsing (see arrayfunc.c:assign_compound_array_list()). */
static int
skip_matched_pair (string, start, open, close, flags)
const char *string;
@@ -1550,13 +1553,13 @@ skip_matched_pair (string, start, open, close, flags)
ADVANCE_CHAR (string, slen, i);
continue;
}
else if (c == '`')
else if ((flags & 1) == 0 && c == '`')
{
backq = 1;
i++;
continue;
}
else if (c == open)
else if ((flags & 1) == 0 && c == open)
{
count++;
i++;
@@ -1570,13 +1573,13 @@ skip_matched_pair (string, start, open, close, flags)
i++;
continue;
}
else if (c == '\'' || c == '"')
else if ((flags & 1) == 0 && (c == '\'' || c == '"'))
{
i = (c == '\'') ? skip_single_quoted (ss, slen, ++i)
: skip_double_quoted (ss, slen, ++i);
/* no increment, the skip functions increment past the closing quote. */
}
else if (c == '$' && (string[i+1] == LPAREN || string[i+1] == LBRACE))
else if ((flags&1) == 0 && c == '$' && (string[i+1] == LPAREN || string[i+1] == LBRACE))
{
si = i + 2;
if (string[si] == '\0')
@@ -1601,11 +1604,11 @@ skip_matched_pair (string, start, open, close, flags)
#if defined (ARRAY_VARS)
int
skipsubscript (string, start)
skipsubscript (string, start, flags)
const char *string;
int start;
int start, flags;
{
return (skip_matched_pair (string, start, '[', ']', 0));
return (skip_matched_pair (string, start, '[', ']', flags));
}
#endif
@@ -4995,7 +4998,7 @@ command_substitute (string, quoted)
if (wordexp_only && read_but_dont_execute)
{
last_command_exit_value = 125;
last_command_exit_value = EX_WEXPCOMSUB;
jump_to_top_level (EXITPROG);
}
+52 -7
View File
@@ -13,11 +13,11 @@ declare -A BASH_CMDS='()'
declare -Ai chaff='([one]="10" [zero]="5" )'
declare -Ar waste='([version]="4.0-devel" [source]="./assoc.tests" [lineno]="28" [pid]="42134" )'
declare -A wheat='([one]="a" [zero]="0" [two]="b" [three]="c" )'
declare -A chaff='([one]="10" [hello world]="flip" [zero]="5" )'
declare -A chaff='([one]="10" ["hello world"]="flip" [zero]="5" )'
./assoc.tests: line 38: unset: waste: cannot unset: readonly variable
./assoc.tests: line 39: chaff[*]: bad array subscript
./assoc.tests: line 40: [*]=12: invalid associative array key
declare -A chaff='([one]="a" [hello world]="flip" )'
declare -A chaff='([one]="a" ["hello world"]="flip" )'
flip
argv[1] = <a>
argv[2] = <flip>
@@ -34,11 +34,11 @@ argv[1] = <a flip multiple words>
./assoc.tests: line 57: declare: chaff: cannot destroy array variables in this way
./assoc.tests: line 59: chaff[*]: bad array subscript
./assoc.tests: line 60: [*]=12: invalid associative array key
declare -A wheat='([six]="6" [foo bar]="qux qix" )'
declare -A wheat='([six]="6" ["foo bar"]="qux qix" )'
argv[1] = <qux>
argv[2] = <qix>
argv[1] = <qux qix>
declare -A wheat='([six]="6" [foo bar]="qux qix" )'
declare -A wheat='([six]="6" ["foo bar"]="qux qix" )'
argv[1] = <2>
argv[1] = <7>
argv[1] = <qux>
@@ -102,7 +102,7 @@ argv[4] = </usr/local/bin/qux -l>
outside: outside
declare -A BASH_ALIASES='()'
declare -A BASH_CMDS='()'
declare -A afoo='([six]="six" [foo bar]="foo quux" )'
declare -A afoo='([six]="six" ["foo bar"]="foo quux" )'
argv[1] = <inside:>
argv[2] = <six>
argv[3] = <foo quux>
@@ -137,7 +137,52 @@ def
def
./assoc5.sub: line 13: declare: `myarray[foo[bar]=bleh': not a valid identifier
abc def bleh
myarray=([a]a]="abc" []]="def" [a]=test1;#a]="123" [foo]="bleh" )
myarray=(["a]a"]="abc" ["]"]="def" ["a]=test1;#a"]="123" [foo]="bleh" )
123
myarray=([a]a]="abc" [a]=test2;#a]="def" []]="def" [a]=test1;#a]="123" [foo]="bleh" )
myarray=(["a]a"]="abc" ["a]=test2;#a"]="def" ["]"]="def" ["a]=test1;#a"]="123" [foo]="bleh" )
bar"bie
doll
declare -A foo='(["bar\"bie"]="doll" )'
bar"bie
doll
declare -A foo='(["bar\"bie"]="doll" )'
bar"bie
doll
declare -A foo='(["bar\"bie"]="doll" )'
bar"bie
doll
declare -A foo='(["bar\"bie"]="doll" )'
bar"bie
doll
declare -A foo='(["bar\"bie"]="doll" )'
bar'bie
doll
declare -A foo='(["bar'\''bie"]="doll" )'
bar'bie
doll
declare -A foo='(["bar'\''bie"]="doll" )'
bar'bie
doll
declare -A foo='(["bar'\''bie"]="doll" )'
bar'bie
doll
declare -A foo='(["bar'\''bie"]="doll" )'
bar'bie
doll
declare -A foo='(["bar'\''bie"]="doll" )'
bar$bie
doll
declare -A foo='(["bar\$bie"]="doll" )'
bar[bie
doll
declare -A foo='(["bar[bie"]="doll" )'
bar`bie
doll
declare -A foo='(["bar\`bie"]="doll" )'
bar\]bie
doll
declare -A foo='(["bar\\]bie"]="doll" )'
bar${foo}bie
doll
declare -A foo='(["bar\${foo}bie"]="doll" )'
+3
View File
@@ -175,3 +175,6 @@ ${THIS_SH} ./assoc3.sub
${THIS_SH} ./assoc4.sub
${THIS_SH} ./assoc5.sub
${THIS_SH} ./assoc6.sub
+146
View File
@@ -0,0 +1,146 @@
declare -A foo
foo=([bar\"bie]=doll)
echo ${!foo[@]}
echo ${foo[@]}
declare -p foo
unset foo
declare -A foo=(["bar\"bie"]="doll")
echo ${!foo[@]}
echo ${foo[@]}
declare -p foo
unset foo
declare -A foo
foo=(["bar\"bie"]="doll")
echo ${!foo[@]}
echo ${foo[@]}
declare -p foo
unset foo
declare -A foo
foo["bar\"bie"]="doll"
echo ${!foo[@]}
echo ${foo[@]}
declare -p foo
unset foo
declare -A foo
foo[bar\"bie]="doll"
echo ${!foo[@]}
echo ${foo[@]}
declare -p foo
unset foo
declare -A foo
foo=([bar\'bie]=doll)
echo ${!foo[@]}
echo ${foo[@]}
declare -p foo
unset foo
declare -A foo=(["bar'bie"]="doll")
echo ${!foo[@]}
echo ${foo[@]}
declare -p foo
unset foo
declare -A foo
foo=(["bar'bie"]="doll")
echo ${!foo[@]}
echo ${foo[@]}
declare -p foo
unset foo
declare -A foo
foo["bar'bie"]="doll"
echo ${!foo[@]}
echo ${foo[@]}
declare -p foo
unset foo
declare -A foo
foo[bar\'bie]="doll"
echo ${!foo[@]}
echo ${foo[@]}
declare -p foo
unset foo
declare -A foo
foo=([bar\$bie]=doll)
echo ${!foo[@]}
echo ${foo[@]}
declare -p foo
unset foo
declare -A foo=(["bar[bie"]="doll")
echo ${!foo[@]}
echo ${foo[@]}
declare -p foo
unset foo
declare -A foo
foo=(["bar\`bie"]="doll")
echo ${!foo[@]}
echo ${foo[@]}
declare -p foo
unset foo
declare -A foo
# this doesn't work right without the backslash
foo["bar\]bie"]="doll"
echo ${!foo[@]}
echo ${foo[@]}
declare -p foo
unset foo
declare -A foo
foo[bar\${foo}bie]="doll"
echo ${!foo[@]}
echo ${foo[@]}
declare -p foo
unset foo
declare -A foo