commit bash-20180608 snapshot

This commit is contained in:
Chet Ramey
2018-06-12 10:37:19 -04:00
parent 3e03eafff8
commit 12beeabf52
26 changed files with 12871 additions and 12542 deletions
+36
View File
@@ -15490,3 +15490,39 @@ bashhist.c
- load_history: use HISTSIZE_DEFAULT (still defaults to "500") to set
the initial value of $HISTSIZE. HISTSIZE_DEFAULT can be overridden
in config-top.h
6/4
---
configure.ac
- make sure we link against an external readline library that's at
least version 8
6/8
---
pcomplete.h
- INITIALWORD: internal compspec name for programmable completion on
the initial (usually the command) word
bashline.c
- attempt_shell_completion: if we are in a command position and the
user has defined a compspec for INITIALWORD, use programmable
completion to complete command words. Original patch from
Luca Boccassi <bluca@debian.org>
lib/readline/doc/rluser.texi,builtins/complete.def,doc/bash.1
- make it clearer that -D takes precedence over -E when supplied as
options to `complete', not when they are applied during completion
builtins/complete.def
- complete_builtin,compgen_builtin: add support for -I option
- print_one_completion,print_compopts: display -I when appropriate
lib/readline/doc/rluser.texi,doc/bash.1
- complete,compgen: document new -I option and its effect
6/10
----
lib/readline/histfile.c
- read_history_range: don't apply the heuristic and try to append a
history line to an existing history entry if we don't have any
history entries. Bug and fix from Edward Huff <ejhuff@gmail.com>
+10 -1
View File
@@ -1426,6 +1426,7 @@ attempt_shell_completion (text, start, end)
char **matches, *command_separator_chars;
#if defined (PROGRAMMABLE_COMPLETION)
int have_progcomps, was_assignment;
COMPSPEC *iw_compspec;
#endif
command_separator_chars = COMMAND_SEPARATORS;
@@ -1510,7 +1511,9 @@ attempt_shell_completion (text, start, end)
#if defined (PROGRAMMABLE_COMPLETION)
/* Attempt programmable completion. */
have_progcomps = prog_completion_enabled && (progcomp_size () > 0);
if (matches == 0 && (in_command_position == 0 || text[0] == '\0') &&
iw_compspec = progcomp_search (INITIALWORD);
if (matches == 0 &&
(in_command_position == 0 || text[0] == '\0' || (in_command_position && iw_compspec)) &&
current_prompt_string == ps1_prompt)
{
int s, e, s1, e1, os, foundcs;
@@ -1599,6 +1602,12 @@ attempt_shell_completion (text, start, end)
}
else
foundcs = 0;
/* If we have defined a compspec for the initial (command) word, call
it and process the results like any other programmable completion. */
if (in_command_position && foundcs == 0 && iw_compspec)
prog_complete_matches = programmable_completions (INITIALWORD, text, s, e, &foundcs);
FREE (n);
/* XXX - if we found a COMPSPEC for the command, just return whatever
the programmable completion code returns, and disable the default
+4 -2
View File
@@ -1,6 +1,6 @@
/* braces.c -- code for doing word expansion in curly braces. */
/* Copyright (C) 1987-2012 Free Software Foundation, Inc.
/* Copyright (C) 1987-2018 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -778,7 +778,9 @@ array_concat (arr1, arr2)
len1 = strvec_len (arr1);
len2 = strvec_len (arr2);
result = (char **)xmalloc ((1 + (len1 * len2)) * sizeof (char *));
result = (char **)malloc ((1 + (len1 * len2)) * sizeof (char *));
if (result == 0)
return (result);
len = 0;
for (i = 0; i < len1; i++)
+54 -18
View File
@@ -23,7 +23,7 @@ $PRODUCES complete.c
$BUILTIN complete
$DEPENDS_ON PROGRAMMABLE_COMPLETION
$FUNCTION complete_builtin
$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 ...]
$SHORT_DOC complete [-abcdefgjksuv] [-pr] [-DEI] [-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
@@ -38,10 +38,12 @@ Options:
without any specific completion defined
-E apply the completions and actions to "empty" commands --
completion attempted on a blank line
-I apply the completions and actions to the intial (usually the
command) word
When completion is attempted, the actions are applied in the order the
uppercase-letter options are listed above. The -D option takes
precedence over -E.
uppercase-letter options are listed above. If multiple options are supplied,
the -D option takes precedence over -E, and both take precedence over -I.
Exit Status:
Returns success unless an invalid option is supplied or an error occurs.
@@ -79,6 +81,7 @@ struct _optflags {
int rflag;
int Dflag;
int Eflag;
int Iflag;
};
static int find_compact __P((char *));
@@ -195,7 +198,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:DE")) != -1)
while ((opt = internal_getopt (list, "abcdefgjko:prsuvA:G:W:P:S:X:F:C:DEI")) != -1)
{
opt_given = 1;
switch (opt)
@@ -307,6 +310,18 @@ build_actions (list, flagp, actp, optp)
builtin_usage ();
return (EX_USAGE);
}
case 'I':
if (flagp)
{
flagp->Iflag = 1;
break;
}
else
{
sh_invalidopt ("-I");
builtin_usage ();
return (EX_USAGE);
}
case 'F':
Farg = list_optarg;
break;
@@ -355,7 +370,8 @@ complete_builtin (list)
return (EXECUTION_SUCCESS);
}
opt_given = oflags.pflag = oflags.rflag = oflags.Dflag = oflags.Eflag = 0;
opt_given = oflags.pflag = oflags.rflag = 0;
oflags.Dflag = oflags.Eflag = oflags.Iflag = 0;
acts = copts = (unsigned long)0L;
Garg = Warg = Parg = Sarg = Xarg = Farg = Carg = (char *)NULL;
@@ -370,8 +386,14 @@ complete_builtin (list)
list = loptend;
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);
if (oflags.Dflag)
wl = make_word_list (make_bare_word (DEFAULTCMD), (WORD_LIST *)NULL);
else if (oflags.Eflag)
wl = make_word_list (make_bare_word (EMPTYCMD), (WORD_LIST *)NULL);
else if (oflags.Iflag)
wl = make_word_list (make_bare_word (INITIALWORD), (WORD_LIST *)NULL);
else
wl = (WORD_LIST *)NULL;
/* -p overrides everything else */
if (oflags.pflag || (list == 0 && opt_given == 0))
@@ -564,10 +586,12 @@ print_one_completion (cmd, cs)
/* simple arguments that don't require quoting */
PRINTARG (cs->funcname, "-F");
if (STREQ (cmd, EMPTYCMD))
printf ("-E\n");
else if (STREQ (cmd, DEFAULTCMD))
if (STREQ (cmd, DEFAULTCMD))
printf ("-D\n");
else if (STREQ (cmd, EMPTYCMD))
printf ("-E\n");
else if (STREQ (cmd, INITIALWORD))
printf ("-I\n");
else
printf ("%s\n", cmd);
@@ -608,10 +632,12 @@ print_compopts (cmd, cs, full)
PRINTCOMPOPT (COPT_PLUSDIRS, "plusdirs");
}
if (STREQ (cmd, EMPTYCMD))
printf ("-E\n");
else if (STREQ (cmd, DEFAULTCMD))
if (STREQ (cmd, DEFAULTCMD))
printf ("-D\n");
else if (STREQ (cmd, EMPTYCMD))
printf ("-E\n");
else if (STREQ (cmd, INITIALWORD))
printf ("-I\n");
else
printf ("%s\n", cmd);
}
@@ -769,7 +795,7 @@ compgen_builtin (list)
$BUILTIN compopt
$DEPENDS_ON PROGRAMMABLE_COMPLETION
$FUNCTION compopt_builtin
$SHORT_DOC compopt [-o|+o option] [-DE] [name ...]
$SHORT_DOC compopt [-o|+o option] [-DEI] [name ...]
Modify or display completion options.
Modify the completion options for each NAME, or, if no NAMEs are supplied,
@@ -780,6 +806,7 @@ 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
-I Change options for completion on the initial word
Using `+o' instead of `-o' turns off the specified option.
@@ -800,7 +827,7 @@ int
compopt_builtin (list)
WORD_LIST *list;
{
int opts_on, opts_off, *opts, opt, oind, ret, Dflag, Eflag;
int opts_on, opts_off, *opts, opt, oind, ret, Dflag, Eflag, Iflag;
WORD_LIST *l, *wl;
COMPSPEC *cs;
@@ -808,7 +835,7 @@ compopt_builtin (list)
ret = EXECUTION_SUCCESS;
reset_internal_getopt ();
while ((opt = internal_getopt (list, "+o:DE")) != -1)
while ((opt = internal_getopt (list, "+o:DEI")) != -1)
{
opts = (list_opttype == '-') ? &opts_on : &opts_off;
@@ -829,6 +856,9 @@ compopt_builtin (list)
case 'E':
Eflag = 1;
break;
case 'I':
Iflag = 1;
break;
CASE_HELPOPT;
default:
builtin_usage ();
@@ -837,8 +867,14 @@ compopt_builtin (list)
}
list = loptend;
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 (Dflag)
wl = make_word_list (make_bare_word (DEFAULTCMD), (WORD_LIST *)NULL);
else if (Eflag)
wl = make_word_list (make_bare_word (EMPTYCMD), (WORD_LIST *)NULL);
else if (Iflag)
wl = make_word_list (make_bare_word (INITIALWORD), (WORD_LIST *)NULL);
else
wl = (WORD_LIST *)NULL;
if (list == 0 && wl == 0)
{
Vendored
+1 -1
View File
@@ -5404,7 +5404,7 @@ fi
case "$ac_cv_rl_version" in
7*|8*|9*) ;;
8*|9*) ;;
*) opt_with_installed_readline=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: installed readline library is too old to be linked with bash" >&5
$as_echo "$as_me: WARNING: installed readline library is too old to be linked with bash" >&2;}
+1 -1
View File
@@ -550,7 +550,7 @@ then
RL_LIB_READLINE_VERSION
case "$ac_cv_rl_version" in
7*|8*|9*) ;;
8*|9*) ;;
*) opt_with_installed_readline=no
AC_MSG_WARN([installed readline library is too old to be linked with bash])
AC_MSG_WARN([using private bash version])
+1679 -1665
View File
File diff suppressed because it is too large Load Diff
+15 -5
View File
@@ -5,12 +5,12 @@
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
.\" Last Change: Sat May 19 21:48:08 EDT 2018
.\" Last Change: Fri Jun 8 16:15:23 EDT 2018
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2018 May 19" "GNU Bash 5.0"
.TH BASH 1 "2018 June 8" "GNU Bash 5.0"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -7647,12 +7647,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\-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]
\fBcomplete\fP [\fB\-abcdefgjksuv\fP] [\fB\-o\fP \fIcomp-option\fP] [\fB\-DEI\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\-DE\fP] [\fIname\fP ...]
\fBcomplete\fP \fB\-pr\fP [\fB\-DEI\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,
@@ -7667,6 +7667,12 @@ 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.
The \fB\-I\fP option indicates that the remaining options and actions should
apply to completion on the inital non-assignment word on the line, or after
a command delimiter such as \fB;\fP or \fB|\fP, which is usually command
name completion.
If multiple options are supplied, the \fB\-D\fP option takes precedence
over \fB\-E\fP, and both take precedence of \fB\-I\fP.
.sp 1
The process of applying these completion specifications when word completion
is attempted is described above under \fBProgrammable Completion\fP.
@@ -7862,7 +7868,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\-DE\fP] [\fB+o\fP \fIoption\fP] [\fIname\fP]
\fBcompopt\fP [\fB\-o\fP \fIoption\fP] [\fB\-DEI\fP] [\fB+o\fP \fIoption\fP] [\fIname\fP]
Modify completion options for each \fIname\fP according to the
\fIoption\fPs, or for the
currently-executing completion if no \fIname\fPs are supplied.
@@ -7876,6 +7882,10 @@ 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.
The \fB\-I\fP option indicates that the remaining options should
apply to completion on the inital non-assignment word on the line,
or after a command delimiter such as \fB;\fP or \fB|\fP, which is usually
command name completion.
.sp 1
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
+29 -12
View File
@@ -3,7 +3,7 @@
</HEAD>
<BODY><TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2018 March 15<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2018 June 8<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<BR><A HREF="#index">Index</A>
@@ -1738,7 +1738,14 @@ is null, the parameters are joined without intervening separators.
<DT><B>@</B>
<DD>
Expands to the positional parameters, starting from one. When the
Expands to the positional parameters, starting from one.
In contexts where word splitting is performed, this expands each
positional parameter to a separate word; if not within double
quotes, these words are subject to word splitting.
In contexts where word splitting is not performed,
this expands to a single word
with each positional parameter separated by a space.
When the
expansion occurs within double quotes, each parameter expands to a
separate word. That is, &quot;<B>$@</B>&quot; is equivalent to
&quot;<B>$1</B>&quot; &quot;<B>$2</B>&quot; ...
@@ -2634,7 +2641,7 @@ Similar to
<FONT SIZE=-1><B>BASH_ENV</B>;
</FONT>
used when the shell is invoked in POSIX mode.
used when the shell is invoked in <I>posix mode</I>.
<DT><B>EXECIGNORE</B>
<DD>
@@ -6125,7 +6132,7 @@ cannot affect the shell's execution environment.
<P>
Subshells spawned to execute command substitutions inherit the value of
the <B>-e</B> option from the parent shell. When not in <I>posix</I> mode,
the <B>-e</B> option from the parent shell. When not in <I>posix mode</I>,
<B>bash</B> clears the <B>-e</B> option in such subshells.
<P>
@@ -9745,12 +9752,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>-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>
<DT><B>complete</B> [<B>-abcdefgjksuv</B>] [<B>-o</B> <I>comp-option</I>] [<B>-DEI</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>-DE</B>] [<I>name</I> ...]<DD>
<DT><B>complete</B> <B>-pr</B> [<B>-DEI</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,
@@ -9765,6 +9772,12 @@ 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.
The <B>-I</B> option indicates that the remaining options and actions should
apply to completion on the inital non-assignment word on the line, or after
a command delimiter such as <B>;</B> or <B>|</B>, which is usually command
name completion.
If multiple options are supplied, the <B>-D</B> option takes precedence
over <B>-E</B>, and both take precedence of <B>-I</B>.
<P>
The process of applying these completion specifications when word completion
is attempted is described above under <B>Programmable Completion</B>.
@@ -9995,7 +10008,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>-DE</B>] [<B>+o</B> <I>option</I>] [<I>name</I>]<DD>
<DT><B>compopt</B> [<B>-o</B> <I>option</I>] [<B>-DEI</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-executing completion if no <I>name</I>s are supplied.
@@ -10009,6 +10022,10 @@ 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.
The <B>-I</B> option indicates that the remaining options should
apply to completion on the inital non-assignment word on the line,
or after a command delimiter such as <B>;</B> or <B>|</B>, which is usually
command name completion.
<P>
The return value is true unless an invalid option is supplied, an attempt
is made to modify the options for a <I>name</I> for which no completion
@@ -11727,7 +11744,7 @@ Without options, the name and value of each shell variable are displayed
in a format that can be reused as input
for setting or resetting the currently-set variables.
Read-only variables cannot be reset.
In <I>posix</I> mode, only shell variables are listed.
In <I>posix mode</I>, only shell variables are listed.
The output is sorted according to the current locale.
When options are specified, they set or unset shell attributes.
Any arguments remaining after option processing are treated
@@ -12444,7 +12461,7 @@ interrupt; previous versions continue with the next command in the list.
If set,
<B>bash</B>,
when in <I>posix</I> mode, treats a single quote in a double-quoted
when in <I>posix mode</I>, treats a single quote in a double-quoted
parameter expansion as a special character. The single quotes must match
(an even number) and the characters between the single quotes are considered
quoted. This is the behavior of posix mode through version 4.1.
@@ -13426,7 +13443,7 @@ and
<B>-u</B>,
which are unscaled values;
and, when in Posix mode,
and, when in posix mode,
<B>-c</B>
and
@@ -13852,7 +13869,7 @@ There may be only one active coprocess at a time.
<HR>
<TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>GNU Bash 5.0<TH ALIGN=CENTER width=33%>2018 March 15<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>GNU Bash 5.0<TH ALIGN=CENTER width=33%>2018 June 8<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<HR>
@@ -13958,6 +13975,6 @@ There may be only one active coprocess at a time.
</DL>
<HR>
This document was created by man2html from bash.1.<BR>
Time: 19 March 2018 09:43:32 EDT
Time: 08 June 2018 16:16:11 EDT
</BODY>
</HTML>
+224 -193
View File
@@ -2,9 +2,9 @@ This is bash.info, produced by makeinfo version 6.5 from
bashref.texi.
This text is a brief description of the features that are present in the
Bash shell (version 5.0, 15 March 2018).
Bash shell (version 5.0, 8 June 2018).
This is Edition 5.0, last updated 15 March 2018, of 'The GNU Bash
This is Edition 5.0, last updated 8 June 2018, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.0.
Copyright (C) 1988-2018 Free Software Foundation, Inc.
@@ -27,10 +27,10 @@ Bash Features
*************
This text is a brief description of the features that are present in the
Bash shell (version 5.0, 15 March 2018). The Bash home page is
Bash shell (version 5.0, 8 June 2018). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.0, last updated 15 March 2018, of 'The GNU Bash
This is Edition 5.0, last updated 8 June 2018, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.0.
Bash contains features that appear in other popular shells, and some
@@ -768,7 +768,9 @@ File: bash.info, Node: Conditional Constructs, Next: Command Grouping, Prev:
'case'
The syntax of the 'case' command is:
case WORD in [ [(] PATTERN [| PATTERN]...) COMMAND-LIST ;;]... esac
case WORD in
[ [(] PATTERN [| PATTERN]...) COMMAND-LIST ;;]...
esac
'case' will selectively execute the COMMAND-LIST corresponding to
the first PATTERN that matches WORD. The match is performed
@@ -883,8 +885,8 @@ File: bash.info, Node: Conditional Constructs, Next: Command Grouping, Prev:
'shopt' in *note The Shopt Builtin::) is enabled, the match is
performed without regard to the case of alphabetic characters. The
return value is 0 if the string matches ('==') or does not match
('!=')the pattern, and 1 otherwise. Any part of the pattern may be
quoted to force the quoted portion to be matched as a string.
('!=') the pattern, and 1 otherwise. Any part of the pattern may
be quoted to force the quoted portion to be matched as a string.
An additional binary operator, '=~', is available, with the same
precedence as '==' and '!='. When it is used, the string to the
@@ -1103,7 +1105,8 @@ read from a file (in this case, filenames listed one per line):
done < file | process-output
with a more compact syntax reminiscent of lambdas:
cat list | parallel "do-something1 {} config-{} ; do-something2 < {}" | process-output
cat list | parallel "do-something1 {} config-{} ; do-something2 < {}" |
process-output
Parallel provides a built-in mechanism to remove filename extensions,
which lends itself to batch file transformations or renaming:
@@ -1118,10 +1121,18 @@ take arguments from the command line; the above can also be written as
If a command generates output, you may want to preserve the input
order in the output. For instance, the following command
{ echo foss.org.my ; echo debian.org; echo freenetproject.org; } | parallel traceroute
{
echo foss.org.my ;
echo debian.org ;
echo freenetproject.org ;
} | parallel traceroute
will display as output the traceroute invocation that finishes first.
Adding the '-k' option
{ echo foss.org.my ; echo debian.org; echo freenetproject.org; } | parallel -k traceroute
{
echo foss.org.my ;
echo debian.org ;
echo freenetproject.org ;
} | parallel -k traceroute
will ensure that the output of 'traceroute foss.org.my' is displayed
first.
@@ -1406,15 +1417,21 @@ only be referenced; assignment to them is not allowed.
is null, the parameters are joined without intervening separators.
'@'
($@) Expands to the positional parameters, starting from one. When
the expansion occurs within double quotes, each parameter expands
to a separate word. That is, '"$@"' is equivalent to '"$1" "$2"
...'. If the double-quoted expansion occurs within a word, the
expansion of the first parameter is joined with the beginning part
of the original word, and the expansion of the last parameter is
joined with the last part of the original word. When there are no
positional parameters, '"$@"' and '$@' expand to nothing (i.e.,
they are removed).
($@) Expands to the positional parameters, starting from one. In
contexts where word splitting is performed, this expands each
positional parameter to a separate word; if not within double
quotes, these words are subject to word splitting. In contexts
where word splitting is not performed, this expands to a single
word with each positional parameter separated by a space. When the
expansion occurs within double quotes, and word splitting is
performed, each parameter expands to a separate word. That is,
'"$@"' is equivalent to '"$1" "$2" ...'. If the double-quoted
expansion occurs within a word, the expansion of the first
parameter is joined with the beginning part of the original word,
and the expansion of the last parameter is joined with the last
part of the original word. When there are no positional
parameters, '"$@"' and '$@' expand to nothing (i.e., they are
removed).
'#'
($#) Expands to the number of positional parameters in decimal.
@@ -3662,8 +3679,8 @@ standard.
Exit a login shell, returning a status of N to the shell's parent.
'mapfile'
mapfile [-d DELIM] [-n COUNT] [-O ORIGIN] [-s COUNT] [-t] [-u FD]
[-C CALLBACK] [-c QUANTUM] [ARRAY]
mapfile [-d DELIM] [-n COUNT] [-O ORIGIN] [-s COUNT]
[-t] [-u FD] [-C CALLBACK] [-c QUANTUM] [ARRAY]
Read lines from the standard input into the indexed array variable
ARRAY, or from file descriptor FD if the '-u' option is supplied.
@@ -3846,8 +3863,8 @@ standard.
Read input from file descriptor FD.
'readarray'
readarray [-d DELIM] [-n COUNT] [-O ORIGIN] [-s COUNT] [-t] [-u FD]
[-C CALLBACK] [-c QUANTUM] [ARRAY]
readarray [-d DELIM] [-n COUNT] [-O ORIGIN] [-s COUNT]
[-t] [-u FD] [-C CALLBACK] [-c QUANTUM] [ARRAY]
Read lines from the standard input into the indexed array variable
ARRAY, or from file descriptor FD if the '-u' option is supplied.
@@ -5228,7 +5245,7 @@ Variables::).
as the sole input. If set, the value denotes the number of
consecutive 'EOF' characters that can be read as the first
character on an input line before the shell will exit. If the
variable exists but does not have a numeric value (or has no value)
variable exists but does not have a numeric value, or has no value,
then the default is 10. If the variable does not exist, then 'EOF'
signifies the end of input to the shell. This is only in effect
for interactive shells.
@@ -5484,9 +5501,12 @@ File: bash.info, Node: Invoking Bash, Next: Bash Startup Files, Up: Bash Feat
6.1 Invoking Bash
=================
bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o OPTION] [-O SHOPT_OPTION] [ARGUMENT ...]
bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o OPTION] [-O SHOPT_OPTION] -c STRING [ARGUMENT ...]
bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o OPTION] [-O SHOPT_OPTION] [ARGUMENT ...]
bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o OPTION]
[-O SHOPT_OPTION] [ARGUMENT ...]
bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o OPTION]
[-O SHOPT_OPTION] -c STRING [ARGUMENT ...]
bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o OPTION]
[-O SHOPT_OPTION] [ARGUMENT ...]
All of the single-character options used with the 'set' builtin
(*note The Set Builtin::) can be used as options when the shell is
@@ -5832,8 +5852,8 @@ several ways.
9. In the absence of any traps, Bash ignores 'SIGTERM' (*note
Signals::).
10. In the absence of any traps, 'SIGINT' is caught and handled
((*note Signals::). 'SIGINT' will interrupt some shell builtins.
10. In the absence of any traps, 'SIGINT' is caught and handled (*note
Signals::). 'SIGINT' will interrupt some shell builtins.
11. An interactive login shell sends a 'SIGHUP' to all jobs on exit if
the 'huponexit' shell option has been enabled (*note Signals::).
@@ -6453,7 +6473,8 @@ of commands executed during the current shell session.
After the string is decoded, it is expanded via parameter expansion,
command substitution, arithmetic expansion, and quote removal, subject
to the value of the 'promptvars' shell option (*note Bash Builtins::).
to the value of the 'promptvars' shell option (*note The Shopt
Builtin::).

File: bash.info, Node: The Restricted Shell, Next: Bash POSIX Mode, Prev: Controlling the Prompt, Up: Bash Features
@@ -7374,7 +7395,7 @@ Variable Settings
If set to 'on', and COMPLETION-IGNORE-CASE is enabled,
Readline treats hyphens ('-') and underscores ('_') as
equivalent when performing case-insensitive filename matching
and completion.
and completion. The default value is 'off'.
'completion-prefix-display-length'
The length in characters of the common prefix of a list of
@@ -7650,7 +7671,7 @@ Key Bindings
Meta-Rubout: backward-kill-word
Control-o: "> output"
In the above example, 'C-u' is bound to the function
In the example above, 'C-u' is bound to the function
'universal-argument', 'M-DEL' is bound to the function
'backward-kill-word', and 'C-o' is bound to run the macro
expressed on the right hand side (that is, to insert the text
@@ -8141,7 +8162,7 @@ File: bash.info, Node: Commands For Text, Next: Commands For Killing, Prev: C
assigned by default. It allows Readline to insert the pasted text
as a single unit without treating each character as if it had been
read from the keyboard. The characters are inserted as if each one
was bound to 'self-insert') instead of executing any editing
was bound to 'self-insert' instead of executing any editing
commands.
'transpose-chars (C-t)'
@@ -8737,10 +8758,10 @@ happening.
no matches were generated.
'complete'
complete [-abcdefgjksuv] [-o COMP-OPTION] [-DE] [-A ACTION] [-G GLOBPAT] [-W WORDLIST]
[-F FUNCTION] [-C COMMAND] [-X FILTERPAT]
complete [-abcdefgjksuv] [-o COMP-OPTION] [-DEI] [-A ACTION] [-G GLOBPAT]
[-W WORDLIST] [-F FUNCTION] [-C COMMAND] [-X FILTERPAT]
[-P PREFIX] [-S SUFFIX] NAME [NAME ...]
complete -pr [-DE] [NAME ...]
complete -pr [-DEI] [NAME ...]
Specify how arguments to each NAME should be completed. If the
'-p' option is supplied, or if no options are supplied, existing
@@ -8753,10 +8774,16 @@ happening.
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 '-I' option indicates that the remaining options and actions
should apply to completion on the inital non-assignment word on the
line, or after a command delimiter such as ';' or '|', which is
usually command name completion. If multiple options are supplied,
the '-D' option takes precedence over '-E', and both take
precedence over '-I'.
The process of applying these completion specifications when word
completion is attempted is described above (*note Programmable
Completion::). The '-D' option takes precedence over '-E'.
Completion::).
Other options, if specified, have the following meanings. The
arguments to the '-G', '-W', and '-X' options (and, if necessary,
@@ -8783,7 +8810,7 @@ happening.
'filenames'
Tell Readline that the compspec generates filenames, so
it can perform any filename-specific processing (like
adding a slash to directory names quoting special
adding a slash to directory names, quoting special
characters, or suppressing trailing spaces). This option
is intended to be used with shell functions specified
with '-F'.
@@ -8936,7 +8963,7 @@ happening.
completion specification.
'compopt'
compopt [-o OPTION] [-DE] [+o OPTION] [NAME]
compopt [-o OPTION] [-DEI] [+o OPTION] [NAME]
Modify completion options for each NAME according to the OPTIONs,
or for the currently-executing completion if no NAMEs are supplied.
If no OPTIONs are given, display the completion options for each
@@ -8947,9 +8974,13 @@ happening.
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.
blank line. The '-I' option indicates that the remaining options
should apply to completion on the inital non-assignment word on the
line, or after a command delimiter such as ';' or '|', which is
usually command name completion.
The '-D' option takes precedence over '-E'.
If multiple options are supplied, the '-D' option takes precedence
over '-E', and both take precedence over '-I'
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
@@ -8993,7 +9024,7 @@ retrieves the completions from there when the function returns.
local cur _skipdot _cdpath
local i j k
# Tilde expansion, with side effect of expanding tilde to full pathname
# Tilde expansion, which also expands tilde to full pathname
case "$2" in
\~*) eval cur="$2" ;;
*) cur=$2 ;;
@@ -9760,8 +9791,8 @@ and linked, rather than changing run-time features.
'--enable-largefile'
Enable support for large files
(http://www.sas.com/standards/large_file/x_open.20Mar96.html) if
the operating system requires special compiler options to build
(http://www.unix.org/version2/whatsnew/lfs20mar.html) if the
operating system requires special compiler options to build
programs which can access large files. This is enabled by default,
if the operating system provides large file support.
@@ -10881,7 +10912,7 @@ D.1 Index of Shell Builtin Commands
* complete: Programmable Completion Builtins.
(line 30)
* compopt: Programmable Completion Builtins.
(line 229)
(line 235)
* continue: Bourne Shell Builtins.
(line 85)
* declare: Bash Builtins. (line 148)
@@ -10966,9 +10997,9 @@ D.2 Index of Shell Reserved Words
* !: Pipelines. (line 9)
* [[: Conditional Constructs.
(line 122)
(line 124)
* ]]: Conditional Constructs.
(line 122)
(line 124)
* {: Command Grouping. (line 21)
* }: Command Grouping. (line 21)
* case: Conditional Constructs.
@@ -10990,7 +11021,7 @@ D.2 Index of Shell Reserved Words
* in: Conditional Constructs.
(line 28)
* select: Conditional Constructs.
(line 80)
(line 82)
* then: Conditional Constructs.
(line 7)
* time: Pipelines. (line 9)
@@ -11006,24 +11037,24 @@ D.3 Parameter and Variable Index
[index]
* Menu:
* !: Special Parameters. (line 50)
* #: Special Parameters. (line 33)
* $: Special Parameters. (line 45)
* $!: Special Parameters. (line 51)
* $#: Special Parameters. (line 34)
* $$: Special Parameters. (line 46)
* !: Special Parameters. (line 56)
* #: Special Parameters. (line 39)
* $: Special Parameters. (line 51)
* $!: Special Parameters. (line 57)
* $#: Special Parameters. (line 40)
* $$: Special Parameters. (line 52)
* $*: Special Parameters. (line 10)
* $-: Special Parameters. (line 41)
* $0: Special Parameters. (line 56)
* $?: Special Parameters. (line 37)
* $-: Special Parameters. (line 47)
* $0: Special Parameters. (line 62)
* $?: Special Parameters. (line 43)
* $@: Special Parameters. (line 23)
* $_: Special Parameters. (line 65)
* $_: Special Parameters. (line 71)
* *: Special Parameters. (line 9)
* -: Special Parameters. (line 40)
* 0: Special Parameters. (line 55)
* ?: Special Parameters. (line 36)
* -: Special Parameters. (line 46)
* 0: Special Parameters. (line 61)
* ?: Special Parameters. (line 42)
* @: Special Parameters. (line 22)
* _: Special Parameters. (line 64)
* _: Special Parameters. (line 70)
* auto_resume: Job Control Variables.
(line 6)
* BASH: Bash Variables. (line 13)
@@ -11512,7 +11543,7 @@ D.5 Concept Index
* installation: Basic Installation. (line 6)
* interaction, readline: Readline Interaction.
(line 6)
* interactive shell: Invoking Bash. (line 128)
* interactive shell: Invoking Bash. (line 131)
* interactive shell <1>: Interactive Shells. (line 6)
* internationalization: Locale Translation. (line 6)
* job: Definitions. (line 38)
@@ -11523,7 +11554,7 @@ D.5 Concept Index
* killing text: Readline Killing Commands.
(line 6)
* localization: Locale Translation. (line 6)
* login shell: Invoking Bash. (line 125)
* login shell: Invoking Bash. (line 128)
* matching, pattern: Pattern Matching. (line 6)
* metacharacter: Definitions. (line 46)
* name: Definitions. (line 51)
@@ -11584,134 +11615,134 @@ D.5 Concept Index

Tag Table:
Node: Top891
Node: Introduction2805
Node: What is Bash?3021
Node: What is a shell?4135
Node: Definitions6673
Node: Basic Shell Features9624
Node: Shell Syntax10843
Node: Shell Operation11869
Node: Quoting13162
Node: Escape Character14462
Node: Single Quotes14947
Node: Double Quotes15295
Node: ANSI-C Quoting16573
Node: Locale Translation17832
Node: Comments18728
Node: Shell Commands19346
Node: Simple Commands20218
Node: Pipelines20849
Node: Lists23781
Node: Compound Commands25520
Node: Looping Constructs26532
Node: Conditional Constructs29027
Node: Command Grouping40082
Node: Coprocesses41561
Node: GNU Parallel43464
Node: Shell Functions47438
Node: Shell Parameters54521
Node: Positional Parameters58934
Node: Special Parameters59834
Node: Shell Expansions63171
Node: Brace Expansion65294
Node: Tilde Expansion68018
Node: Shell Parameter Expansion70366
Node: Command Substitution84849
Node: Arithmetic Expansion86204
Node: Process Substitution87136
Node: Word Splitting88256
Node: Filename Expansion90200
Node: Pattern Matching92730
Node: Quote Removal96716
Node: Redirections97011
Node: Executing Commands106569
Node: Simple Command Expansion107239
Node: Command Search and Execution109169
Node: Command Execution Environment111545
Node: Environment114529
Node: Exit Status116188
Node: Signals117858
Node: Shell Scripts119825
Node: Shell Builtin Commands122340
Node: Bourne Shell Builtins124378
Node: Bash Builtins145036
Node: Modifying Shell Behavior173944
Node: The Set Builtin174289
Node: The Shopt Builtin184702
Node: Special Builtins201572
Node: Shell Variables202551
Node: Bourne Shell Variables202988
Node: Bash Variables205092
Node: Bash Features235106
Node: Invoking Bash236005
Node: Bash Startup Files241991
Node: Interactive Shells247094
Node: What is an Interactive Shell?247504
Node: Is this Shell Interactive?248153
Node: Interactive Shell Behavior248968
Node: Bash Conditional Expressions252456
Node: Shell Arithmetic256822
Node: Aliases259639
Node: Arrays262187
Node: The Directory Stack267553
Node: Directory Stack Builtins268337
Node: Controlling the Prompt271305
Node: The Restricted Shell274067
Node: Bash POSIX Mode275892
Node: Job Control286243
Node: Job Control Basics286703
Node: Job Control Builtins291671
Node: Job Control Variables296398
Node: Command Line Editing297554
Node: Introduction and Notation299225
Node: Readline Interaction300848
Node: Readline Bare Essentials302039
Node: Readline Movement Commands303822
Node: Readline Killing Commands304782
Node: Readline Arguments306700
Node: Searching307744
Node: Readline Init File309930
Node: Readline Init File Syntax311077
Node: Conditional Init Constructs331448
Node: Sample Init File335644
Node: Bindable Readline Commands338761
Node: Commands For Moving339965
Node: Commands For History341814
Node: Commands For Text346109
Node: Commands For Killing349498
Node: Numeric Arguments351979
Node: Commands For Completion353118
Node: Keyboard Macros357309
Node: Miscellaneous Commands357996
Node: Readline vi Mode363949
Node: Programmable Completion364856
Node: Programmable Completion Builtins372450
Node: A Programmable Completion Example382336
Node: Using History Interactively387587
Node: Bash History Facilities388271
Node: Bash History Builtins391276
Node: History Interaction395807
Node: Event Designators398874
Node: Word Designators400093
Node: Modifiers401730
Node: Installing Bash403132
Node: Basic Installation404269
Node: Compilers and Options407527
Node: Compiling For Multiple Architectures408268
Node: Installation Names409961
Node: Specifying the System Type410779
Node: Sharing Defaults411495
Node: Operation Controls412168
Node: Optional Features413126
Node: Reporting Bugs423652
Node: Major Differences From The Bourne Shell424846
Node: GNU Free Documentation License441698
Node: Indexes466875
Node: Builtin Index467329
Node: Reserved Word Index474156
Node: Variable Index476604
Node: Function Index492282
Node: Concept Index505585
Node: Top887
Node: Introduction2797
Node: What is Bash?3013
Node: What is a shell?4127
Node: Definitions6665
Node: Basic Shell Features9616
Node: Shell Syntax10835
Node: Shell Operation11861
Node: Quoting13154
Node: Escape Character14454
Node: Single Quotes14939
Node: Double Quotes15287
Node: ANSI-C Quoting16565
Node: Locale Translation17824
Node: Comments18720
Node: Shell Commands19338
Node: Simple Commands20210
Node: Pipelines20841
Node: Lists23773
Node: Compound Commands25512
Node: Looping Constructs26524
Node: Conditional Constructs29019
Node: Command Grouping40099
Node: Coprocesses41578
Node: GNU Parallel43481
Node: Shell Functions47539
Node: Shell Parameters54622
Node: Positional Parameters59035
Node: Special Parameters59935
Node: Shell Expansions63649
Node: Brace Expansion65772
Node: Tilde Expansion68496
Node: Shell Parameter Expansion70844
Node: Command Substitution85327
Node: Arithmetic Expansion86682
Node: Process Substitution87614
Node: Word Splitting88734
Node: Filename Expansion90678
Node: Pattern Matching93208
Node: Quote Removal97194
Node: Redirections97489
Node: Executing Commands107047
Node: Simple Command Expansion107717
Node: Command Search and Execution109647
Node: Command Execution Environment112023
Node: Environment115007
Node: Exit Status116666
Node: Signals118336
Node: Shell Scripts120303
Node: Shell Builtin Commands122818
Node: Bourne Shell Builtins124856
Node: Bash Builtins145514
Node: Modifying Shell Behavior174422
Node: The Set Builtin174767
Node: The Shopt Builtin185180
Node: Special Builtins202050
Node: Shell Variables203029
Node: Bourne Shell Variables203466
Node: Bash Variables205570
Node: Bash Features235584
Node: Invoking Bash236483
Node: Bash Startup Files242496
Node: Interactive Shells247599
Node: What is an Interactive Shell?248009
Node: Is this Shell Interactive?248658
Node: Interactive Shell Behavior249473
Node: Bash Conditional Expressions252960
Node: Shell Arithmetic257326
Node: Aliases260143
Node: Arrays262691
Node: The Directory Stack268057
Node: Directory Stack Builtins268841
Node: Controlling the Prompt271809
Node: The Restricted Shell274575
Node: Bash POSIX Mode276400
Node: Job Control286751
Node: Job Control Basics287211
Node: Job Control Builtins292179
Node: Job Control Variables296906
Node: Command Line Editing298062
Node: Introduction and Notation299733
Node: Readline Interaction301356
Node: Readline Bare Essentials302547
Node: Readline Movement Commands304330
Node: Readline Killing Commands305290
Node: Readline Arguments307208
Node: Searching308252
Node: Readline Init File310438
Node: Readline Init File Syntax311585
Node: Conditional Init Constructs331985
Node: Sample Init File336181
Node: Bindable Readline Commands339298
Node: Commands For Moving340502
Node: Commands For History342351
Node: Commands For Text346646
Node: Commands For Killing350034
Node: Numeric Arguments352515
Node: Commands For Completion353654
Node: Keyboard Macros357845
Node: Miscellaneous Commands358532
Node: Readline vi Mode364485
Node: Programmable Completion365392
Node: Programmable Completion Builtins372986
Node: A Programmable Completion Example383514
Node: Using History Interactively388754
Node: Bash History Facilities389438
Node: Bash History Builtins392443
Node: History Interaction396974
Node: Event Designators400041
Node: Word Designators401260
Node: Modifiers402897
Node: Installing Bash404299
Node: Basic Installation405436
Node: Compilers and Options408694
Node: Compiling For Multiple Architectures409435
Node: Installation Names411128
Node: Specifying the System Type411946
Node: Sharing Defaults412662
Node: Operation Controls413335
Node: Optional Features414293
Node: Reporting Bugs424811
Node: Major Differences From The Bourne Shell426005
Node: GNU Free Documentation License442857
Node: Indexes468034
Node: Builtin Index468488
Node: Reserved Word Index475315
Node: Variable Index477763
Node: Function Index493441
Node: Concept Index506744

End Tag Table
BIN
View File
Binary file not shown.
+5350 -5319
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+66 -33
View File
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This text is a brief description of the features that are present in
the Bash shell (version 5.0, 15 March 2018).
the Bash shell (version 5.0, 8 June 2018).
This is Edition 5.0, last updated 15 March 2018,
This is Edition 5.0, last updated 8 June 2018,
of The GNU Bash Reference Manual,
for Bash, Version 5.0.
@@ -284,10 +284,10 @@ Next: <a href="#Introduction" accesskey="n" rel="next">Introduction</a>, Previou
<h1 class="top">Bash Features</h1>
<p>This text is a brief description of the features that are present in
the Bash shell (version 5.0, 15 March 2018).
the Bash shell (version 5.0, 8 June 2018).
The Bash home page is <a href="http://www.gnu.org/software/bash/">http://www.gnu.org/software/bash/</a>.
</p>
<p>This is Edition 5.0, last updated 15 March 2018,
<p>This is Edition 5.0, last updated 8 June 2018,
of <cite>The GNU Bash Reference Manual</cite>,
for <code>Bash</code>, Version 5.0.
</p>
@@ -1297,7 +1297,9 @@ zero if no condition tested true.
<p>The syntax of the <code>case</code> command is:
</p>
<div class="example">
<pre class="example">case <var>word</var> in [ [(] <var>pattern</var> [| <var>pattern</var>]&hellip;) <var>command-list</var> ;;]&hellip; esac
<pre class="example">case <var>word</var> in
[ [(] <var>pattern</var> [| <var>pattern</var>]&hellip;) <var>command-list</var> ;;]&hellip;
esac
</pre></div>
<p><code>case</code> will selectively execute the <var>command-list</var> corresponding to
@@ -1443,7 +1445,7 @@ If the <code>nocasematch</code> shell option
is enabled, the match is performed without regard to the case
of alphabetic characters.
The return value is 0 if the string matches (&lsquo;<samp>==</samp>&rsquo;) or does not
match (&lsquo;<samp>!=</samp>&rsquo;)the pattern, and 1 otherwise.
match (&lsquo;<samp>!=</samp>&rsquo;) the pattern, and 1 otherwise.
Any part of the pattern may be quoted to force the quoted portion
to be matched as a string.
</p>
@@ -1722,7 +1724,8 @@ from a file (in this case, filenames listed one per line):
<p>with a more compact syntax reminiscent of lambdas:
</p><div class="example">
<pre class="example">cat list | parallel &quot;do-something1 {} config-{} ; do-something2 &lt; {}&quot; | process-output
<pre class="example">cat list | parallel &quot;do-something1 {} config-{} ; do-something2 &lt; {}&quot; |
process-output
</pre></div>
<p>Parallel provides a built-in mechanism to remove filename extensions, which
@@ -1744,12 +1747,20 @@ written as
<p>If a command generates output, you may want to preserve the input order in
the output. For instance, the following command
</p><div class="example">
<pre class="example">{ echo foss.org.my ; echo debian.org; echo freenetproject.org; } | parallel traceroute
<pre class="example">{
echo foss.org.my ;
echo debian.org ;
echo freenetproject.org ;
} | parallel traceroute
</pre></div>
<p>will display as output the traceroute invocation that finishes first.
Adding the <samp>-k</samp> option
</p><div class="example">
<pre class="example">{ echo foss.org.my ; echo debian.org; echo freenetproject.org; } | parallel -k traceroute
<pre class="example">{
echo foss.org.my ;
echo debian.org ;
echo freenetproject.org ;
} | parallel -k traceroute
</pre></div>
<p>will ensure that the output of <code>traceroute foss.org.my</code> is displayed first.
</p>
@@ -2126,8 +2137,16 @@ separators.
<a name="index-_0040"></a>
</dt>
<dd><a name="index-_0024_0040"></a>
<p>($@) Expands to the positional parameters, starting from one. When the
expansion occurs within double quotes, each parameter expands to a
<p>($@) Expands to the positional parameters, starting from one.
In contexts where word splitting is performed, this expands each
positional parameter to a separate word; if not within double
quotes, these words are subject to word splitting.
In contexts where word splitting is not performed,
this expands to a single word
with each positional parameter separated by a space.
When the
expansion occurs within double quotes, and word splitting is performed,
each parameter expands to a
separate word. That is, <code>&quot;$@&quot;</code> is equivalent to
<code>&quot;$1&quot; &quot;$2&quot; &hellip;</code>.
If the double-quoted expansion occurs within a word, the expansion of
@@ -5078,8 +5097,8 @@ parent.
<dt><code>mapfile</code></dt>
<dd><a name="index-mapfile"></a>
<div class="example">
<pre class="example">mapfile [-d <var>delim</var>] [-n <var>count</var>] [-O <var>origin</var>] [-s <var>count</var>] [-t] [-u <var>fd</var>]
[-C <var>callback</var>] [-c <var>quantum</var>] [<var>array</var>]
<pre class="example">mapfile [-d <var>delim</var>] [-n <var>count</var>] [-O <var>origin</var>] [-s <var>count</var>]
[-t] [-u <var>fd</var>] [-C <var>callback</var>] [-c <var>quantum</var>] [<var>array</var>]
</pre></div>
<p>Read lines from the standard input into the indexed array variable <var>array</var>,
@@ -5309,8 +5328,8 @@ The exit status is greater than 128 if the timeout is exceeded.
<dt><code>readarray</code></dt>
<dd><a name="index-readarray"></a>
<div class="example">
<pre class="example">readarray [-d <var>delim</var>] [-n <var>count</var>] [-O <var>origin</var>] [-s <var>count</var>] [-t] [-u <var>fd</var>]
[-C <var>callback</var>] [-c <var>quantum</var>] [<var>array</var>]
<pre class="example">readarray [-d <var>delim</var>] [-n <var>count</var>] [-O <var>origin</var>] [-s <var>count</var>]
[-t] [-u <var>fd</var>] [-C <var>callback</var>] [-c <var>quantum</var>] [<var>array</var>]
</pre></div>
<p>Read lines from the standard input into the indexed array variable <var>array</var>,
@@ -7180,7 +7199,7 @@ as the sole input. If set, the value denotes the number
of consecutive <code>EOF</code> characters that can be read as the
first character on an input line
before the shell will exit. If the variable exists but does not
have a numeric value (or has no value) then the default is 10.
have a numeric value, or has no value, then the default is 10.
If the variable does not exist, then <code>EOF</code> signifies the end of
input to the shell. This is only in effect for interactive shells.
</p>
@@ -7583,9 +7602,12 @@ Next: <a href="#Bash-Startup-Files" accesskey="n" rel="next">Bash Startup Files<
<h3 class="section">6.1 Invoking Bash</h3>
<div class="example">
<pre class="example">bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o <var>option</var>] [-O <var>shopt_option</var>] [<var>argument</var> &hellip;]
bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o <var>option</var>] [-O <var>shopt_option</var>] -c <var>string</var> [<var>argument</var> &hellip;]
bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o <var>option</var>] [-O <var>shopt_option</var>] [<var>argument</var> &hellip;]
<pre class="example">bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o <var>option</var>]
[-O <var>shopt_option</var>] [<var>argument</var> &hellip;]
bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o <var>option</var>]
[-O <var>shopt_option</var>] -c <var>string</var> [<var>argument</var> &hellip;]
bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o <var>option</var>]
[-O <var>shopt_option</var>] [<var>argument</var> &hellip;]
</pre></div>
<p>All of the single-character options used with the <code>set</code> builtin
@@ -8014,7 +8036,7 @@ when a shell with history enabled exits.
(see <a href="#Signals">Signals</a>).
</li><li> In the absence of any traps, <code>SIGINT</code> is caught and handled
((see <a href="#Signals">Signals</a>).
(see <a href="#Signals">Signals</a>).
<code>SIGINT</code> will interrupt some shell builtins.
</li><li> An interactive login shell sends a <code>SIGHUP</code> to all jobs on exit
@@ -8843,7 +8865,7 @@ shell session.
<p>After the string is decoded, it is expanded via
parameter expansion, command substitution, arithmetic
expansion, and quote removal, subject to the value of the
<code>promptvars</code> shell option (see <a href="#Bash-Builtins">Bash Builtins</a>).
<code>promptvars</code> shell option (see <a href="#The-Shopt-Builtin">The Shopt Builtin</a>).
</p>
<hr>
<a name="The-Restricted-Shell"></a>
@@ -10004,6 +10026,7 @@ The default value is &lsquo;<samp>off</samp>&rsquo;.
<p>If set to &lsquo;<samp>on</samp>&rsquo;, and <var>completion-ignore-case</var> is enabled, Readline
treats hyphens (&lsquo;<samp>-</samp>&rsquo;) and underscores (&lsquo;<samp>_</samp>&rsquo;) as equivalent when
performing case-insensitive filename matching and completion.
The default value is &lsquo;<samp>off</samp>&rsquo;.
</p>
</dd>
<dt><code>completion-prefix-display-length</code></dt>
@@ -10365,7 +10388,7 @@ Meta-Rubout: backward-kill-word
Control-o: &quot;&gt; output&quot;
</pre></div>
<p>In the above example, <kbd>C-u</kbd> is bound to the function
<p>In the example above, <kbd>C-u</kbd> is bound to the function
<code>universal-argument</code>,
<kbd>M-DEL</kbd> is bound to the function <code>backward-kill-word</code>, and
<kbd>C-o</kbd> is bound to run the macro
@@ -11068,7 +11091,7 @@ how to insert key sequences like <kbd>C-q</kbd>, for example.
sequence sent by some terminals, and such a binding is assigned by default.
It allows Readline to insert the pasted text as a single unit without treating
each character as if it had been read from the keyboard. The characters
are inserted as if each one was bound to <code>self-insert</code>) instead of
are inserted as if each one was bound to <code>self-insert</code> instead of
executing any editing commands.
</p>
</dd>
@@ -11973,10 +11996,10 @@ matches were generated.
<dt><code>complete</code></dt>
<dd><a name="index-complete"></a>
<div class="example">
<pre class="example"><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>]
<pre class="example"><code>complete [-abcdefgjksuv] [-o <var>comp-option</var>] [-DEI] [-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> &hellip;]</code>
<code>complete -pr [-DE] [<var>name</var> &hellip;]</code>
<code>complete -pr [-DEI] [<var>name</var> &hellip;]</code>
</pre></div>
<p>Specify how arguments to each <var>name</var> should be completed.
@@ -11992,10 +12015,15 @@ 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 &ldquo;empty&rdquo; command completion; that is, completion attempted on a
blank line.
The <samp>-I</samp> option indicates that the remaining options and actions should
apply to completion on the inital non-assignment word on the line, or after a
command delimiter such as &lsquo;<samp>;</samp>&rsquo; or &lsquo;<samp>|</samp>&rsquo;, which is usually command
name completion.
If multiple options are supplied, the <samp>-D</samp> option takes precedence
over <samp>-E</samp>, and both take precedence over <samp>-I</samp>.
</p>
<p>The process of applying these completion specifications when word completion
is attempted is described above (see <a href="#Programmable-Completion">Programmable Completion</a>). The
<samp>-D</samp> option takes precedence over <samp>-E</samp>.
is attempted is described above (see <a href="#Programmable-Completion">Programmable Completion</a>).
</p>
<p>Other options, if specified, have the following meanings.
The arguments to the <samp>-G</samp>, <samp>-W</samp>, and <samp>-X</samp> options
@@ -12027,7 +12055,7 @@ no matches.
</dd>
<dt><code>filenames</code></dt>
<dd><p>Tell Readline that the compspec generates filenames, so it can perform any
filename-specific processing (like adding a slash to directory names
filename-specific processing (like adding a slash to directory names,
quoting special characters, or suppressing trailing spaces).
This option is intended to be used with shell functions specified
with <samp>-F</samp>.
@@ -12221,7 +12249,7 @@ an error occurs adding a completion specification.
<dt><code>compopt</code></dt>
<dd><a name="index-compopt"></a>
<div class="example">
<pre class="example"><code>compopt</code> [-o <var>option</var>] [-DE] [+o <var>option</var>] [<var>name</var>]
<pre class="example"><code>compopt</code> [-o <var>option</var>] [-DEI] [+o <var>option</var>] [<var>name</var>]
</pre></div>
<p>Modify completion options for each <var>name</var> according to the
<var>option</var>s, or for the currently-executing completion if no <var>name</var>s
@@ -12236,8 +12264,13 @@ on a command for which no completion has previously been defined.
The <samp>-E</samp> option indicates that the remaining options should
apply to &ldquo;empty&rdquo; command completion; that is, completion attempted on a
blank line.
The <samp>-I</samp> option indicates that the remaining options should
apply to completion on the inital non-assignment word on the line, or after a
command delimiter such as &lsquo;<samp>;</samp>&rsquo; or &lsquo;<samp>|</samp>&rsquo;, which is usually command
name completion.
</p>
<p>The <samp>-D</samp> option takes precedence over <samp>-E</samp>.
<p>If multiple options are supplied, the <samp>-D</samp> option takes precedence
over <samp>-E</samp>, and both take precedence over <samp>-I</samp>
</p>
<p>The return value is true unless an invalid option is supplied, an attempt
is made to modify the options for a <var>name</var> for which no completion
@@ -12291,7 +12324,7 @@ _comp_cd()
local cur _skipdot _cdpath
local i j k
# Tilde expansion, with side effect of expanding tilde to full pathname
# Tilde expansion, which also expands tilde to full pathname
case &quot;$2&quot; in
\~*) eval cur=&quot;$2&quot; ;;
*) cur=$2 ;;
@@ -13285,7 +13318,7 @@ compiled and linked, rather than changing run-time features.
</p>
<dl compact="compact">
<dt><code>--enable-largefile</code></dt>
<dd><p>Enable support for <a href="http://www.sas.com/standards/large_file/x_open.20Mar96.html">large files</a> if the operating system requires special compiler options
<dd><p>Enable support for <a href="http://www.unix.org/version2/whatsnew/lfs20mar.html">large files</a> if the operating system requires special compiler options
to build programs which can access large files. This is enabled by
default, if the operating system provides large file support.
</p>
+224 -193
View File
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 6.5 from
bashref.texi.
This text is a brief description of the features that are present in the
Bash shell (version 5.0, 15 March 2018).
Bash shell (version 5.0, 8 June 2018).
This is Edition 5.0, last updated 15 March 2018, of 'The GNU Bash
This is Edition 5.0, last updated 8 June 2018, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.0.
Copyright (C) 1988-2018 Free Software Foundation, Inc.
@@ -27,10 +27,10 @@ Bash Features
*************
This text is a brief description of the features that are present in the
Bash shell (version 5.0, 15 March 2018). The Bash home page is
Bash shell (version 5.0, 8 June 2018). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.0, last updated 15 March 2018, of 'The GNU Bash
This is Edition 5.0, last updated 8 June 2018, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.0.
Bash contains features that appear in other popular shells, and some
@@ -768,7 +768,9 @@ File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Pre
'case'
The syntax of the 'case' command is:
case WORD in [ [(] PATTERN [| PATTERN]...) COMMAND-LIST ;;]... esac
case WORD in
[ [(] PATTERN [| PATTERN]...) COMMAND-LIST ;;]...
esac
'case' will selectively execute the COMMAND-LIST corresponding to
the first PATTERN that matches WORD. The match is performed
@@ -883,8 +885,8 @@ File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Pre
'shopt' in *note The Shopt Builtin::) is enabled, the match is
performed without regard to the case of alphabetic characters. The
return value is 0 if the string matches ('==') or does not match
('!=')the pattern, and 1 otherwise. Any part of the pattern may be
quoted to force the quoted portion to be matched as a string.
('!=') the pattern, and 1 otherwise. Any part of the pattern may
be quoted to force the quoted portion to be matched as a string.
An additional binary operator, '=~', is available, with the same
precedence as '==' and '!='. When it is used, the string to the
@@ -1103,7 +1105,8 @@ read from a file (in this case, filenames listed one per line):
done < file | process-output
with a more compact syntax reminiscent of lambdas:
cat list | parallel "do-something1 {} config-{} ; do-something2 < {}" | process-output
cat list | parallel "do-something1 {} config-{} ; do-something2 < {}" |
process-output
Parallel provides a built-in mechanism to remove filename extensions,
which lends itself to batch file transformations or renaming:
@@ -1118,10 +1121,18 @@ take arguments from the command line; the above can also be written as
If a command generates output, you may want to preserve the input
order in the output. For instance, the following command
{ echo foss.org.my ; echo debian.org; echo freenetproject.org; } | parallel traceroute
{
echo foss.org.my ;
echo debian.org ;
echo freenetproject.org ;
} | parallel traceroute
will display as output the traceroute invocation that finishes first.
Adding the '-k' option
{ echo foss.org.my ; echo debian.org; echo freenetproject.org; } | parallel -k traceroute
{
echo foss.org.my ;
echo debian.org ;
echo freenetproject.org ;
} | parallel -k traceroute
will ensure that the output of 'traceroute foss.org.my' is displayed
first.
@@ -1406,15 +1417,21 @@ only be referenced; assignment to them is not allowed.
is null, the parameters are joined without intervening separators.
'@'
($@) Expands to the positional parameters, starting from one. When
the expansion occurs within double quotes, each parameter expands
to a separate word. That is, '"$@"' is equivalent to '"$1" "$2"
...'. If the double-quoted expansion occurs within a word, the
expansion of the first parameter is joined with the beginning part
of the original word, and the expansion of the last parameter is
joined with the last part of the original word. When there are no
positional parameters, '"$@"' and '$@' expand to nothing (i.e.,
they are removed).
($@) Expands to the positional parameters, starting from one. In
contexts where word splitting is performed, this expands each
positional parameter to a separate word; if not within double
quotes, these words are subject to word splitting. In contexts
where word splitting is not performed, this expands to a single
word with each positional parameter separated by a space. When the
expansion occurs within double quotes, and word splitting is
performed, each parameter expands to a separate word. That is,
'"$@"' is equivalent to '"$1" "$2" ...'. If the double-quoted
expansion occurs within a word, the expansion of the first
parameter is joined with the beginning part of the original word,
and the expansion of the last parameter is joined with the last
part of the original word. When there are no positional
parameters, '"$@"' and '$@' expand to nothing (i.e., they are
removed).
'#'
($#) Expands to the number of positional parameters in decimal.
@@ -3662,8 +3679,8 @@ standard.
Exit a login shell, returning a status of N to the shell's parent.
'mapfile'
mapfile [-d DELIM] [-n COUNT] [-O ORIGIN] [-s COUNT] [-t] [-u FD]
[-C CALLBACK] [-c QUANTUM] [ARRAY]
mapfile [-d DELIM] [-n COUNT] [-O ORIGIN] [-s COUNT]
[-t] [-u FD] [-C CALLBACK] [-c QUANTUM] [ARRAY]
Read lines from the standard input into the indexed array variable
ARRAY, or from file descriptor FD if the '-u' option is supplied.
@@ -3846,8 +3863,8 @@ standard.
Read input from file descriptor FD.
'readarray'
readarray [-d DELIM] [-n COUNT] [-O ORIGIN] [-s COUNT] [-t] [-u FD]
[-C CALLBACK] [-c QUANTUM] [ARRAY]
readarray [-d DELIM] [-n COUNT] [-O ORIGIN] [-s COUNT]
[-t] [-u FD] [-C CALLBACK] [-c QUANTUM] [ARRAY]
Read lines from the standard input into the indexed array variable
ARRAY, or from file descriptor FD if the '-u' option is supplied.
@@ -5228,7 +5245,7 @@ Variables::).
as the sole input. If set, the value denotes the number of
consecutive 'EOF' characters that can be read as the first
character on an input line before the shell will exit. If the
variable exists but does not have a numeric value (or has no value)
variable exists but does not have a numeric value, or has no value,
then the default is 10. If the variable does not exist, then 'EOF'
signifies the end of input to the shell. This is only in effect
for interactive shells.
@@ -5484,9 +5501,12 @@ File: bashref.info, Node: Invoking Bash, Next: Bash Startup Files, Up: Bash F
6.1 Invoking Bash
=================
bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o OPTION] [-O SHOPT_OPTION] [ARGUMENT ...]
bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o OPTION] [-O SHOPT_OPTION] -c STRING [ARGUMENT ...]
bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o OPTION] [-O SHOPT_OPTION] [ARGUMENT ...]
bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o OPTION]
[-O SHOPT_OPTION] [ARGUMENT ...]
bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o OPTION]
[-O SHOPT_OPTION] -c STRING [ARGUMENT ...]
bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o OPTION]
[-O SHOPT_OPTION] [ARGUMENT ...]
All of the single-character options used with the 'set' builtin
(*note The Set Builtin::) can be used as options when the shell is
@@ -5832,8 +5852,8 @@ several ways.
9. In the absence of any traps, Bash ignores 'SIGTERM' (*note
Signals::).
10. In the absence of any traps, 'SIGINT' is caught and handled
((*note Signals::). 'SIGINT' will interrupt some shell builtins.
10. In the absence of any traps, 'SIGINT' is caught and handled (*note
Signals::). 'SIGINT' will interrupt some shell builtins.
11. An interactive login shell sends a 'SIGHUP' to all jobs on exit if
the 'huponexit' shell option has been enabled (*note Signals::).
@@ -6453,7 +6473,8 @@ of commands executed during the current shell session.
After the string is decoded, it is expanded via parameter expansion,
command substitution, arithmetic expansion, and quote removal, subject
to the value of the 'promptvars' shell option (*note Bash Builtins::).
to the value of the 'promptvars' shell option (*note The Shopt
Builtin::).

File: bashref.info, Node: The Restricted Shell, Next: Bash POSIX Mode, Prev: Controlling the Prompt, Up: Bash Features
@@ -7374,7 +7395,7 @@ Variable Settings
If set to 'on', and COMPLETION-IGNORE-CASE is enabled,
Readline treats hyphens ('-') and underscores ('_') as
equivalent when performing case-insensitive filename matching
and completion.
and completion. The default value is 'off'.
'completion-prefix-display-length'
The length in characters of the common prefix of a list of
@@ -7650,7 +7671,7 @@ Key Bindings
Meta-Rubout: backward-kill-word
Control-o: "> output"
In the above example, 'C-u' is bound to the function
In the example above, 'C-u' is bound to the function
'universal-argument', 'M-DEL' is bound to the function
'backward-kill-word', and 'C-o' is bound to run the macro
expressed on the right hand side (that is, to insert the text
@@ -8141,7 +8162,7 @@ File: bashref.info, Node: Commands For Text, Next: Commands For Killing, Prev
assigned by default. It allows Readline to insert the pasted text
as a single unit without treating each character as if it had been
read from the keyboard. The characters are inserted as if each one
was bound to 'self-insert') instead of executing any editing
was bound to 'self-insert' instead of executing any editing
commands.
'transpose-chars (C-t)'
@@ -8737,10 +8758,10 @@ happening.
no matches were generated.
'complete'
complete [-abcdefgjksuv] [-o COMP-OPTION] [-DE] [-A ACTION] [-G GLOBPAT] [-W WORDLIST]
[-F FUNCTION] [-C COMMAND] [-X FILTERPAT]
complete [-abcdefgjksuv] [-o COMP-OPTION] [-DEI] [-A ACTION] [-G GLOBPAT]
[-W WORDLIST] [-F FUNCTION] [-C COMMAND] [-X FILTERPAT]
[-P PREFIX] [-S SUFFIX] NAME [NAME ...]
complete -pr [-DE] [NAME ...]
complete -pr [-DEI] [NAME ...]
Specify how arguments to each NAME should be completed. If the
'-p' option is supplied, or if no options are supplied, existing
@@ -8753,10 +8774,16 @@ happening.
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 '-I' option indicates that the remaining options and actions
should apply to completion on the inital non-assignment word on the
line, or after a command delimiter such as ';' or '|', which is
usually command name completion. If multiple options are supplied,
the '-D' option takes precedence over '-E', and both take
precedence over '-I'.
The process of applying these completion specifications when word
completion is attempted is described above (*note Programmable
Completion::). The '-D' option takes precedence over '-E'.
Completion::).
Other options, if specified, have the following meanings. The
arguments to the '-G', '-W', and '-X' options (and, if necessary,
@@ -8783,7 +8810,7 @@ happening.
'filenames'
Tell Readline that the compspec generates filenames, so
it can perform any filename-specific processing (like
adding a slash to directory names quoting special
adding a slash to directory names, quoting special
characters, or suppressing trailing spaces). This option
is intended to be used with shell functions specified
with '-F'.
@@ -8936,7 +8963,7 @@ happening.
completion specification.
'compopt'
compopt [-o OPTION] [-DE] [+o OPTION] [NAME]
compopt [-o OPTION] [-DEI] [+o OPTION] [NAME]
Modify completion options for each NAME according to the OPTIONs,
or for the currently-executing completion if no NAMEs are supplied.
If no OPTIONs are given, display the completion options for each
@@ -8947,9 +8974,13 @@ happening.
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.
blank line. The '-I' option indicates that the remaining options
should apply to completion on the inital non-assignment word on the
line, or after a command delimiter such as ';' or '|', which is
usually command name completion.
The '-D' option takes precedence over '-E'.
If multiple options are supplied, the '-D' option takes precedence
over '-E', and both take precedence over '-I'
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
@@ -8993,7 +9024,7 @@ retrieves the completions from there when the function returns.
local cur _skipdot _cdpath
local i j k
# Tilde expansion, with side effect of expanding tilde to full pathname
# Tilde expansion, which also expands tilde to full pathname
case "$2" in
\~*) eval cur="$2" ;;
*) cur=$2 ;;
@@ -9760,8 +9791,8 @@ and linked, rather than changing run-time features.
'--enable-largefile'
Enable support for large files
(http://www.sas.com/standards/large_file/x_open.20Mar96.html) if
the operating system requires special compiler options to build
(http://www.unix.org/version2/whatsnew/lfs20mar.html) if the
operating system requires special compiler options to build
programs which can access large files. This is enabled by default,
if the operating system provides large file support.
@@ -10881,7 +10912,7 @@ D.1 Index of Shell Builtin Commands
* complete: Programmable Completion Builtins.
(line 30)
* compopt: Programmable Completion Builtins.
(line 229)
(line 235)
* continue: Bourne Shell Builtins.
(line 85)
* declare: Bash Builtins. (line 148)
@@ -10966,9 +10997,9 @@ D.2 Index of Shell Reserved Words
* !: Pipelines. (line 9)
* [[: Conditional Constructs.
(line 122)
(line 124)
* ]]: Conditional Constructs.
(line 122)
(line 124)
* {: Command Grouping. (line 21)
* }: Command Grouping. (line 21)
* case: Conditional Constructs.
@@ -10990,7 +11021,7 @@ D.2 Index of Shell Reserved Words
* in: Conditional Constructs.
(line 28)
* select: Conditional Constructs.
(line 80)
(line 82)
* then: Conditional Constructs.
(line 7)
* time: Pipelines. (line 9)
@@ -11006,24 +11037,24 @@ D.3 Parameter and Variable Index
[index]
* Menu:
* !: Special Parameters. (line 50)
* #: Special Parameters. (line 33)
* $: Special Parameters. (line 45)
* $!: Special Parameters. (line 51)
* $#: Special Parameters. (line 34)
* $$: Special Parameters. (line 46)
* !: Special Parameters. (line 56)
* #: Special Parameters. (line 39)
* $: Special Parameters. (line 51)
* $!: Special Parameters. (line 57)
* $#: Special Parameters. (line 40)
* $$: Special Parameters. (line 52)
* $*: Special Parameters. (line 10)
* $-: Special Parameters. (line 41)
* $0: Special Parameters. (line 56)
* $?: Special Parameters. (line 37)
* $-: Special Parameters. (line 47)
* $0: Special Parameters. (line 62)
* $?: Special Parameters. (line 43)
* $@: Special Parameters. (line 23)
* $_: Special Parameters. (line 65)
* $_: Special Parameters. (line 71)
* *: Special Parameters. (line 9)
* -: Special Parameters. (line 40)
* 0: Special Parameters. (line 55)
* ?: Special Parameters. (line 36)
* -: Special Parameters. (line 46)
* 0: Special Parameters. (line 61)
* ?: Special Parameters. (line 42)
* @: Special Parameters. (line 22)
* _: Special Parameters. (line 64)
* _: Special Parameters. (line 70)
* auto_resume: Job Control Variables.
(line 6)
* BASH: Bash Variables. (line 13)
@@ -11512,7 +11543,7 @@ D.5 Concept Index
* installation: Basic Installation. (line 6)
* interaction, readline: Readline Interaction.
(line 6)
* interactive shell: Invoking Bash. (line 128)
* interactive shell: Invoking Bash. (line 131)
* interactive shell <1>: Interactive Shells. (line 6)
* internationalization: Locale Translation. (line 6)
* job: Definitions. (line 38)
@@ -11523,7 +11554,7 @@ D.5 Concept Index
* killing text: Readline Killing Commands.
(line 6)
* localization: Locale Translation. (line 6)
* login shell: Invoking Bash. (line 125)
* login shell: Invoking Bash. (line 128)
* matching, pattern: Pattern Matching. (line 6)
* metacharacter: Definitions. (line 46)
* name: Definitions. (line 51)
@@ -11584,134 +11615,134 @@ D.5 Concept Index

Tag Table:
Node: Top891
Node: Introduction2805
Node: What is Bash?3021
Node: What is a shell?4135
Node: Definitions6673
Node: Basic Shell Features9624
Node: Shell Syntax10843
Node: Shell Operation11869
Node: Quoting13162
Node: Escape Character14462
Node: Single Quotes14947
Node: Double Quotes15295
Node: ANSI-C Quoting16573
Node: Locale Translation17832
Node: Comments18728
Node: Shell Commands19346
Node: Simple Commands20218
Node: Pipelines20849
Node: Lists23781
Node: Compound Commands25520
Node: Looping Constructs26532
Node: Conditional Constructs29027
Node: Command Grouping40082
Node: Coprocesses41561
Node: GNU Parallel43464
Node: Shell Functions47438
Node: Shell Parameters54521
Node: Positional Parameters58934
Node: Special Parameters59834
Node: Shell Expansions63171
Node: Brace Expansion65294
Node: Tilde Expansion68018
Node: Shell Parameter Expansion70366
Node: Command Substitution84849
Node: Arithmetic Expansion86204
Node: Process Substitution87136
Node: Word Splitting88256
Node: Filename Expansion90200
Node: Pattern Matching92730
Node: Quote Removal96716
Node: Redirections97011
Node: Executing Commands106569
Node: Simple Command Expansion107239
Node: Command Search and Execution109169
Node: Command Execution Environment111545
Node: Environment114529
Node: Exit Status116188
Node: Signals117858
Node: Shell Scripts119825
Node: Shell Builtin Commands122340
Node: Bourne Shell Builtins124378
Node: Bash Builtins145036
Node: Modifying Shell Behavior173944
Node: The Set Builtin174289
Node: The Shopt Builtin184702
Node: Special Builtins201572
Node: Shell Variables202551
Node: Bourne Shell Variables202988
Node: Bash Variables205092
Node: Bash Features235106
Node: Invoking Bash236005
Node: Bash Startup Files241991
Node: Interactive Shells247094
Node: What is an Interactive Shell?247504
Node: Is this Shell Interactive?248153
Node: Interactive Shell Behavior248968
Node: Bash Conditional Expressions252456
Node: Shell Arithmetic256822
Node: Aliases259639
Node: Arrays262187
Node: The Directory Stack267553
Node: Directory Stack Builtins268337
Node: Controlling the Prompt271305
Node: The Restricted Shell274067
Node: Bash POSIX Mode275892
Node: Job Control286243
Node: Job Control Basics286703
Node: Job Control Builtins291671
Node: Job Control Variables296398
Node: Command Line Editing297554
Node: Introduction and Notation299225
Node: Readline Interaction300848
Node: Readline Bare Essentials302039
Node: Readline Movement Commands303822
Node: Readline Killing Commands304782
Node: Readline Arguments306700
Node: Searching307744
Node: Readline Init File309930
Node: Readline Init File Syntax311077
Node: Conditional Init Constructs331448
Node: Sample Init File335644
Node: Bindable Readline Commands338761
Node: Commands For Moving339965
Node: Commands For History341814
Node: Commands For Text346109
Node: Commands For Killing349498
Node: Numeric Arguments351979
Node: Commands For Completion353118
Node: Keyboard Macros357309
Node: Miscellaneous Commands357996
Node: Readline vi Mode363949
Node: Programmable Completion364856
Node: Programmable Completion Builtins372450
Node: A Programmable Completion Example382336
Node: Using History Interactively387587
Node: Bash History Facilities388271
Node: Bash History Builtins391276
Node: History Interaction395807
Node: Event Designators398874
Node: Word Designators400093
Node: Modifiers401730
Node: Installing Bash403132
Node: Basic Installation404269
Node: Compilers and Options407527
Node: Compiling For Multiple Architectures408268
Node: Installation Names409961
Node: Specifying the System Type410779
Node: Sharing Defaults411495
Node: Operation Controls412168
Node: Optional Features413126
Node: Reporting Bugs423652
Node: Major Differences From The Bourne Shell424846
Node: GNU Free Documentation License441698
Node: Indexes466875
Node: Builtin Index467329
Node: Reserved Word Index474156
Node: Variable Index476604
Node: Function Index492282
Node: Concept Index505585
Node: Top887
Node: Introduction2797
Node: What is Bash?3013
Node: What is a shell?4127
Node: Definitions6665
Node: Basic Shell Features9616
Node: Shell Syntax10835
Node: Shell Operation11861
Node: Quoting13154
Node: Escape Character14454
Node: Single Quotes14939
Node: Double Quotes15287
Node: ANSI-C Quoting16565
Node: Locale Translation17824
Node: Comments18720
Node: Shell Commands19338
Node: Simple Commands20210
Node: Pipelines20841
Node: Lists23773
Node: Compound Commands25512
Node: Looping Constructs26524
Node: Conditional Constructs29019
Node: Command Grouping40099
Node: Coprocesses41578
Node: GNU Parallel43481
Node: Shell Functions47539
Node: Shell Parameters54622
Node: Positional Parameters59035
Node: Special Parameters59935
Node: Shell Expansions63649
Node: Brace Expansion65772
Node: Tilde Expansion68496
Node: Shell Parameter Expansion70844
Node: Command Substitution85327
Node: Arithmetic Expansion86682
Node: Process Substitution87614
Node: Word Splitting88734
Node: Filename Expansion90678
Node: Pattern Matching93208
Node: Quote Removal97194
Node: Redirections97489
Node: Executing Commands107047
Node: Simple Command Expansion107717
Node: Command Search and Execution109647
Node: Command Execution Environment112023
Node: Environment115007
Node: Exit Status116666
Node: Signals118336
Node: Shell Scripts120303
Node: Shell Builtin Commands122818
Node: Bourne Shell Builtins124856
Node: Bash Builtins145514
Node: Modifying Shell Behavior174422
Node: The Set Builtin174767
Node: The Shopt Builtin185180
Node: Special Builtins202050
Node: Shell Variables203029
Node: Bourne Shell Variables203466
Node: Bash Variables205570
Node: Bash Features235584
Node: Invoking Bash236483
Node: Bash Startup Files242496
Node: Interactive Shells247599
Node: What is an Interactive Shell?248009
Node: Is this Shell Interactive?248658
Node: Interactive Shell Behavior249473
Node: Bash Conditional Expressions252960
Node: Shell Arithmetic257326
Node: Aliases260143
Node: Arrays262691
Node: The Directory Stack268057
Node: Directory Stack Builtins268841
Node: Controlling the Prompt271809
Node: The Restricted Shell274575
Node: Bash POSIX Mode276400
Node: Job Control286751
Node: Job Control Basics287211
Node: Job Control Builtins292179
Node: Job Control Variables296906
Node: Command Line Editing298062
Node: Introduction and Notation299733
Node: Readline Interaction301356
Node: Readline Bare Essentials302547
Node: Readline Movement Commands304330
Node: Readline Killing Commands305290
Node: Readline Arguments307208
Node: Searching308252
Node: Readline Init File310438
Node: Readline Init File Syntax311585
Node: Conditional Init Constructs331985
Node: Sample Init File336181
Node: Bindable Readline Commands339298
Node: Commands For Moving340502
Node: Commands For History342351
Node: Commands For Text346646
Node: Commands For Killing350034
Node: Numeric Arguments352515
Node: Commands For Completion353654
Node: Keyboard Macros357845
Node: Miscellaneous Commands358532
Node: Readline vi Mode364485
Node: Programmable Completion365392
Node: Programmable Completion Builtins372986
Node: A Programmable Completion Example383514
Node: Using History Interactively388754
Node: Bash History Facilities389438
Node: Bash History Builtins392443
Node: History Interaction396974
Node: Event Designators400041
Node: Word Designators401260
Node: Modifiers402897
Node: Installing Bash404299
Node: Basic Installation405436
Node: Compilers and Options408694
Node: Compiling For Multiple Architectures409435
Node: Installation Names411128
Node: Specifying the System Type411946
Node: Sharing Defaults412662
Node: Operation Controls413335
Node: Optional Features414293
Node: Reporting Bugs424811
Node: Major Differences From The Bourne Shell426005
Node: GNU Free Documentation License442857
Node: Indexes468034
Node: Builtin Index468488
Node: Reserved Word Index475315
Node: Variable Index477763
Node: Function Index493441
Node: Concept Index506744

End Tag Table
+67 -56
View File
@@ -1,11 +1,11 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/MacPorts 2017_3) (preloaded format=pdfetex 2018.4.5) 2 JUN 2018 20:48
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/MacPorts 2017_2) (preloaded format=pdfetex 2017.7.5) 8 JUN 2018 16:17
entering extended mode
restricted \write18 enabled.
file:line:error style messages enabled.
%&-line parsing enabled.
**\input /usr/src/local/bash/bash-20180601/doc/bashref.texi
(/usr/src/local/bash/bash-20180601/doc/bashref.texi
(/usr/src/local/bash/bash-20180601/doc/texinfo.tex
**\input /usr/homes/chet/src/bash/src/doc/bashref.texi
(/usr/homes/chet/src/bash/src/doc/bashref.texi
(/Users/chet/src/bash/src/doc/texinfo.tex
Loading texinfo [version 2015-11-22.14]:
\outerhsize=\dimen16
\outervsize=\dimen17
@@ -161,23 +161,22 @@ This is `epsf.tex' v2.7.4 <14 February 2011>
texinfo.tex: doing @include of version.texi
(/usr/src/local/bash/bash-20180601/doc/version.texi) [1{/opt/local/var/db/texmf
/fonts/map/pdftex/updmap/pdftex.map}] [2]
(/usr/src/local/bash/bash-20180601/doc/bashref.toc [-1] [-2] [-3]) [-4]
(/usr/src/local/bash/bash-20180601/doc/bashref.toc)
(/usr/src/local/bash/bash-20180601/doc/bashref.toc) Chapter 1
(/Users/chet/src/bash/src/doc/version.texi) [1{/opt/local/var/db/texmf/fonts/ma
p/pdftex/updmap/pdftex.map}] [2] (/Users/chet/src/bash/src/doc/bashref.toc
[-1] [-2] [-3]) [-4] (/Users/chet/src/bash/src/doc/bashref.toc)
(/Users/chet/src/bash/src/doc/bashref.toc) Chapter 1
\openout0 = `bashref.toc'.
(/usr/src/local/bash/bash-20180601/doc/bashref.aux)
(/Users/chet/src/bash/src/doc/bashref.aux)
\openout1 = `bashref.aux'.
Chapter 2 [1] [2]
@cpindfile=@write2
\openout2 = `bashref.cp'.
[3]
Chapter 3 [4] [5] [6]
[3] Chapter 3
[4] [5] [6]
@vrindfile=@write3
\openout3 = `bashref.vr'.
@@ -185,23 +184,22 @@ Chapter 3 [4] [5] [6]
@rwindfile=@write4
\openout4 = `bashref.rw'.
[8] [9] [10] [11] [12] [13] [14] [15] [16] [17]
[18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32]
[33] [34] [35] [36] [37] [38] [39] [40] [41] Chapter 4 [42]
[8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19]
[20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34]
[35] [36] [37] [38] [39] [40] [41] Chapter 4 [42]
@btindfile=@write5
\openout5 = `bashref.bt'.
[43] [44] [45]
[46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60]
[61] [62] [63] [64] [65] [66] [67] [68] [69] [70] Chapter 5 [71] [72] [73]
[74] [75] [76] [77] [78] [79] [80] [81] [82] Chapter 6 [83] [84] [85] [86]
[87] [88] [89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100]
Chapter 7 [101] [102] [103] [104]
[43] [44] [45] [46] [47]
[48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62]
[63] [64] [65] [66] [67] [68] [69] [70] Chapter 5 [71] [72] [73] [74] [75]
[76] [77] [78] [79] [80] [81] [82] Chapter 6 [83] [84] [85] [86] [87] [88]
[89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] Chapter 7 [101]
[102] [103] [104]
texinfo.tex: doing @include of rluser.texi
(/usr/src/local/bash/bash-20180601/lib/readline/doc/rluser.texi Chapter 8
[105] [106] [107] [108] [109] [110] [111] [112] [113] [114] [115]
(/usr/homes/chet/src/bash/src/lib/readline/doc/rluser.texi
Chapter 8 [105] [106] [107] [108] [109] [110] [111] [112] [113] [114] [115]
Underfull \hbox (badness 7540) in paragraph at lines 806--812
[]@textrm In the ex-am-ple above, @textttsl C-u[] @textrm is bound to the func
-tion
@@ -228,9 +226,9 @@ e func-tion
.etc.
[116] [117] [118]
Overfull \hbox (32.18782pt too wide) in paragraph at lines 1040--1040
[]@texttt Meta-Control-h: backward-kill-word Text after the function name is
ignored[]
Overfull \hbox (26.43913pt too wide) in paragraph at lines 1040--1040
[]@texttt Meta-Control-h: backward-kill-word Text after the function name is i
gnored[]
@hbox(6.69167+2.43333)x433.62
.@glue(@leftskip) 28.90755
@@ -245,45 +243,58 @@ ignored[]
\openout6 = `bashref.fn'.
[121] [122] [123] [124] [125] [126] [127] [128] [129] [130]
[131] [132] [133] [134] [135] [136] [137] [138])
[131] [132]
Overfull \hbox (15.27109pt too wide) in paragraph at lines 2025--2025
[]@texttt complete [-abcdefgjksuv] [-o @textttsl comp-option@texttt ] [-DEI] [
-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.
[133] [134] [135] [136] [137] [138])
texinfo.tex: doing @include of hsuser.texi
(/usr/src/local/bash/bash-20180601/lib/readline/doc/hsuser.texi Chapter 9
[139] [140] [141] [142] [143]) Chapter 10 [144] [145] [146] [147] [148]
[149] [150] [151] Appendix A [152] Appendix B [153] [154] [155] [156] [157]
[158] Appendix C [159]
(/usr/homes/chet/src/bash/src/lib/readline/doc/hsuser.texi Chapter 9 [139]
[140] [141] [142] [143]) Chapter 10 [144] [145] [146] [147] [148] [149]
[150] [151] Appendix A [152] Appendix B [153] [154] [155] [156] [157] [158]
Appendix C [159]
texinfo.tex: doing @include of fdl.texi
(/usr/src/local/bash/bash-20180601/doc/fdl.texi [160]
[161] [162] [163] [164] [165] [166]) Appendix D [167] [168] [169] [170]
[171] [172] [173] [174] [175] [176] )
(/Users/chet/src/bash/src/doc/fdl.texi [160] [161] [162]
[163] [164] [165] [166]) Appendix D [167] [168] [169] [170] [171] [172]
[173] [174] [175] [176] )
Here is how much of TeX's memory you used:
4063 strings out of 497104
47206 string characters out of 6206767
4064 strings out of 497104
47069 string characters out of 6206767
136590 words of memory out of 5000000
4846 multiletter control sequences out of 15000+600000
34315 words of font info for 116 fonts, out of 8000000 for 9000
51 hyphenation exceptions out of 8191
16i,6n,16p,331b,968s stack positions out of 5000i,500n,10000p,200000b,80000s
{/opt/local/share/texmf-texlive/fonts/enc/
dvips/cm-super/cm-super-t1.enc}</opt/local/share/texmf-texlive/fonts/type1/publ
ic/amsfonts/cm/cmbx12.pfb></opt/local/share/texmf-texlive/fonts/type1/public/am
sfonts/cm/cmcsc10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfon
ts/cm/cmmi10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm
/cmmi12.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmmi
9.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr10.pfb>
</opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr9.pfb></opt/l
ocal/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmsl10.pfb></opt/local/
share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmsltt10.pfb></opt/local/sha
re/texmf-texlive/fonts/type1/public/amsfonts/cm/cmsy10.pfb></opt/local/share/te
xmf-texlive/fonts/type1/public/amsfonts/cm/cmti10.pfb></opt/local/share/texmf-t
exlive/fonts/type1/public/amsfonts/cm/cmtt10.pfb></opt/local/share/texmf-texliv
e/fonts/type1/public/amsfonts/cm/cmtt12.pfb></opt/local/share/texmf-texlive/fon
ts/type1/public/amsfonts/cm/cmtt9.pfb></opt/local/share/texmf-texlive/fonts/typ
e1/public/cm-super/sfrm1095.pfb></opt/local/share/texmf-texlive/fonts/type1/pub
lic/cm-super/sfrm1440.pfb>
Output written on bashref.pdf (182 pages, 747871 bytes).
16i,6n,16p,326b,968s stack positions out of 5000i,500n,10000p,200000b,80000s
{/opt/local/share/texmf-texlive/fonts/enc/dvips/cm-sup
er/cm-super-t1.enc}</opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/
cm/cmbx12.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cm
csc10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmmi10
.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmmi12.pfb>
</opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmmi9.pfb></opt/
local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr10.pfb></opt/local/
share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr9.pfb></opt/local/share/t
exmf-texlive/fonts/type1/public/amsfonts/cm/cmsl10.pfb></opt/local/share/texmf-
texlive/fonts/type1/public/amsfonts/cm/cmsltt10.pfb></opt/local/share/texmf-tex
live/fonts/type1/public/amsfonts/cm/cmsy10.pfb></opt/local/share/texmf-texlive/
fonts/type1/public/amsfonts/cm/cmti10.pfb></opt/local/share/texmf-texlive/fonts
/type1/public/amsfonts/cm/cmtt10.pfb></opt/local/share/texmf-texlive/fonts/type
1/public/amsfonts/cm/cmtt12.pfb></opt/local/share/texmf-texlive/fonts/type1/pub
lic/amsfonts/cm/cmtt9.pfb></opt/local/share/texmf-texlive/fonts/type1/public/cm
-super/sfrm1095.pfb></opt/local/share/texmf-texlive/fonts/type1/public/cm-super
/sfrm1440.pfb>
Output written on bashref.pdf (182 pages, 748408 bytes).
PDF statistics:
2615 PDF objects out of 2984 (max. 8388607)
2388 compressed objects within 24 object streams
BIN
View File
Binary file not shown.
+2600 -2567
View File
File diff suppressed because it is too large Load Diff
+783 -774
View File
File diff suppressed because it is too large Load Diff
+1703 -1688
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.22.3
%%CreationDate: Mon Mar 19 09:43:23 2018
%%CreationDate: Fri Jun 8 16:16:00 2018
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%DocumentSuppliedResources: procset grops 1.22 3
+3 -3
View File
@@ -2,10 +2,10 @@
Copyright (C) 1988-2018 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Sat May 19 21:47:36 EDT 2018
@set LASTCHANGE Fri Jun 8 15:40:43 EDT 2018
@set EDITION 5.0
@set VERSION 5.0
@set UPDATED 19 May 2018
@set UPDATED-MONTH May 2018
@set UPDATED 8 June 2018
@set UPDATED-MONTH June 2018
+17 -7
View File
@@ -2020,10 +2020,10 @@ matches were generated.
@item complete
@btindex complete
@example
@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}]
@code{complete [-abcdefgjksuv] [-o @var{comp-option}] [-DEI] [-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 [-DE] [@var{name} @dots{}]}
@code{complete -pr [-DEI] [@var{name} @dots{}]}
@end example
Specify how arguments to each @var{name} should be completed.
@@ -2039,10 +2039,15 @@ 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 @option{-I} option indicates that the remaining options and actions should
apply to completion on the inital non-assignment word on the line, or after a
command delimiter such as @samp{;} or @samp{|}, which is usually command
name completion.
If multiple options are supplied, the @option{-D} option takes precedence
over @option{-E}, and both take precedence over @option{-I}.
The process of applying these completion specifications when word completion
is attempted is described above (@pxref{Programmable Completion}). The
@option{-D} option takes precedence over @option{-E}.
is attempted is described above (@pxref{Programmable Completion}).
Other options, if specified, have the following meanings.
The arguments to the @option{-G}, @option{-W}, and @option{-X} options
@@ -2227,7 +2232,7 @@ an error occurs adding a completion specification.
@item compopt
@btindex compopt
@example
@code{compopt} [-o @var{option}] [-DE] [+o @var{option}] [@var{name}]
@code{compopt} [-o @var{option}] [-DEI] [+o @var{option}] [@var{name}]
@end example
Modify completion options for each @var{name} according to the
@var{option}s, or for the currently-executing completion if no @var{name}s
@@ -2242,8 +2247,13 @@ 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{-I} option indicates that the remaining options should
apply to completion on the inital non-assignment word on the line, or after a
command delimiter such as @samp{;} or @samp{|}, which is usually command
name completion.
The @option{-D} option takes precedence over @option{-E}.
If multiple options are supplied, the @option{-D} option takes precedence
over @option{-E}, and both take precedence over @option{-I}
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
+2 -2
View File
@@ -1,6 +1,6 @@
/* histfile.c - functions to manipulate the history file. */
/* Copyright (C) 1989-2017 Free Software Foundation, Inc.
/* Copyright (C) 1989-2018 Free Software Foundation, Inc.
This file contains the GNU History Library (History), a set of
routines for managing the text of previously typed lines.
@@ -396,7 +396,7 @@ read_history_range (const char *filename, int from, int to)
{
if (HIST_TIMESTAMP_START(line_start) == 0)
{
if (last_ts == NULL && history_multiline_entries)
if (last_ts == NULL && history_length > 0 && history_multiline_entries)
_hs_append_history_line (history_length - 1, line_start);
else
add_history (line_start);
+1
View File
@@ -107,6 +107,7 @@ typedef struct _list_of_items {
#define EMPTYCMD "_EmptycmD_"
#define DEFAULTCMD "_DefaultCmD_"
#define INITIALWORD "_InitialWorD_"
extern HASH_TABLE *prog_completes;
+1 -1
View File
@@ -1,4 +1,4 @@
BUILD_DIR=/usr/local/build/bash/bash-current
BUILD_DIR=/usr/local/build/chet/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR