commit bash-20080529 snapshot

This commit is contained in:
Chet Ramey
2011-12-07 09:24:27 -05:00
parent 8943768b87
commit ed35cb4a63
48 changed files with 23347 additions and 15638 deletions
+59 -2
View File
@@ -15916,8 +15916,7 @@ doc/{bash.1,bashref.texi},lib/readline/doc/rluser.texi
5/26
----
parse.y
- recognize new ;& and ;;& case action list terminator tokens and
parse.y - recognize new ;& and ;;& case action list terminator tokens and
implement them in the grammar, setting CASEPAT_FALLTHROUGH and
CASEPAT_TESTNEXT flags as appropriate
@@ -15932,3 +15931,61 @@ execute_cmd.c
doc/{bash.1,bashref.texi}
- document new ;& and ;;& case clause action list terminators
5/28
----
jobs.c
- change waitchld so it treats SIGCHLD like SIGINT if `wait' is being
executed, and allows wait to jump out before running any trap set
on SIGCHLD. Fixes debian bug #483016 reported by Miroslav Rudisin
<miero@atrey.karlin.mff.cuni.cz>
- run_sigchld_trap is no longer static, so the trap code in trap.c
can call it
- change run_sigchld_trap to call set_impossible_sigchld_trap instead
of just using a call to restore_default_signal
jobs.h
- new extern declaration for run_sigchld_trap
trap.c
- fix run_pending_traps to run a SIGCHLD trap if the trap handler isn't
set to IMPOSSIBLE_TRAP_HANDLER
- in trap_handler, don't reset the SIGCHLD trap handler to trap_handler
if MUST_REINSTALL_SIGHANDLERS is defined
- new function, set_impossible_sigchld_handler, sets the trap string
associated with SIGCHLD to IMPOSSIBLE_TRAP_HANDLER; used as a sentinel
by run_sigchld_trap and maybe_set_sigchld_handler
- change maybe_set_sigchld_handler to set the SIGCHLD trap string only
if the current value is IMPOSSIBLE_TRAP_HANDLER. This ensures that
any traps on SIGCHLD set in a SIGCHLD handler will persist. Fixes
debian bug #483016 reported by Miroslav Rudisin
<miero@atrey.karlin.mff.cuni.cz>
trap.h
- new extern declaration for set_impossible_sigchld_trap
5/31
----
parse.y
- new function: parse_comsub(), parses $(...) by parsing command
between parens and making sure the next token is `)'. From
the bash-4.0-devel branch
- new function: xparse_dolparen, helper function for parsing
command substitutions in $(...). Called from subst.c to extract
a command substitution during word expansion. From bash-4.0-devel
branch
- new function: rewind_input_stream(). Rewinds bash_input.location.string
back to where it was before the shell parsed a $() command
substitution. From bash-4.0-devel branch
- changes to parse_matched_pair to combine most of the flag variables
(was_dollar, in_comment, and so on) into a local flags word
6/2
---
parse.y
- call trim_pathname, which retains only the last $PROMPT_DIRTRIM
directories and replaces the intervening characters with `...',
when expanding \w and \W
doc/{bash.1,bashref.texi}
- document the effect of setting PROMPT_DIRTRIM
+66
View File
@@ -15913,3 +15913,69 @@ doc/{bash.1,bashref.texi},lib/readline/doc/rluser.texi
- document new effects of `bind -x' setting and reading the values of
READLINE_LINE and READLINE_POINT
- document new |& synonym for `2>&1 |' pipeline operator
5/26
----
parse.y - recognize new ;& and ;;& case action list terminator tokens and
implement them in the grammar, setting CASEPAT_FALLTHROUGH and
CASEPAT_TESTNEXT flags as appropriate
print_cmd.c
- print new ;& and ;;& case clause action list terminators as
appropriate
execute_cmd.c
- implement new case clause action list terminators:
;& - fall through to actions associated with next pattern list
;;& - fall through to tests in next pattern list
doc/{bash.1,bashref.texi}
- document new ;& and ;;& case clause action list terminators
5/28
----
jobs.c
- change waitchld so it treats SIGCHLD like SIGINT if `wait' is being
executed, and allows wait to jump out before running any trap set
on SIGCHLD. Fixes debian bug #483016 reported by Miroslav Rudisin
<miero@atrey.karlin.mff.cuni.cz>
- run_sigchld_trap is no longer static, so the trap code in trap.c
can call it
- change run_sigchld_trap to call set_impossible_sigchld_trap instead
of just using a call to restore_default_signal
jobs.h
- new extern declaration for run_sigchld_trap
trap.c
- fix run_pending_traps to run a SIGCHLD trap if the trap handler isn't
set to IMPOSSIBLE_TRAP_HANDLER
- in trap_handler, don't reset the SIGCHLD trap handler to trap_handler
if MUST_REINSTALL_SIGHANDLERS is defined
- new function, set_impossible_sigchld_handler, sets the trap string
associated with SIGCHLD to IMPOSSIBLE_TRAP_HANDLER; used as a sentinel
by run_sigchld_trap and maybe_set_sigchld_handler
- change maybe_set_sigchld_handler to set the SIGCHLD trap string only
if the current value is IMPOSSIBLE_TRAP_HANDLER. This ensures that
any traps on SIGCHLD set in a SIGCHLD handler will persist. Fixes
debian bug #483016 reported by Miroslav Rudisin
<miero@atrey.karlin.mff.cuni.cz>
trap.h
- new extern declaration for set_impossible_sigchld_trap
5/31
----
parse.y
- new function: parse_comsub(), parses $(...) by parsing command
between parens and making sure the next token is `)'. From
the bash-4.0-devel branch
- new function: xparse_dolparen, helper function for parsing
command substitutions in $(...). Called from subst.c to extract
a command substitution during word expansion. From bash-4.0-devel
branch
- new function: rewind_input_stream(). Rewinds bash_input.location.string
back to where it was before the shell parsed a $() command
substitution. From bash-4.0-devel branch
- changes to parse_matched_pair to combine most of the flag variables
(was_dollar, in_comment, and so on) into a local flags word
+1
View File
@@ -145,6 +145,7 @@ BASHREF_FILES = $(srcdir)/bashref.texi $(srcdir)/version.texi
all: ps info dvi text html
nodvi: ps info text html
everything: all pdf
PSFILES = bash.ps bashbug.ps article.ps builtins.ps rbash.ps
DVIFILES = bashref.dvi bashref.ps
+750 -650
View File
File diff suppressed because it is too large Load Diff
+11 -2
View File
@@ -5,12 +5,12 @@
.\" Case Western Reserve University
.\" chet@po.cwru.edu
.\"
.\" Last Change: Sun May 25 10:41:29 EDT 2008
.\" Last Change: Mon Jun 2 20:32:53 EDT 2008
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2008 May 25" "GNU Bash-4.0"
.TH BASH 1 "2008 June 2" "GNU Bash-4.0"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -1945,6 +1945,14 @@ had been executed.
If set, the value is executed as a command prior to issuing each primary
prompt.
.TP
.B PROMPT_DIRTRIM
If set to a number greater than zero, the value is used as the number of
trailing directory components to retain when expanding the \fB\ew\fB and
\fB\eW\fP prompt string escapes (see
.SM
.B PROMPTING
below). Characters removed are replaced with an ellipsis.
.TP
.B PS1
The value of this parameter is expanded (see
.SM
@@ -4360,6 +4368,7 @@ the release of \fBbash\fP, version + patch level (e.g., 2.00.0)
.TP
.B \ew
the current working directory, with \fB$HOME\fP abbreviated with a tilde
(uses the \fB$PROMPT_DIRTRIM\fP variable)
.TP
.B \eW
the basename of the current working directory, with \fB$HOME\fP
+10 -1
View File
@@ -831,7 +831,7 @@ If the \fB;;\fP operator is used, no subsequent matches are attempted after
the first pattern match.
Using \fB;&\fP in place of \fB;;\fP causes execution to continue with
the \fIlist\fP associated with the next set of patterns.
Using \fB;;\fP in place of \fB;;\fP causes the shell to test the next
Using \fB;;&\fP in place of \fB;;\fP causes the shell to test the next
pattern list in the statement, if any, and execute any associated \fIlist\fP
on a successful match.
The exit status is zero if no
@@ -1945,6 +1945,14 @@ had been executed.
If set, the value is executed as a command prior to issuing each primary
prompt.
.TP
.B PROMPT_DIRTRIM
If set to a number greater than zero, the value is used as the number of
trailing directory components to retain when expanding the \fB\ew\fB and
\fB\eW\fP prompt string escapes (see
.SM
.B PROMPTING
below). Characters removed are replaced with an ellipsis.
.TP
.B PS1
The value of this parameter is expanded (see
.SM
@@ -4360,6 +4368,7 @@ the release of \fBbash\fP, version + patch level (e.g., 2.00.0)
.TP
.B \ew
the current working directory, with \fB$HOME\fP abbreviated with a tilde
(uses the \fB$PROMPT_DIRTRIM\fP variable)
.TP
.B \eW
the basename of the current working directory, with \fB$HOME\fP
+346 -139
View File
@@ -3,7 +3,7 @@
</HEAD>
<BODY><TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2008 April 5<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2008 May 25<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<BR><A HREF="#index">Index</A>
@@ -618,7 +618,7 @@ symbols:
<DL COMPACT><DT><DD>
<P>
<B>|| &amp; &amp;&amp; ; ;; ( ) | &lt;newline&gt;</B>
<B>|| &amp; &amp;&amp; ; ;; ( ) | |&amp; &lt;newline&gt;</B>
</DL>
@@ -676,14 +676,15 @@ The return value of a <I>simple command</I> is its exit status, or
<P>
A <I>pipeline</I> is a sequence of one or more commands separated by
the character
<B>|</B>.
one of the control operators
<B>|</B>
or <B>|&amp;</B>.
The format for a pipeline is:
<DL COMPACT><DT><DD>
<P>
[<B>time</B> [<B>-p</B>]] [ ! ] <I>command</I> [ <B>|</B> <I>command2</I> ... ]
[<B>time</B> [<B>-p</B>]] [ ! ] <I>command</I> [ [<B>|</B>|<B>|&amp;</B>] <I>command2</I> ... ]
</DL>
<P>
@@ -700,6 +701,11 @@ command (see
</FONT>
below).
If <B>|&amp;</B> is used, the standard error of <I>command</I> is connected to
<I>command2</I>'s standard input through the pipe; it is shorthand for
<B>2&gt;&amp;1 |</B>.
This implicit redirection of the standard error is performed after any
redirections specified by the command.
<P>
The return status of a pipeline is the exit status of the last
@@ -1062,9 +1068,15 @@ If the shell option
is enabled, the match is performed without regard to the case
of alphabetic characters.
When a match is found, the
corresponding <I>list</I> is executed. After the first match, no
subsequent matches are attempted. The exit status is zero if no
When a match is found, the corresponding <I>list</I> is executed.
If the <B>;;</B> operator is used, no subsequent matches are attempted after
the first pattern match.
Using <B>;&amp;</B> in place of <B>;;</B> causes execution to continue with
the <I>list</I> associated with the next set of patterns.
Using <B>;;&amp;</B> in place of <B>;;</B> causes the shell to test the next
pattern list in the statement, if any, and execute any associated <I>list</I>
on a successful match.
The exit status is zero if no
pattern matches. Otherwise, it is the exit status of the
last command executed in <I>list</I>.
<DT><B>if</B> <I>list</I>; <B>then</B> <I>list;</I> [ <B>elif</B> <I>list</I>; <B>then</B> <I>list</I>; ] ... [ <B>else</B> <I>list</I>; ] <B>fi</B><DD>
@@ -2864,13 +2876,21 @@ string are not sorted; left to right order is preserved.
For example, a<B>{</B>d,c,b<B>}</B>e expands into `ade ace abe'.
<P>
A sequence expression takes the form <B>{</B><I>x</I><B>..</B><I>y</I><B>}</B>,
where <I>x</I> and <I>y</I> are either integers or single characters.
A sequence expression takes the form
<B>{</B><I>x</I><B>..</B><I>y</I><B>[..</B><I>incr</I>]},
where <I>x</I> and <I>y</I> are either integers or single characters,
and <I>incr</I>, an optional increment, is an integer.
When integers are supplied, the expression expands to each number between
<I>x</I> and <I>y</I>, inclusive.
Supplied integers may be prefixed with <I>0</I> to force each term to have the
same width. When either <I>x</I> or y begins with a zero, the shell
attempts to force all generated terms to contain the same number of digits,
zero-padding where necessary.
When characters are supplied, the expression expands to each character
lexicographically between <I>x</I> and <I>y</I>, inclusive. Note that
both <I>x</I> and <I>y</I> must be of the same type.
When the increment is supplied, it is used as the difference between
each term. The default increment is 1 or -1 as appropriate.
<P>
Brace expansion is performed before any other expansions,
@@ -3684,6 +3704,12 @@ The special pattern characters have the following meanings:
<DD>
Matches any string, including the null string.
When the <B>globstar</B> shell option is enabled, and <B>*</B> is used in
a filename expansion context, two adjacent <B>*</B>s used as a single
pattern will match all files and zero or more directories and
subdirectories.
If followed by a <B>/</B>, two adjacent <B>*</B>s will match only directories
and subdirectories.
<DT><B>?</B>
<DD>
@@ -4045,16 +4071,13 @@ The general format for appending output is:
<P>
<B>Bash</B>
allows both the
This construct allows both the
standard output (file descriptor 1) and
the standard error output (file descriptor 2)
to be redirected to the file whose name is the
expansion of
<I>word</I>
<I>word</I>.
with this construct.
<P>
There are two formats for redirecting standard output and
@@ -4080,7 +4103,39 @@ This is semantically equivalent to
<B>&gt;</B><I>word</I> 2<B>&gt;&amp;</B>1
</DL>
<P>
<A NAME="lbBM">&nbsp;</A>
<H4>Appending Standard Output and Standard Error</H4>
<P>
This construct allows both the
standard output (file descriptor 1) and
the standard error output (file descriptor 2)
to be appended to the file whose name is the
expansion of
<I>word</I>.
<P>
The format for appending standard output and standard error is:
<DL COMPACT><DT><DD>
<P>
<B>&amp;&gt;&gt;</B><I>word</I>
</DL>
<P>
This is semantically equivalent to
<DL COMPACT><DT><DD>
<P>
<B>&gt;&gt;</B><I>word</I> 2<B>&gt;&amp;</B>1
</DL>
<A NAME="lbBN">&nbsp;</A>
<H4>Here Documents</H4>
<P>
@@ -4152,7 +4207,7 @@ line containing
This allows
here-documents within shell scripts to be indented in a
natural fashion.
<A NAME="lbBN">&nbsp;</A>
<A NAME="lbBO">&nbsp;</A>
<H4>Here Strings</H4>
A variant of here documents, the format is:
@@ -4169,7 +4224,7 @@ A variant of here documents, the format is:
The <I>word</I> is expanded and supplied to the command on its standard
input.
<A NAME="lbBO">&nbsp;</A>
<A NAME="lbBP">&nbsp;</A>
<H4>Duplicating File Descriptors</H4>
<P>
@@ -4230,7 +4285,7 @@ do not specify a file descriptor open for output, a redirection error occurs.
As a special case, if <I>n</I> is omitted, and <I>word</I> does not
expand to one or more digits, the standard output and standard
error are redirected as described previously.
<A NAME="lbBP">&nbsp;</A>
<A NAME="lbBQ">&nbsp;</A>
<H4>Moving File Descriptors</H4>
<P>
@@ -4264,7 +4319,7 @@ moves the file descriptor <I>digit</I> to file descriptor
<I>n</I>,
or the standard output (file descriptor 1) if <I>n</I> is not specified.
<A NAME="lbBQ">&nbsp;</A>
<A NAME="lbBR">&nbsp;</A>
<H4>Opening File Descriptors for Reading and Writing</H4>
<P>
@@ -4288,7 +4343,7 @@ or on file descriptor 0 if
<I>n</I>
is not specified. If the file does not exist, it is created.
<A NAME="lbBR">&nbsp;</A>
<A NAME="lbBS">&nbsp;</A>
<H3>ALIASES</H3>
<I>Aliases</I> allow a string to be substituted for a word when it is used
@@ -4390,7 +4445,7 @@ in compound commands.
For almost every purpose, aliases are superseded by
shell functions.
<A NAME="lbBS">&nbsp;</A>
<A NAME="lbBT">&nbsp;</A>
<H3>FUNCTIONS</H3>
A shell function, defined as described above under
@@ -4509,7 +4564,7 @@ Care should be taken in cases where this may cause a problem.
Functions may be recursive. No limit is imposed on the number
of recursive calls.
<A NAME="lbBT">&nbsp;</A>
<A NAME="lbBU">&nbsp;</A>
<H3>ARITHMETIC EVALUATION</H3>
The shell allows arithmetic expressions to be evaluated, under
@@ -4632,7 +4687,7 @@ and 35.
Operators are evaluated in order of precedence. Sub-expressions in
parentheses are evaluated first and may override the precedence
rules above.
<A NAME="lbBU">&nbsp;</A>
<A NAME="lbBV">&nbsp;</A>
<H3>CONDITIONAL EXPRESSIONS</H3>
Conditional expressions are used by the <B>[[</B> compound command and
@@ -4817,7 +4872,7 @@ and
may be positive or negative integers.
</DL>
<A NAME="lbBV">&nbsp;</A>
<A NAME="lbBW">&nbsp;</A>
<H3>SIMPLE COMMAND EXPANSION</H3>
When a simple command is executed, the shell performs the following
@@ -4861,7 +4916,7 @@ described below. Otherwise, the command exits. If one of the expansions
contained a command substitution, the exit status of the command is
the exit status of the last command substitution performed. If there
were no command substitutions, the command exits with a status of zero.
<A NAME="lbBW">&nbsp;</A>
<A NAME="lbBX">&nbsp;</A>
<H3>COMMAND EXECUTION</H3>
After a command has been split into words, if it results in a
@@ -4905,7 +4960,12 @@ A full search of the directories in
</FONT>
is performed only if the command is not found in the hash table.
If the search is unsuccessful, the shell prints an error
If the search is unsuccessful, the shell searches for a defined shell
function named <B>command_not_found_handle</B>.
If that function exists, it is invoked with the original command and
the original command's arguments as its arguments, and the function's
exit status becomes the exit status of the shell.
If that function is not defined, the shell prints an error
message and returns an exit status of 127.
<P>
@@ -4942,7 +5002,7 @@ interpreter consist of a single optional argument following the
interpreter name on the first line of the program, followed
by the name of the program, followed by the command
arguments, if any.
<A NAME="lbBX">&nbsp;</A>
<A NAME="lbBY">&nbsp;</A>
<H3>COMMAND EXECUTION ENVIRONMENT</H3>
The shell has an <I>execution environment</I>, which consists of the
@@ -5020,7 +5080,7 @@ If a command is followed by a <B>&amp;</B> and job control is not active, the
default standard input for the command is the empty file <I>/dev/null</I>.
Otherwise, the invoked command inherits the file descriptors of the calling
shell as modified by redirections.
<A NAME="lbBY">&nbsp;</A>
<A NAME="lbBZ">&nbsp;</A>
<H3>ENVIRONMENT</H3>
When a program is invoked it is given an array of strings
@@ -5097,7 +5157,7 @@ invokes an external command, the variable
is set to the full file name of the command and passed to that
command in its environment.
<A NAME="lbBZ">&nbsp;</A>
<A NAME="lbCA">&nbsp;</A>
<H3>EXIT STATUS</H3>
<P>
@@ -5137,7 +5197,7 @@ All builtins return an exit status of 2 to indicate incorrect usage.
executed, unless a syntax error occurs, in which case it exits
with a non-zero value. See also the <B>exit</B> builtin
command below.
<A NAME="lbCA">&nbsp;</A>
<A NAME="lbCB">&nbsp;</A>
<H3>SIGNALS</H3>
When <B>bash</B> is interactive, in the absence of any traps, it ignores
@@ -5254,7 +5314,7 @@ When <B>bash</B> is waiting for an asynchronous command via the <B>wait</B>
builtin, the reception of a signal for which a trap has been set will
cause the <B>wait</B> builtin to return immediately with an exit status
greater than 128, immediately after which the trap is executed.
<A NAME="lbCB">&nbsp;</A>
<A NAME="lbCC">&nbsp;</A>
<H3>JOB CONTROL</H3>
<I>Job control</I>
@@ -5482,7 +5542,7 @@ command may then be used to inspect their status.
If a second attempt to exit is made without an intervening command,
the shell does not print another warning, and any stopped
jobs are terminated.
<A NAME="lbCC">&nbsp;</A>
<A NAME="lbCD">&nbsp;</A>
<H3>PROMPTING</H3>
When executing interactively,
@@ -5651,7 +5711,7 @@ command under
</FONT>
below).
<A NAME="lbCD">&nbsp;</A>
<A NAME="lbCE">&nbsp;</A>
<H3>READLINE</H3>
This is the library that handles reading input when using an interactive
@@ -5675,7 +5735,7 @@ builtin (see
</FONT>
below).
<A NAME="lbCE">&nbsp;</A>
<A NAME="lbCF">&nbsp;</A>
<H4>Readline Notation</H4>
<P>
@@ -5721,7 +5781,7 @@ deleted is saved for possible future retrieval
accumulated into one unit, which can be yanked all at once.
Commands which do not kill text separate the chunks of text
on the kill ring.
<A NAME="lbCF">&nbsp;</A>
<A NAME="lbCG">&nbsp;</A>
<H4>Readline Initialization</H4>
<P>
@@ -5800,7 +5860,7 @@ and
In addition to command names, readline allows keys to be bound
to a string that is inserted when the key is pressed (a <I>macro</I>).
<A NAME="lbCG">&nbsp;</A>
<A NAME="lbCH">&nbsp;</A>
<H4>Readline Key Bindings</H4>
<P>
@@ -6007,7 +6067,7 @@ builtin command (see
</FONT>
below).
<A NAME="lbCH">&nbsp;</A>
<A NAME="lbCI">&nbsp;</A>
<H4>Readline Variables</H4>
<P>
@@ -6073,6 +6133,13 @@ in vi command mode.
<DD>
If set to <B>On</B>, readline performs filename matching and completion
in a case-insensitive fashion.
<DT><B>completion-prefix-display-length (0)</B>
<DD>
The length in characters of the common prefix of a list of possible
completions that is displayed without modification. When set to a
value greater than zero, common prefixes longer than this value are
replaced with an ellipsis when displaying possible completions.
<DT><B>completion-query-items (100)</B>
<DD>
@@ -6209,6 +6276,13 @@ to display a screenful of possible completions at a time.
<DD>
If set to <B>On</B>, readline will display completions with matches
sorted horizontally in alphabetical order, rather than down the screen.
<DT><B>revert-all-at-newline (Off)</B>
<DD>
If set to <B>on</B>, readline will undo all changes to history lines
before returning when <B>accept-line</B> is executed. By default,
history lines may be modified and retain individual undo lists across
calls to <B>readline</B>.
<DT><B>show-all-if-ambiguous (Off)</B>
<DD>
@@ -6238,7 +6312,7 @@ by <I>stat</I>(2) is appended to the filename when listing possible
completions.
</DL>
<A NAME="lbCI">&nbsp;</A>
<A NAME="lbCJ">&nbsp;</A>
<H4>Readline Conditional Constructs</H4>
<P>
@@ -6322,7 +6396,7 @@ would read <A HREF="file:/etc/inputrc"><I>/etc/inputrc</I></A>:
</DL>
</DL>
<A NAME="lbCJ">&nbsp;</A>
<A NAME="lbCK">&nbsp;</A>
<H4>Searching</H4>
<P>
@@ -6375,7 +6449,7 @@ new search string, any remembered search string is used.
Non-incremental searches read the entire search string before starting
to search for matching history lines. The search string may be
typed by the user or be part of the contents of the current line.
<A NAME="lbCK">&nbsp;</A>
<A NAME="lbCL">&nbsp;</A>
<H4>Readline Command Names</H4>
<P>
@@ -6387,7 +6461,7 @@ In the following descriptions, <I>point</I> refers to the current cursor
position, and <I>mark</I> refers to a cursor position saved by the
<B>set-mark</B> command.
The text between the point and mark is referred to as the <I>region</I>.
<A NAME="lbCL">&nbsp;</A>
<A NAME="lbCM">&nbsp;</A>
<H4>Commands for Moving</H4>
<P>
@@ -6432,7 +6506,7 @@ screen.
Refresh the current line.
</DL>
<A NAME="lbCM">&nbsp;</A>
<A NAME="lbCN">&nbsp;</A>
<H4>Commands for Manipulating the History</H4>
<P>
@@ -6589,7 +6663,7 @@ commands.
and <I>emacs</I> as the editor, in that order.
</DL>
<A NAME="lbCN">&nbsp;</A>
<A NAME="lbCO">&nbsp;</A>
<H4>Commands for Changing Text</H4>
<P>
@@ -6674,7 +6748,7 @@ Characters bound to <B>backward-delete-char</B> replace the character
before point with a space. By default, this command is unbound.
</DL>
<A NAME="lbCO">&nbsp;</A>
<A NAME="lbCP">&nbsp;</A>
<H4>Killing and Yanking</H4>
<P>
@@ -6758,7 +6832,7 @@ or
</DL>
<A NAME="lbCP">&nbsp;</A>
<A NAME="lbCQ">&nbsp;</A>
<H4>Numeric Arguments</H4>
<P>
@@ -6788,7 +6862,7 @@ first time makes the argument count four, a second time makes the
argument count sixteen, and so on.
</DL>
<A NAME="lbCQ">&nbsp;</A>
<A NAME="lbCR">&nbsp;</A>
<H4>Completing</H4>
<P>
@@ -6897,6 +6971,12 @@ treating it as a command name.
Attempt completion on the text before point, comparing
the text against lines from the history list for possible
completion matches.
<DT><B>dabbrev-expand</B>
<DD>
Attempt menu completion on the text before point, comparing
the text against lines from the history list for possible
completion matches.
<DT><B>complete-into-braces (M-{)</B>
<DD>
@@ -6907,7 +6987,7 @@ enclosed within braces so the list is available to the shell (see
above).
</DL>
<A NAME="lbCR">&nbsp;</A>
<A NAME="lbCS">&nbsp;</A>
<H4>Keyboard Macros</H4>
<P>
@@ -6930,7 +7010,7 @@ Re-execute the last keyboard macro defined, by making the characters
in the macro appear as if typed at the keyboard.
</DL>
<A NAME="lbCS">&nbsp;</A>
<A NAME="lbCT">&nbsp;</A>
<H4>Miscellaneous</H4>
<P>
@@ -7070,7 +7150,7 @@ Display version information about the current instance of
</DL>
<A NAME="lbCT">&nbsp;</A>
<A NAME="lbCU">&nbsp;</A>
<H4>Programmable Completion</H4>
<P>
@@ -7250,7 +7330,7 @@ the programmable completion functions force readline to append a slash
to completed names which are symbolic links to directories, subject to
the value of the <B>mark-directories</B> readline variable, regardless
of the setting of the <B>mark-symlinked-directories</B> readline variable.
<A NAME="lbCU">&nbsp;</A>
<A NAME="lbCV">&nbsp;</A>
<H3>HISTORY</H3>
When the
@@ -7403,7 +7483,7 @@ builtin below under
</FONT>
for information on setting and unsetting shell options.
<A NAME="lbCV">&nbsp;</A>
<A NAME="lbCW">&nbsp;</A>
<H3>HISTORY EXPANSION</H3>
<P>
@@ -7519,7 +7599,7 @@ above under
The shell uses
the history comment character to mark history timestamps when
writing the history file.
<A NAME="lbCW">&nbsp;</A>
<A NAME="lbCX">&nbsp;</A>
<H4>Event Designators</H4>
<P>
@@ -7589,7 +7669,7 @@ Equivalent to
The entire command line typed so far.
</DL>
<A NAME="lbCX">&nbsp;</A>
<A NAME="lbCY">&nbsp;</A>
<H4>Word Designators</H4>
<P>
@@ -7666,7 +7746,7 @@ Abbreviates <I>x-$</I> like <B>x*</B>, but omits the last word.
If a word designator is supplied without an event specification, the
previous command is used as the event.
<A NAME="lbCY">&nbsp;</A>
<A NAME="lbCZ">&nbsp;</A>
<H4>Modifiers</H4>
<P>
@@ -7771,7 +7851,7 @@ An <B>a</B> may be used as a synonym for <B>g</B>.
Apply the following `<B>s</B>' modifier once to each word in the event line.
</DL>
<A NAME="lbCZ">&nbsp;</A>
<A NAME="lbDA">&nbsp;</A>
<H3>SHELL BUILTIN COMMANDS</H3>
@@ -7976,6 +8056,20 @@ Remove any current binding for <I>keyseq</I>.
<DD>
Cause <I>shell-command</I> to be executed whenever <I>keyseq</I> is
entered.
When <I>shell-command</I> is executed, the shell sets the
<B>READLINE_LINE</B>
variable to the contents of the <B>readline</B> line buffer and the
<B>READLINE_POINT</B>
variable to the current location of the insertion point.
If the executed command changes the value of
<B>READLINE_LINE</B>
or
<B>READLINE_POINT</B>,
those new values will be reflected in the editing state.
</DL>
<P>
@@ -8002,11 +8096,8 @@ must be >= 1. If
<I>n</I>
is greater than the number of enclosing loops, all enclosing loops
are exited. The return value is 0 unless the shell is not executing
a loop when
<B>break</B>
is executed.
are exited.
The return value is 0 unless <I>n</I> is not greater than or equal to 1.
<DT><B>builtin</B> <I>shell-builtin</I> [<I>arguments</I>]<DD>
Execute the specified shell builtin, passing it
<I>arguments</I>,
@@ -8020,6 +8111,19 @@ The return status is false if
<I>shell-builtin</I>
is not a shell builtin command.
<DT><B>caller</B> [<I>expr</I>]<DD>
Returns the context of any active subroutine call (a shell function or
a script executed with the <B>.</B> or <B>source</B> builtins.
Without <I>expr</I>, <B>caller</B> displays the line number and source
filename of the current subroutine call.
If a non-negative integer is supplied as <I>expr</I>, <B>caller</B>
displays the line number, subroutine name, and source file corresponding
to that position in the current execution call stack. This extra
information may be used, for example, to print a stack trace. The
current frame is frame 0.
The return value is 0 unless the shell is not executing a subroutine
call or <I>expr</I> does not correspond to a valid position in the
call stack.
<DT><B>cd</B> [<B>-L|-P</B>] [<I>dir</I>]<DD>
Change the current directory to <I>dir</I>. The variable
<FONT SIZE=-1><B>HOME</B>
@@ -8078,19 +8182,6 @@ successful, the absolute pathname of the new working directory is
written to the standard output.
The return value is true if the directory was successfully changed;
false otherwise.
<DT><B>caller</B> [<I>expr</I>]<DD>
Returns the context of any active subroutine call (a shell function or
a script executed with the <B>.</B> or <B>source</B> builtins.
Without <I>expr</I>, <B>caller</B> displays the line number and source
filename of the current subroutine call.
If a non-negative integer is supplied as <I>expr</I>, <B>caller</B>
displays the line number, subroutine name, and source file corresponding
to that position in the current execution call stack. This extra
information may be used, for example, to print a stack trace. The
current frame is frame 0.
The return value is 0 unless the shell is not executing a subroutine
call or <I>expr</I> does not correspond to a valid position in the
call stack.
<DT><B>command</B> [<B>-pVv</B>] <I>command</I> [<I>arg</I> ...]<DD>
Run
<I>command</I>
@@ -8171,12 +8262,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>-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>-E</B>] [<B>-A</B> <I>action</I>] [<B>-G</B> <I>globpat</I>] [<B>-W</B> <I>wordlist</I>] [<B>-F</B> <I>function</I>] [<B>-C</B> <I>command</I>]<DD>
<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> [<I>name</I> ...]<DD>
<DT><B>complete</B> <B>-pr</B> [<B>-E</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,
@@ -8185,6 +8276,9 @@ them to be reused as input.
The <B>-r</B> option removes a completion specification for
each <I>name</I>, or, if no <I>name</I>s are supplied, all
completion specifications.
The <B>-E</B> option indicates that the remaining options and actions should
apply to ``empty'' command completion; that is, completion attempted on a
blank line.
<P>
The process of applying these completion specifications when word completion
is attempted is described above under <B>Programmable Completion</B>.
@@ -8429,11 +8523,8 @@ must be >= 1. If
<I>n</I>
is greater than the number of enclosing loops, the last enclosing loop
(the ``top-level'' loop) is resumed. The return value is 0 unless the
shell is not executing a loop when
<B>continue</B>
is executed.
(the ``top-level'' loop) is resumed.
The return value is 0 unless <I>n</I> is not greater than or equal to 1.
<DT><B>declare</B> [<B>-afFirtx</B>] [<B>-p</B>] [<I>name</I>[=<I>value</I>] ...]<DD>
<DT><B>typeset</B> [<B>-afFirtx</B>] [<B>-p</B>] [<I>name</I>[=<I>value</I>] ...]<DD>
@@ -9192,7 +9283,7 @@ The return status is true unless a
<I>name</I>
is not found or an invalid option is supplied.
<DT><B>help</B> [<B>-s</B>] [<I>pattern</I>]<DD>
<DT><B>help</B> [<B>-dms</B>] [<I>pattern</I>]<DD>
Display helpful information about builtin commands. If
<I>pattern</I>
@@ -9204,8 +9295,24 @@ gives detailed help on all commands matching
otherwise help for all the builtins and shell control structures
is printed.
The <B>-s</B> option restricts the information displayed to a short
usage synopsis.
<DL COMPACT><DT><DD>
<DL COMPACT>
<DT><B>-d</B>
<DD>
Display a short description of each <I>pattern</I>
<DT><B>&nbsp;-m</B>
<DD>
Display the description of each <I>pattern</I> in a manpage-like format
<DT><B>-s</B>
<DD>
Display only a short usage synopsis for each <I>pattern</I>
</DL></DL>
The return status is 0 unless no command matches
<I>pattern</I>.
@@ -9481,6 +9588,88 @@ is supplied, or
<DD>
Exit a login shell.
<DT><B>mapfile</B> [<B>-n</B> <I>count</I>] [<B>-O</B> <I>origin</I>] [<B>-s</B> <I>cou<DD>
nt</I>] [<B>-t</B>] [<B>-u</B> <I>fd</I>] [<B>-C</B> <I>callback</I>] [<B>-c</B> Iquantum] [<I>array</I>]
Read lines from the standard input into array variable
<I>array</I>,
or from file descriptor
<I>fd</I>
if the
<B>-u</B>
option is supplied.
The variable <B>MAPFILE</B> is the default <I>array</I>.
Options, if supplied, have the following meanings:
<DL COMPACT><DT><DD>
<DL COMPACT>
<DT><B>-n</B>
<DD>
Copy at most
<I>count</I>
lines. If <I>count</I> is 0, all lines are copied.
<DT><B>-O</B>
<DD>
Begin assigning to
<I>array</I>
at index
<I>origin</I>.
The default index is 0.
<DT><B>-s</B>
<DD>
Discard the first <I>count</I> lines read.
<DT><B>-t</B>
<DD>
Remove a trailing line from each line read.
<DT><B>-u</B>
<DD>
Read lines from file descriptor <I>fd</I> instead of the standard input.
<DT><B>-C</B>
<DD>
Evaluate
<I>callback</I>
each time <I>quantum</I> lines are read. The <B>-c</B> option specifies
<I>quantum</I>.
<DT><B>-c</B>
<DD>
Specify the number of lines read between each call to
<I>callback</I>.
</DL>
<P>
If
<B>-C</B>
is specified without
<B>-c</B>,
the default quantum is 5000.
<P>
If not supplied with an explicit origin, <B>mapfile</B> will clear <I>array</I>
before assigning to it.
<P>
<B>mapfile</B> returns successfully unless an invalid option or option
argument is supplied, or <I>array</I> is invalid or unassignable.
</DL>
<DT><B>popd</B> [-<B>n</B>] [+<I>n</I>] [-<I>n</I>]<DD>
Removes entries from the directory stack. With no arguments,
removes the top directory from the stack, and performs a
@@ -9736,6 +9925,8 @@ not echoed.
<DD>
Cause <B>read</B> to time out and return failure if a complete line of
input is not read within <I>timeout</I> seconds.
<I>timeout</I> may be a decimal number with a fractional portion following
the decimal point.
This option has no effect if <B>read</B> is not reading input from the
terminal or a pipe.
<DT><B>-u </B><I>fd</I>
@@ -10435,6 +10626,14 @@ If set,
changes its behavior to that of version 3.1 with respect to quoted
arguments to the conditional command's =~ operator.
<DT><B>dirspell</B>
<DD>
If set,
<B>bash</B>
attempts spelling correction on directory names during word completion
if the directory name initially supplied does not exist.
<DT><B>dotglob</B>
<DD>
@@ -10531,6 +10730,13 @@ See
<FONT SIZE=-1><B>SHELL VARIABLES</B></FONT>
above for a description of <B>FIGNORE</B>.
This option is enabled by default.
<DT><B>globstar</B>
<DD>
If set, the pattern <B>**</B> used in a filename expansion context will
match a files and zero or more directories and subdirectories.
If the pattern is followed by a <B>/</B>, only directories and
subdirectories match.
<DT><B>gnu_errfmt</B>
<DD>
@@ -11079,8 +11285,8 @@ The
option suppresses shell function lookup, as with the <B>command</B> builtin.
<B>type</B>
returns true if any of the arguments are found, false if
none are found.
returns true if all of the arguments are found, false if
any are not found.
<DT><B>ulimit</B> [<B>-HSTabcdefilmnpqrstuvx</B> [<I>limit</I>]]<DD>
Provides control over the resources available to the shell and to
processes started by it, on systems that allow such control.
@@ -11338,7 +11544,7 @@ process or job waited for.
</DL>
<A NAME="lbDA">&nbsp;</A>
<A NAME="lbDB">&nbsp;</A>
<H3>RESTRICTED SHELL</H3>
@@ -11452,7 +11658,7 @@ turns off any restrictions in the shell spawned to execute the
script.
<A NAME="lbDB">&nbsp;</A>
<A NAME="lbDC">&nbsp;</A>
<H3>SEE ALSO</H3>
@@ -11466,7 +11672,7 @@ script.
<DT><I>readline</I>(3)<DD>
</DL>
<A NAME="lbDC">&nbsp;</A>
<A NAME="lbDD">&nbsp;</A>
<H3>FILES</H3>
@@ -11503,7 +11709,7 @@ The individual login shell cleanup file, executed when a login shell exits
Individual <I>readline</I> initialization file
</DL>
<A NAME="lbDD">&nbsp;</A>
<A NAME="lbDE">&nbsp;</A>
<H3>AUTHORS</H3>
Brian Fox, Free Software Foundation
@@ -11516,7 +11722,7 @@ Chet Ramey, Case Western Reserve University
<BR>
<A HREF="mailto:chet@po.cwru.edu">chet@po.cwru.edu</A>
<A NAME="lbDE">&nbsp;</A>
<A NAME="lbDF">&nbsp;</A>
<H3>BUG REPORTS</H3>
If you find a bug in
@@ -11567,7 +11773,7 @@ Comments and bug reports concerning
this manual page should be directed to
<I><A HREF="mailto:chet@po.cwru.edu">chet@po.cwru.edu</A></I>.
<A NAME="lbDF">&nbsp;</A>
<A NAME="lbDG">&nbsp;</A>
<H3>BUGS</H3>
<P>
@@ -11617,7 +11823,7 @@ Array variables may not (yet) be exported.
<HR>
<TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>GNU Bash-3.2<TH ALIGN=CENTER width=33%>2008 April 5<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>GNU Bash-4.0<TH ALIGN=CENTER width=33%>2008 May 25<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<HR>
@@ -11667,60 +11873,61 @@ Array variables may not (yet) be exported.
<DT><A HREF="#lbBJ">Redirecting Output</A><DD>
<DT><A HREF="#lbBK">Appending Redirected Output</A><DD>
<DT><A HREF="#lbBL">Redirecting Standard Output and Standard Error</A><DD>
<DT><A HREF="#lbBM">Here Documents</A><DD>
<DT><A HREF="#lbBN">Here Strings</A><DD>
<DT><A HREF="#lbBO">Duplicating File Descriptors</A><DD>
<DT><A HREF="#lbBP">Moving File Descriptors</A><DD>
<DT><A HREF="#lbBQ">Opening File Descriptors for Reading and Writing</A><DD>
<DT><A HREF="#lbBM">Appending Standard Output and Standard Error</A><DD>
<DT><A HREF="#lbBN">Here Documents</A><DD>
<DT><A HREF="#lbBO">Here Strings</A><DD>
<DT><A HREF="#lbBP">Duplicating File Descriptors</A><DD>
<DT><A HREF="#lbBQ">Moving File Descriptors</A><DD>
<DT><A HREF="#lbBR">Opening File Descriptors for Reading and Writing</A><DD>
</DL>
<DT><A HREF="#lbBR">ALIASES</A><DD>
<DT><A HREF="#lbBS">FUNCTIONS</A><DD>
<DT><A HREF="#lbBT">ARITHMETIC EVALUATION</A><DD>
<DT><A HREF="#lbBU">CONDITIONAL EXPRESSIONS</A><DD>
<DT><A HREF="#lbBV">SIMPLE COMMAND EXPANSION</A><DD>
<DT><A HREF="#lbBW">COMMAND EXECUTION</A><DD>
<DT><A HREF="#lbBX">COMMAND EXECUTION ENVIRONMENT</A><DD>
<DT><A HREF="#lbBY">ENVIRONMENT</A><DD>
<DT><A HREF="#lbBZ">EXIT STATUS</A><DD>
<DT><A HREF="#lbCA">SIGNALS</A><DD>
<DT><A HREF="#lbCB">JOB CONTROL</A><DD>
<DT><A HREF="#lbCC">PROMPTING</A><DD>
<DT><A HREF="#lbCD">READLINE</A><DD>
<DT><A HREF="#lbBS">ALIASES</A><DD>
<DT><A HREF="#lbBT">FUNCTIONS</A><DD>
<DT><A HREF="#lbBU">ARITHMETIC EVALUATION</A><DD>
<DT><A HREF="#lbBV">CONDITIONAL EXPRESSIONS</A><DD>
<DT><A HREF="#lbBW">SIMPLE COMMAND EXPANSION</A><DD>
<DT><A HREF="#lbBX">COMMAND EXECUTION</A><DD>
<DT><A HREF="#lbBY">COMMAND EXECUTION ENVIRONMENT</A><DD>
<DT><A HREF="#lbBZ">ENVIRONMENT</A><DD>
<DT><A HREF="#lbCA">EXIT STATUS</A><DD>
<DT><A HREF="#lbCB">SIGNALS</A><DD>
<DT><A HREF="#lbCC">JOB CONTROL</A><DD>
<DT><A HREF="#lbCD">PROMPTING</A><DD>
<DT><A HREF="#lbCE">READLINE</A><DD>
<DL>
<DT><A HREF="#lbCE">Readline Notation</A><DD>
<DT><A HREF="#lbCF">Readline Initialization</A><DD>
<DT><A HREF="#lbCG">Readline Key Bindings</A><DD>
<DT><A HREF="#lbCH">Readline Variables</A><DD>
<DT><A HREF="#lbCI">Readline Conditional Constructs</A><DD>
<DT><A HREF="#lbCJ">Searching</A><DD>
<DT><A HREF="#lbCK">Readline Command Names</A><DD>
<DT><A HREF="#lbCL">Commands for Moving</A><DD>
<DT><A HREF="#lbCM">Commands for Manipulating the History</A><DD>
<DT><A HREF="#lbCN">Commands for Changing Text</A><DD>
<DT><A HREF="#lbCO">Killing and Yanking</A><DD>
<DT><A HREF="#lbCP">Numeric Arguments</A><DD>
<DT><A HREF="#lbCQ">Completing</A><DD>
<DT><A HREF="#lbCR">Keyboard Macros</A><DD>
<DT><A HREF="#lbCS">Miscellaneous</A><DD>
<DT><A HREF="#lbCT">Programmable Completion</A><DD>
<DT><A HREF="#lbCF">Readline Notation</A><DD>
<DT><A HREF="#lbCG">Readline Initialization</A><DD>
<DT><A HREF="#lbCH">Readline Key Bindings</A><DD>
<DT><A HREF="#lbCI">Readline Variables</A><DD>
<DT><A HREF="#lbCJ">Readline Conditional Constructs</A><DD>
<DT><A HREF="#lbCK">Searching</A><DD>
<DT><A HREF="#lbCL">Readline Command Names</A><DD>
<DT><A HREF="#lbCM">Commands for Moving</A><DD>
<DT><A HREF="#lbCN">Commands for Manipulating the History</A><DD>
<DT><A HREF="#lbCO">Commands for Changing Text</A><DD>
<DT><A HREF="#lbCP">Killing and Yanking</A><DD>
<DT><A HREF="#lbCQ">Numeric Arguments</A><DD>
<DT><A HREF="#lbCR">Completing</A><DD>
<DT><A HREF="#lbCS">Keyboard Macros</A><DD>
<DT><A HREF="#lbCT">Miscellaneous</A><DD>
<DT><A HREF="#lbCU">Programmable Completion</A><DD>
</DL>
<DT><A HREF="#lbCU">HISTORY</A><DD>
<DT><A HREF="#lbCV">HISTORY EXPANSION</A><DD>
<DT><A HREF="#lbCV">HISTORY</A><DD>
<DT><A HREF="#lbCW">HISTORY EXPANSION</A><DD>
<DL>
<DT><A HREF="#lbCW">Event Designators</A><DD>
<DT><A HREF="#lbCX">Word Designators</A><DD>
<DT><A HREF="#lbCY">Modifiers</A><DD>
<DT><A HREF="#lbCX">Event Designators</A><DD>
<DT><A HREF="#lbCY">Word Designators</A><DD>
<DT><A HREF="#lbCZ">Modifiers</A><DD>
</DL>
<DT><A HREF="#lbCZ">SHELL BUILTIN COMMANDS</A><DD>
<DT><A HREF="#lbDA">RESTRICTED SHELL</A><DD>
<DT><A HREF="#lbDB">SEE ALSO</A><DD>
<DT><A HREF="#lbDC">FILES</A><DD>
<DT><A HREF="#lbDD">AUTHORS</A><DD>
<DT><A HREF="#lbDE">BUG REPORTS</A><DD>
<DT><A HREF="#lbDF">BUGS</A><DD>
<DT><A HREF="#lbDA">SHELL BUILTIN COMMANDS</A><DD>
<DT><A HREF="#lbDB">RESTRICTED SHELL</A><DD>
<DT><A HREF="#lbDC">SEE ALSO</A><DD>
<DT><A HREF="#lbDD">FILES</A><DD>
<DT><A HREF="#lbDE">AUTHORS</A><DD>
<DT><A HREF="#lbDF">BUG REPORTS</A><DD>
<DT><A HREF="#lbDG">BUGS</A><DD>
</DL>
<HR>
This document was created by man2html from bash.1.<BR>
Time: 08 April 2008 09:50:33 EDT
Time: 29 May 2008 11:48:48 EDT
</BODY>
</HTML>
BIN
View File
Binary file not shown.
+5458 -5314
View File
File diff suppressed because it is too large Load Diff
+51 -51
View File
@@ -56,7 +56,7 @@
@xrdef{Compound Commands-pg}{9}
@xrdef{Compound Commands-snt}{Section@tie 3.2.4}
@xrdef{Looping Constructs-title}{Looping Constructs}
@xrdef{Looping Constructs-pg}{9}
@xrdef{Looping Constructs-pg}{10}
@xrdef{Looping Constructs-snt}{Section@tie 3.2.4.1}
@xrdef{Conditional Constructs-title}{Conditional Constructs}
@xrdef{Conditional Constructs-pg}{10}
@@ -71,7 +71,7 @@
@xrdef{Shell Parameters-pg}{15}
@xrdef{Shell Parameters-snt}{Section@tie 3.4}
@xrdef{Positional Parameters-title}{Positional Parameters}
@xrdef{Positional Parameters-pg}{15}
@xrdef{Positional Parameters-pg}{16}
@xrdef{Positional Parameters-snt}{Section@tie 3.4.1}
@xrdef{Special Parameters-title}{Special Parameters}
@xrdef{Special Parameters-pg}{16}
@@ -80,7 +80,7 @@
@xrdef{Shell Expansions-pg}{17}
@xrdef{Shell Expansions-snt}{Section@tie 3.5}
@xrdef{Brace Expansion-title}{Brace Expansion}
@xrdef{Brace Expansion-pg}{17}
@xrdef{Brace Expansion-pg}{18}
@xrdef{Brace Expansion-snt}{Section@tie 3.5.1}
@xrdef{Tilde Expansion-title}{Tilde Expansion}
@xrdef{Tilde Expansion-pg}{18}
@@ -89,7 +89,7 @@
@xrdef{Shell Parameter Expansion-pg}{19}
@xrdef{Shell Parameter Expansion-snt}{Section@tie 3.5.3}
@xrdef{Command Substitution-title}{Command Substitution}
@xrdef{Command Substitution-pg}{21}
@xrdef{Command Substitution-pg}{22}
@xrdef{Command Substitution-snt}{Section@tie 3.5.4}
@xrdef{Arithmetic Expansion-title}{Arithmetic Expansion}
@xrdef{Arithmetic Expansion-pg}{22}
@@ -113,13 +113,13 @@
@xrdef{Redirections-pg}{25}
@xrdef{Redirections-snt}{Section@tie 3.6}
@xrdef{Executing Commands-title}{Executing Commands}
@xrdef{Executing Commands-pg}{28}
@xrdef{Executing Commands-pg}{29}
@xrdef{Executing Commands-snt}{Section@tie 3.7}
@xrdef{Simple Command Expansion-title}{Simple Command Expansion}
@xrdef{Simple Command Expansion-pg}{28}
@xrdef{Simple Command Expansion-pg}{29}
@xrdef{Simple Command Expansion-snt}{Section@tie 3.7.1}
@xrdef{Command Search and Execution-title}{Command Search and Execution}
@xrdef{Command Search and Execution-pg}{29}
@xrdef{Command Search and Execution-pg}{30}
@xrdef{Command Search and Execution-snt}{Section@tie 3.7.2}
@xrdef{Command Execution Environment-title}{Command Execution Environment}
@xrdef{Command Execution Environment-pg}{30}
@@ -128,13 +128,13 @@
@xrdef{Environment-pg}{31}
@xrdef{Environment-snt}{Section@tie 3.7.4}
@xrdef{Exit Status-title}{Exit Status}
@xrdef{Exit Status-pg}{31}
@xrdef{Exit Status-pg}{32}
@xrdef{Exit Status-snt}{Section@tie 3.7.5}
@xrdef{Signals-title}{Signals}
@xrdef{Signals-pg}{32}
@xrdef{Signals-snt}{Section@tie 3.7.6}
@xrdef{Shell Scripts-title}{Shell Scripts}
@xrdef{Shell Scripts-pg}{32}
@xrdef{Shell Scripts-pg}{33}
@xrdef{Shell Scripts-snt}{Section@tie 3.8}
@xrdef{Shell Builtin Commands-title}{Shell Builtin Commands}
@xrdef{Shell Builtin Commands-pg}{35}
@@ -146,16 +146,16 @@
@xrdef{Bash Builtins-pg}{41}
@xrdef{Bash Builtins-snt}{Section@tie 4.2}
@xrdef{Modifying Shell Behavior-title}{Modifying Shell Behavior}
@xrdef{Modifying Shell Behavior-pg}{49}
@xrdef{Modifying Shell Behavior-pg}{50}
@xrdef{Modifying Shell Behavior-snt}{Section@tie 4.3}
@xrdef{The Set Builtin-title}{The Set Builtin}
@xrdef{The Set Builtin-pg}{49}
@xrdef{The Set Builtin-pg}{50}
@xrdef{The Set Builtin-snt}{Section@tie 4.3.1}
@xrdef{The Shopt Builtin-title}{The Shopt Builtin}
@xrdef{The Shopt Builtin-pg}{53}
@xrdef{The Shopt Builtin-pg}{54}
@xrdef{The Shopt Builtin-snt}{Section@tie 4.3.2}
@xrdef{Special Builtins-title}{Special Builtins}
@xrdef{Special Builtins-pg}{57}
@xrdef{Special Builtins-pg}{58}
@xrdef{Special Builtins-snt}{Section@tie 4.4}
@xrdef{Shell Variables-title}{Shell Variables}
@xrdef{Shell Variables-pg}{59}
@@ -260,116 +260,116 @@
@xrdef{Conditional Init Constructs-pg}{100}
@xrdef{Conditional Init Constructs-snt}{Section@tie 8.3.2}
@xrdef{Sample Init File-title}{Sample Init File}
@xrdef{Sample Init File-pg}{100}
@xrdef{Sample Init File-pg}{101}
@xrdef{Sample Init File-snt}{Section@tie 8.3.3}
@xrdef{Bindable Readline Commands-title}{Bindable Readline Commands}
@xrdef{Bindable Readline Commands-pg}{103}
@xrdef{Bindable Readline Commands-pg}{104}
@xrdef{Bindable Readline Commands-snt}{Section@tie 8.4}
@xrdef{Commands For Moving-title}{Commands For Moving}
@xrdef{Commands For Moving-pg}{103}
@xrdef{Commands For Moving-pg}{104}
@xrdef{Commands For Moving-snt}{Section@tie 8.4.1}
@xrdef{Commands For History-title}{Commands For Manipulating The History}
@xrdef{Commands For History-pg}{103}
@xrdef{Commands For History-pg}{104}
@xrdef{Commands For History-snt}{Section@tie 8.4.2}
@xrdef{Commands For Text-title}{Commands For Changing Text}
@xrdef{Commands For Text-pg}{105}
@xrdef{Commands For Text-pg}{106}
@xrdef{Commands For Text-snt}{Section@tie 8.4.3}
@xrdef{Commands For Killing-title}{Killing And Yanking}
@xrdef{Commands For Killing-pg}{106}
@xrdef{Commands For Killing-pg}{107}
@xrdef{Commands For Killing-snt}{Section@tie 8.4.4}
@xrdef{Numeric Arguments-title}{Specifying Numeric Arguments}
@xrdef{Numeric Arguments-pg}{107}
@xrdef{Numeric Arguments-pg}{108}
@xrdef{Numeric Arguments-snt}{Section@tie 8.4.5}
@xrdef{Commands For Completion-title}{Letting Readline Type For You}
@xrdef{Commands For Completion-pg}{107}
@xrdef{Commands For Completion-pg}{108}
@xrdef{Commands For Completion-snt}{Section@tie 8.4.6}
@xrdef{Keyboard Macros-title}{Keyboard Macros}
@xrdef{Keyboard Macros-pg}{108}
@xrdef{Keyboard Macros-pg}{110}
@xrdef{Keyboard Macros-snt}{Section@tie 8.4.7}
@xrdef{Miscellaneous Commands-title}{Some Miscellaneous Commands}
@xrdef{Miscellaneous Commands-pg}{109}
@xrdef{Miscellaneous Commands-pg}{110}
@xrdef{Miscellaneous Commands-snt}{Section@tie 8.4.8}
@xrdef{Readline vi Mode-title}{Readline vi Mode}
@xrdef{Readline vi Mode-pg}{111}
@xrdef{Readline vi Mode-pg}{112}
@xrdef{Readline vi Mode-snt}{Section@tie 8.5}
@xrdef{Programmable Completion-title}{Programmable Completion}
@xrdef{Programmable Completion-pg}{111}
@xrdef{Programmable Completion-pg}{112}
@xrdef{Programmable Completion-snt}{Section@tie 8.6}
@xrdef{Programmable Completion Builtins-title}{Programmable Completion Builtins}
@xrdef{Programmable Completion Builtins-pg}{113}
@xrdef{Programmable Completion Builtins-pg}{114}
@xrdef{Programmable Completion Builtins-snt}{Section@tie 8.7}
@xrdef{Using History Interactively-title}{Using History Interactively}
@xrdef{Using History Interactively-pg}{117}
@xrdef{Using History Interactively-pg}{119}
@xrdef{Using History Interactively-snt}{Chapter@tie 9}
@xrdef{Bash History Facilities-title}{Bash History Facilities}
@xrdef{Bash History Facilities-pg}{117}
@xrdef{Bash History Facilities-pg}{119}
@xrdef{Bash History Facilities-snt}{Section@tie 9.1}
@xrdef{Bash History Builtins-title}{Bash History Builtins}
@xrdef{Bash History Builtins-pg}{117}
@xrdef{Bash History Builtins-pg}{119}
@xrdef{Bash History Builtins-snt}{Section@tie 9.2}
@xrdef{History Interaction-title}{History Expansion}
@xrdef{History Interaction-pg}{119}
@xrdef{History Interaction-pg}{121}
@xrdef{History Interaction-snt}{Section@tie 9.3}
@xrdef{Event Designators-title}{Event Designators}
@xrdef{Event Designators-pg}{120}
@xrdef{Event Designators-pg}{122}
@xrdef{Event Designators-snt}{Section@tie 9.3.1}
@xrdef{Word Designators-title}{Word Designators}
@xrdef{Word Designators-pg}{120}
@xrdef{Word Designators-pg}{122}
@xrdef{Word Designators-snt}{Section@tie 9.3.2}
@xrdef{Modifiers-title}{Modifiers}
@xrdef{Modifiers-pg}{121}
@xrdef{Modifiers-pg}{123}
@xrdef{Modifiers-snt}{Section@tie 9.3.3}
@xrdef{Installing Bash-title}{Installing Bash}
@xrdef{Installing Bash-pg}{123}
@xrdef{Installing Bash-pg}{125}
@xrdef{Installing Bash-snt}{Chapter@tie 10}
@xrdef{Basic Installation-title}{Basic Installation}
@xrdef{Basic Installation-pg}{123}
@xrdef{Basic Installation-pg}{125}
@xrdef{Basic Installation-snt}{Section@tie 10.1}
@xrdef{Compilers and Options-title}{Compilers and Options}
@xrdef{Compilers and Options-pg}{124}
@xrdef{Compilers and Options-pg}{126}
@xrdef{Compilers and Options-snt}{Section@tie 10.2}
@xrdef{Compiling For Multiple Architectures-title}{Compiling For Multiple Architectures}
@xrdef{Compiling For Multiple Architectures-pg}{124}
@xrdef{Compiling For Multiple Architectures-pg}{126}
@xrdef{Compiling For Multiple Architectures-snt}{Section@tie 10.3}
@xrdef{Installation Names-title}{Installation Names}
@xrdef{Installation Names-pg}{124}
@xrdef{Installation Names-pg}{126}
@xrdef{Installation Names-snt}{Section@tie 10.4}
@xrdef{Specifying the System Type-title}{Specifying the System Type}
@xrdef{Specifying the System Type-pg}{125}
@xrdef{Specifying the System Type-pg}{127}
@xrdef{Specifying the System Type-snt}{Section@tie 10.5}
@xrdef{Sharing Defaults-title}{Sharing Defaults}
@xrdef{Sharing Defaults-pg}{125}
@xrdef{Sharing Defaults-pg}{127}
@xrdef{Sharing Defaults-snt}{Section@tie 10.6}
@xrdef{Operation Controls-title}{Operation Controls}
@xrdef{Operation Controls-pg}{125}
@xrdef{Operation Controls-pg}{127}
@xrdef{Operation Controls-snt}{Section@tie 10.7}
@xrdef{Optional Features-title}{Optional Features}
@xrdef{Optional Features-pg}{125}
@xrdef{Optional Features-pg}{127}
@xrdef{Optional Features-snt}{Section@tie 10.8}
@xrdef{Reporting Bugs-title}{Reporting Bugs}
@xrdef{Reporting Bugs-pg}{131}
@xrdef{Reporting Bugs-pg}{133}
@xrdef{Reporting Bugs-snt}{Appendix@tie @char65{}}
@xrdef{Major Differences From The Bourne Shell-title}{Major Differences From The Bourne Shell}
@xrdef{Major Differences From The Bourne Shell-pg}{133}
@xrdef{Major Differences From The Bourne Shell-pg}{135}
@xrdef{Major Differences From The Bourne Shell-snt}{Appendix@tie @char66{}}
@xrdef{GNU Free Documentation License-title}{GNU Free Documentation License}
@xrdef{GNU Free Documentation License-pg}{139}
@xrdef{GNU Free Documentation License-pg}{141}
@xrdef{GNU Free Documentation License-snt}{Appendix@tie @char67{}}
@xrdef{Indexes-title}{Indexes}
@xrdef{Indexes-pg}{147}
@xrdef{Indexes-pg}{149}
@xrdef{Indexes-snt}{Appendix@tie @char68{}}
@xrdef{Builtin Index-title}{Index of Shell Builtin Commands}
@xrdef{Builtin Index-pg}{148}
@xrdef{Builtin Index-pg}{149}
@xrdef{Builtin Index-snt}{Section@tie @char68.1}
@xrdef{Reserved Word Index-title}{Index of Shell Reserved Words}
@xrdef{Reserved Word Index-pg}{149}
@xrdef{Reserved Word Index-pg}{150}
@xrdef{Reserved Word Index-snt}{Section@tie @char68.2}
@xrdef{Variable Index-title}{Parameter and Variable Index}
@xrdef{Variable Index-pg}{149}
@xrdef{Variable Index-pg}{150}
@xrdef{Variable Index-snt}{Section@tie @char68.3}
@xrdef{Function Index-title}{Function Index}
@xrdef{Function Index-pg}{151}
@xrdef{Function Index-pg}{152}
@xrdef{Function Index-snt}{Section@tie @char68.4}
@xrdef{Concept Index-title}{Concept Index}
@xrdef{Concept Index-pg}{153}
@xrdef{Concept Index-pg}{154}
@xrdef{Concept Index-snt}{Section@tie @char68.5}
+16 -15
View File
@@ -22,24 +22,25 @@
\entry{alias}{41}{\code {alias}}
\entry{bind}{41}{\code {bind}}
\entry{builtin}{42}{\code {builtin}}
\entry{caller}{42}{\code {caller}}
\entry{caller}{43}{\code {caller}}
\entry{command}{43}{\code {command}}
\entry{declare}{43}{\code {declare}}
\entry{echo}{44}{\code {echo}}
\entry{enable}{45}{\code {enable}}
\entry{help}{45}{\code {help}}
\entry{let}{45}{\code {let}}
\entry{let}{46}{\code {let}}
\entry{local}{46}{\code {local}}
\entry{logout}{46}{\code {logout}}
\entry{mapfile}{46}{\code {mapfile}}
\entry{printf}{46}{\code {printf}}
\entry{read}{46}{\code {read}}
\entry{source}{47}{\code {source}}
\entry{type}{47}{\code {type}}
\entry{typeset}{48}{\code {typeset}}
\entry{ulimit}{48}{\code {ulimit}}
\entry{unalias}{49}{\code {unalias}}
\entry{set}{49}{\code {set}}
\entry{shopt}{53}{\code {shopt}}
\entry{read}{47}{\code {read}}
\entry{source}{48}{\code {source}}
\entry{type}{48}{\code {type}}
\entry{typeset}{49}{\code {typeset}}
\entry{ulimit}{49}{\code {ulimit}}
\entry{unalias}{50}{\code {unalias}}
\entry{set}{50}{\code {set}}
\entry{shopt}{54}{\code {shopt}}
\entry{dirs}{79}{\code {dirs}}
\entry{popd}{80}{\code {popd}}
\entry{pushd}{80}{\code {pushd}}
@@ -50,8 +51,8 @@
\entry{wait}{89}{\code {wait}}
\entry{disown}{89}{\code {disown}}
\entry{suspend}{89}{\code {suspend}}
\entry{compgen}{113}{\code {compgen}}
\entry{complete}{113}{\code {complete}}
\entry{compopt}{116}{\code {compopt}}
\entry{fc}{118}{\code {fc}}
\entry{history}{118}{\code {history}}
\entry{compgen}{114}{\code {compgen}}
\entry{complete}{114}{\code {complete}}
\entry{compopt}{117}{\code {compopt}}
\entry{fc}{120}{\code {fc}}
\entry{history}{120}{\code {history}}
+17 -15
View File
@@ -12,12 +12,12 @@
\entry {\code {break}}{35}
\entry {\code {builtin}}{42}
\initial {C}
\entry {\code {caller}}{42}
\entry {\code {caller}}{43}
\entry {\code {cd}}{36}
\entry {\code {command}}{43}
\entry {\code {compgen}}{113}
\entry {\code {complete}}{113}
\entry {\code {compopt}}{116}
\entry {\code {compgen}}{114}
\entry {\code {complete}}{114}
\entry {\code {compopt}}{117}
\entry {\code {continue}}{36}
\initial {D}
\entry {\code {declare}}{43}
@@ -31,47 +31,49 @@
\entry {\code {exit}}{36}
\entry {\code {export}}{36}
\initial {F}
\entry {\code {fc}}{118}
\entry {\code {fc}}{120}
\entry {\code {fg}}{88}
\initial {G}
\entry {\code {getopts}}{37}
\initial {H}
\entry {\code {hash}}{37}
\entry {\code {help}}{45}
\entry {\code {history}}{118}
\entry {\code {history}}{120}
\initial {J}
\entry {\code {jobs}}{88}
\initial {K}
\entry {\code {kill}}{89}
\initial {L}
\entry {\code {let}}{45}
\entry {\code {let}}{46}
\entry {\code {local}}{46}
\entry {\code {logout}}{46}
\initial {M}
\entry {\code {mapfile}}{46}
\initial {P}
\entry {\code {popd}}{80}
\entry {\code {printf}}{46}
\entry {\code {pushd}}{80}
\entry {\code {pwd}}{38}
\initial {R}
\entry {\code {read}}{46}
\entry {\code {read}}{47}
\entry {\code {readonly}}{38}
\entry {\code {return}}{38}
\initial {S}
\entry {\code {set}}{49}
\entry {\code {set}}{50}
\entry {\code {shift}}{38}
\entry {\code {shopt}}{53}
\entry {\code {source}}{47}
\entry {\code {shopt}}{54}
\entry {\code {source}}{48}
\entry {\code {suspend}}{89}
\initial {T}
\entry {\code {test}}{39}
\entry {\code {times}}{40}
\entry {\code {trap}}{40}
\entry {\code {type}}{47}
\entry {\code {typeset}}{48}
\entry {\code {type}}{48}
\entry {\code {typeset}}{49}
\initial {U}
\entry {\code {ulimit}}{48}
\entry {\code {ulimit}}{49}
\entry {\code {umask}}{40}
\entry {\code {unalias}}{49}
\entry {\code {unalias}}{50}
\entry {\code {unset}}{41}
\initial {W}
\entry {\code {wait}}{89}
+24 -24
View File
@@ -33,7 +33,7 @@
\entry{command timing}{8}{command timing}
\entry{commands, lists}{9}{commands, lists}
\entry{commands, compound}{9}{commands, compound}
\entry{commands, looping}{9}{commands, looping}
\entry{commands, looping}{10}{commands, looping}
\entry{commands, conditional}{10}{commands, conditional}
\entry{commands, grouping}{13}{commands, grouping}
\entry{shell function}{14}{shell function}
@@ -41,16 +41,16 @@
\entry{parameters}{15}{parameters}
\entry{variable, shell}{15}{variable, shell}
\entry{shell variable}{15}{shell variable}
\entry{parameters, positional}{15}{parameters, positional}
\entry{parameters, positional}{16}{parameters, positional}
\entry{parameters, special}{16}{parameters, special}
\entry{expansion}{17}{expansion}
\entry{brace expansion}{17}{brace expansion}
\entry{expansion, brace}{17}{expansion, brace}
\entry{brace expansion}{18}{brace expansion}
\entry{expansion, brace}{18}{expansion, brace}
\entry{tilde expansion}{18}{tilde expansion}
\entry{expansion, tilde}{18}{expansion, tilde}
\entry{parameter expansion}{19}{parameter expansion}
\entry{expansion, parameter}{19}{expansion, parameter}
\entry{command substitution}{21}{command substitution}
\entry{command substitution}{22}{command substitution}
\entry{expansion, arithmetic}{22}{expansion, arithmetic}
\entry{arithmetic expansion}{22}{arithmetic expansion}
\entry{process substitution}{22}{process substitution}
@@ -62,15 +62,15 @@
\entry{pattern matching}{24}{pattern matching}
\entry{matching, pattern}{24}{matching, pattern}
\entry{redirection}{25}{redirection}
\entry{command expansion}{28}{command expansion}
\entry{command execution}{29}{command execution}
\entry{command search}{29}{command search}
\entry{command expansion}{29}{command expansion}
\entry{command execution}{30}{command execution}
\entry{command search}{30}{command search}
\entry{execution environment}{30}{execution environment}
\entry{environment}{31}{environment}
\entry{exit status}{31}{exit status}
\entry{exit status}{32}{exit status}
\entry{signal handling}{32}{signal handling}
\entry{shell script}{32}{shell script}
\entry{special builtin}{57}{special builtin}
\entry{shell script}{33}{shell script}
\entry{special builtin}{58}{special builtin}
\entry{login shell}{71}{login shell}
\entry{interactive shell}{71}{interactive shell}
\entry{startup files}{71}{startup files}
@@ -102,16 +102,16 @@
\entry{kill ring}{93}{kill ring}
\entry{initialization file, readline}{94}{initialization file, readline}
\entry{variables, readline}{95}{variables, readline}
\entry{programmable completion}{111}{programmable completion}
\entry{completion builtins}{113}{completion builtins}
\entry{History, how to use}{116}{History, how to use}
\entry{command history}{117}{command history}
\entry{history list}{117}{history list}
\entry{history builtins}{117}{history builtins}
\entry{history expansion}{119}{history expansion}
\entry{event designators}{120}{event designators}
\entry{history events}{120}{history events}
\entry{installation}{123}{installation}
\entry{configuration}{123}{configuration}
\entry{Bash installation}{123}{Bash installation}
\entry{Bash configuration}{123}{Bash configuration}
\entry{programmable completion}{112}{programmable completion}
\entry{completion builtins}{114}{completion builtins}
\entry{History, how to use}{117}{History, how to use}
\entry{command history}{119}{command history}
\entry{history list}{119}{history list}
\entry{history builtins}{119}{history builtins}
\entry{history expansion}{121}{history expansion}
\entry{event designators}{122}{event designators}
\entry{history events}{122}{history events}
\entry{installation}{125}{installation}
\entry{configuration}{125}{configuration}
\entry{Bash installation}{125}{Bash installation}
\entry{Bash configuration}{125}{Bash configuration}
+24 -24
View File
@@ -6,30 +6,30 @@
\entry {arrays}{78}
\initial {B}
\entry {background}{87}
\entry {Bash configuration}{123}
\entry {Bash installation}{123}
\entry {Bash configuration}{125}
\entry {Bash installation}{125}
\entry {Bourne shell}{5}
\entry {brace expansion}{17}
\entry {brace expansion}{18}
\entry {builtin}{3}
\initial {C}
\entry {command editing}{91}
\entry {command execution}{29}
\entry {command expansion}{28}
\entry {command history}{117}
\entry {command search}{29}
\entry {command substitution}{21}
\entry {command execution}{30}
\entry {command expansion}{29}
\entry {command history}{119}
\entry {command search}{30}
\entry {command substitution}{22}
\entry {command timing}{8}
\entry {commands, compound}{9}
\entry {commands, conditional}{10}
\entry {commands, grouping}{13}
\entry {commands, lists}{9}
\entry {commands, looping}{9}
\entry {commands, looping}{10}
\entry {commands, pipelines}{8}
\entry {commands, shell}{8}
\entry {commands, simple}{8}
\entry {comments, shell}{7}
\entry {completion builtins}{113}
\entry {configuration}{123}
\entry {completion builtins}{114}
\entry {configuration}{125}
\entry {control operator}{3}
\initial {D}
\entry {directory stack}{79}
@@ -37,12 +37,12 @@
\entry {editing command lines}{91}
\entry {environment}{31}
\entry {evaluation, arithmetic}{76}
\entry {event designators}{120}
\entry {event designators}{122}
\entry {execution environment}{30}
\entry {exit status}{3, 31}
\entry {exit status}{3, 32}
\entry {expansion}{17}
\entry {expansion, arithmetic}{22}
\entry {expansion, brace}{17}
\entry {expansion, brace}{18}
\entry {expansion, filename}{23}
\entry {expansion, parameter}{19}
\entry {expansion, pathname}{23}
@@ -56,15 +56,15 @@
\entry {foreground}{87}
\entry {functions, shell}{14}
\initial {H}
\entry {history builtins}{117}
\entry {history events}{120}
\entry {history expansion}{119}
\entry {history list}{117}
\entry {History, how to use}{116}
\entry {history builtins}{119}
\entry {history events}{122}
\entry {history expansion}{121}
\entry {history list}{119}
\entry {History, how to use}{117}
\initial {I}
\entry {identifier}{3}
\entry {initialization file, readline}{94}
\entry {installation}{123}
\entry {installation}{125}
\entry {interaction, readline}{91}
\entry {interactive shell}{71, 73}
\entry {internationalization}{7}
@@ -89,7 +89,7 @@
\initial {P}
\entry {parameter expansion}{19}
\entry {parameters}{15}
\entry {parameters, positional}{15}
\entry {parameters, positional}{16}
\entry {parameters, special}{16}
\entry {pathname expansion}{23}
\entry {pattern matching}{24}
@@ -99,7 +99,7 @@
\entry {process group}{3}
\entry {process group ID}{3}
\entry {process substitution}{22}
\entry {programmable completion}{111}
\entry {programmable completion}{112}
\entry {prompting}{81}
\initial {Q}
\entry {quoting}{6}
@@ -113,12 +113,12 @@
\initial {S}
\entry {shell arithmetic}{76}
\entry {shell function}{14}
\entry {shell script}{32}
\entry {shell script}{33}
\entry {shell variable}{15}
\entry {shell, interactive}{73}
\entry {signal}{4}
\entry {signal handling}{32}
\entry {special builtin}{4, 57}
\entry {special builtin}{4, 58}
\entry {startup files}{71}
\entry {suspending jobs}{87}
\initial {T}
BIN
View File
Binary file not shown.
+97 -96
View File
@@ -1,96 +1,97 @@
\entry{beginning-of-line (C-a)}{103}{\code {beginning-of-line (C-a)}}
\entry{end-of-line (C-e)}{103}{\code {end-of-line (C-e)}}
\entry{forward-char (C-f)}{103}{\code {forward-char (C-f)}}
\entry{backward-char (C-b)}{103}{\code {backward-char (C-b)}}
\entry{forward-word (M-f)}{103}{\code {forward-word (M-f)}}
\entry{backward-word (M-b)}{103}{\code {backward-word (M-b)}}
\entry{clear-screen (C-l)}{103}{\code {clear-screen (C-l)}}
\entry{redraw-current-line ()}{103}{\code {redraw-current-line ()}}
\entry{accept-line (Newline or Return)}{103}{\code {accept-line (Newline or Return)}}
\entry{previous-history (C-p)}{104}{\code {previous-history (C-p)}}
\entry{next-history (C-n)}{104}{\code {next-history (C-n)}}
\entry{beginning-of-history (M-<)}{104}{\code {beginning-of-history (M-<)}}
\entry{end-of-history (M->)}{104}{\code {end-of-history (M->)}}
\entry{reverse-search-history (C-r)}{104}{\code {reverse-search-history (C-r)}}
\entry{forward-search-history (C-s)}{104}{\code {forward-search-history (C-s)}}
\entry{non-incremental-reverse-search-history (M-p)}{104}{\code {non-incremental-reverse-search-history (M-p)}}
\entry{non-incremental-forward-search-history (M-n)}{104}{\code {non-incremental-forward-search-history (M-n)}}
\entry{history-search-forward ()}{104}{\code {history-search-forward ()}}
\entry{history-search-backward ()}{104}{\code {history-search-backward ()}}
\entry{yank-nth-arg (M-C-y)}{104}{\code {yank-nth-arg (M-C-y)}}
\entry{yank-last-arg (M-. or M-_)}{104}{\code {yank-last-arg (M-. or M-_)}}
\entry{delete-char (C-d)}{105}{\code {delete-char (C-d)}}
\entry{backward-delete-char (Rubout)}{105}{\code {backward-delete-char (Rubout)}}
\entry{forward-backward-delete-char ()}{105}{\code {forward-backward-delete-char ()}}
\entry{quoted-insert (C-q or C-v)}{105}{\code {quoted-insert (C-q or C-v)}}
\entry{self-insert (a, b, A, 1, !, ...{})}{105}{\code {self-insert (a, b, A, 1, !, \dots {})}}
\entry{transpose-chars (C-t)}{105}{\code {transpose-chars (C-t)}}
\entry{transpose-words (M-t)}{105}{\code {transpose-words (M-t)}}
\entry{upcase-word (M-u)}{105}{\code {upcase-word (M-u)}}
\entry{downcase-word (M-l)}{105}{\code {downcase-word (M-l)}}
\entry{capitalize-word (M-c)}{105}{\code {capitalize-word (M-c)}}
\entry{overwrite-mode ()}{105}{\code {overwrite-mode ()}}
\entry{kill-line (C-k)}{106}{\code {kill-line (C-k)}}
\entry{backward-kill-line (C-x Rubout)}{106}{\code {backward-kill-line (C-x Rubout)}}
\entry{unix-line-discard (C-u)}{106}{\code {unix-line-discard (C-u)}}
\entry{kill-whole-line ()}{106}{\code {kill-whole-line ()}}
\entry{kill-word (M-d)}{106}{\code {kill-word (M-d)}}
\entry{backward-kill-word (M-DEL)}{106}{\code {backward-kill-word (M-\key {DEL})}}
\entry{unix-word-rubout (C-w)}{106}{\code {unix-word-rubout (C-w)}}
\entry{unix-filename-rubout ()}{106}{\code {unix-filename-rubout ()}}
\entry{delete-horizontal-space ()}{106}{\code {delete-horizontal-space ()}}
\entry{kill-region ()}{106}{\code {kill-region ()}}
\entry{copy-region-as-kill ()}{106}{\code {copy-region-as-kill ()}}
\entry{copy-backward-word ()}{106}{\code {copy-backward-word ()}}
\entry{copy-forward-word ()}{106}{\code {copy-forward-word ()}}
\entry{yank (C-y)}{107}{\code {yank (C-y)}}
\entry{yank-pop (M-y)}{107}{\code {yank-pop (M-y)}}
\entry{digit-argument (M-0, M-1, ...{} M--)}{107}{\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}}
\entry{universal-argument ()}{107}{\code {universal-argument ()}}
\entry{complete (TAB)}{107}{\code {complete (\key {TAB})}}
\entry{possible-completions (M-?)}{107}{\code {possible-completions (M-?)}}
\entry{insert-completions (M-*)}{107}{\code {insert-completions (M-*)}}
\entry{menu-complete ()}{107}{\code {menu-complete ()}}
\entry{delete-char-or-list ()}{108}{\code {delete-char-or-list ()}}
\entry{complete-filename (M-/)}{108}{\code {complete-filename (M-/)}}
\entry{possible-filename-completions (C-x /)}{108}{\code {possible-filename-completions (C-x /)}}
\entry{complete-username (M-~)}{108}{\code {complete-username (M-~)}}
\entry{possible-username-completions (C-x ~)}{108}{\code {possible-username-completions (C-x ~)}}
\entry{complete-variable (M-$)}{108}{\code {complete-variable (M-$)}}
\entry{possible-variable-completions (C-x $)}{108}{\code {possible-variable-completions (C-x $)}}
\entry{complete-hostname (M-@)}{108}{\code {complete-hostname (M-@)}}
\entry{possible-hostname-completions (C-x @)}{108}{\code {possible-hostname-completions (C-x @)}}
\entry{complete-command (M-!)}{108}{\code {complete-command (M-!)}}
\entry{possible-command-completions (C-x !)}{108}{\code {possible-command-completions (C-x !)}}
\entry{dynamic-complete-history (M-TAB)}{108}{\code {dynamic-complete-history (M-\key {TAB})}}
\entry{complete-into-braces (M-{\tt \char 123})}{108}{\code {complete-into-braces (M-{\tt \char 123})}}
\entry{start-kbd-macro (C-x ()}{108}{\code {start-kbd-macro (C-x ()}}
\entry{end-kbd-macro (C-x ))}{109}{\code {end-kbd-macro (C-x ))}}
\entry{call-last-kbd-macro (C-x e)}{109}{\code {call-last-kbd-macro (C-x e)}}
\entry{re-read-init-file (C-x C-r)}{109}{\code {re-read-init-file (C-x C-r)}}
\entry{abort (C-g)}{109}{\code {abort (C-g)}}
\entry{do-uppercase-version (M-a, M-b, M-x, ...{})}{109}{\code {do-uppercase-version (M-a, M-b, M-\var {x}, \dots {})}}
\entry{prefix-meta (ESC)}{109}{\code {prefix-meta (\key {ESC})}}
\entry{undo (C-_ or C-x C-u)}{109}{\code {undo (C-_ or C-x C-u)}}
\entry{revert-line (M-r)}{109}{\code {revert-line (M-r)}}
\entry{tilde-expand (M-&)}{109}{\code {tilde-expand (M-&)}}
\entry{set-mark (C-@)}{109}{\code {set-mark (C-@)}}
\entry{exchange-point-and-mark (C-x C-x)}{109}{\code {exchange-point-and-mark (C-x C-x)}}
\entry{character-search (C-])}{109}{\code {character-search (C-])}}
\entry{character-search-backward (M-C-])}{109}{\code {character-search-backward (M-C-])}}
\entry{insert-comment (M-#)}{110}{\code {insert-comment (M-#)}}
\entry{dump-functions ()}{110}{\code {dump-functions ()}}
\entry{dump-variables ()}{110}{\code {dump-variables ()}}
\entry{dump-macros ()}{110}{\code {dump-macros ()}}
\entry{glob-complete-word (M-g)}{110}{\code {glob-complete-word (M-g)}}
\entry{glob-expand-word (C-x *)}{110}{\code {glob-expand-word (C-x *)}}
\entry{glob-list-expansions (C-x g)}{110}{\code {glob-list-expansions (C-x g)}}
\entry{display-shell-version (C-x C-v)}{110}{\code {display-shell-version (C-x C-v)}}
\entry{shell-expand-line (M-C-e)}{110}{\code {shell-expand-line (M-C-e)}}
\entry{history-expand-line (M-^)}{110}{\code {history-expand-line (M-^)}}
\entry{magic-space ()}{111}{\code {magic-space ()}}
\entry{alias-expand-line ()}{111}{\code {alias-expand-line ()}}
\entry{history-and-alias-expand-line ()}{111}{\code {history-and-alias-expand-line ()}}
\entry{insert-last-argument (M-. or M-_)}{111}{\code {insert-last-argument (M-. or M-_)}}
\entry{operate-and-get-next (C-o)}{111}{\code {operate-and-get-next (C-o)}}
\entry{edit-and-execute-command (C-xC-e)}{111}{\code {edit-and-execute-command (C-xC-e)}}
\entry{beginning-of-line (C-a)}{104}{\code {beginning-of-line (C-a)}}
\entry{end-of-line (C-e)}{104}{\code {end-of-line (C-e)}}
\entry{forward-char (C-f)}{104}{\code {forward-char (C-f)}}
\entry{backward-char (C-b)}{104}{\code {backward-char (C-b)}}
\entry{forward-word (M-f)}{104}{\code {forward-word (M-f)}}
\entry{backward-word (M-b)}{104}{\code {backward-word (M-b)}}
\entry{clear-screen (C-l)}{104}{\code {clear-screen (C-l)}}
\entry{redraw-current-line ()}{104}{\code {redraw-current-line ()}}
\entry{accept-line (Newline or Return)}{104}{\code {accept-line (Newline or Return)}}
\entry{previous-history (C-p)}{105}{\code {previous-history (C-p)}}
\entry{next-history (C-n)}{105}{\code {next-history (C-n)}}
\entry{beginning-of-history (M-<)}{105}{\code {beginning-of-history (M-<)}}
\entry{end-of-history (M->)}{105}{\code {end-of-history (M->)}}
\entry{reverse-search-history (C-r)}{105}{\code {reverse-search-history (C-r)}}
\entry{forward-search-history (C-s)}{105}{\code {forward-search-history (C-s)}}
\entry{non-incremental-reverse-search-history (M-p)}{105}{\code {non-incremental-reverse-search-history (M-p)}}
\entry{non-incremental-forward-search-history (M-n)}{105}{\code {non-incremental-forward-search-history (M-n)}}
\entry{history-search-forward ()}{105}{\code {history-search-forward ()}}
\entry{history-search-backward ()}{105}{\code {history-search-backward ()}}
\entry{yank-nth-arg (M-C-y)}{105}{\code {yank-nth-arg (M-C-y)}}
\entry{yank-last-arg (M-. or M-_)}{105}{\code {yank-last-arg (M-. or M-_)}}
\entry{delete-char (C-d)}{106}{\code {delete-char (C-d)}}
\entry{backward-delete-char (Rubout)}{106}{\code {backward-delete-char (Rubout)}}
\entry{forward-backward-delete-char ()}{106}{\code {forward-backward-delete-char ()}}
\entry{quoted-insert (C-q or C-v)}{106}{\code {quoted-insert (C-q or C-v)}}
\entry{self-insert (a, b, A, 1, !, ...{})}{106}{\code {self-insert (a, b, A, 1, !, \dots {})}}
\entry{transpose-chars (C-t)}{106}{\code {transpose-chars (C-t)}}
\entry{transpose-words (M-t)}{106}{\code {transpose-words (M-t)}}
\entry{upcase-word (M-u)}{106}{\code {upcase-word (M-u)}}
\entry{downcase-word (M-l)}{106}{\code {downcase-word (M-l)}}
\entry{capitalize-word (M-c)}{106}{\code {capitalize-word (M-c)}}
\entry{overwrite-mode ()}{106}{\code {overwrite-mode ()}}
\entry{kill-line (C-k)}{107}{\code {kill-line (C-k)}}
\entry{backward-kill-line (C-x Rubout)}{107}{\code {backward-kill-line (C-x Rubout)}}
\entry{unix-line-discard (C-u)}{107}{\code {unix-line-discard (C-u)}}
\entry{kill-whole-line ()}{107}{\code {kill-whole-line ()}}
\entry{kill-word (M-d)}{107}{\code {kill-word (M-d)}}
\entry{backward-kill-word (M-DEL)}{107}{\code {backward-kill-word (M-\key {DEL})}}
\entry{unix-word-rubout (C-w)}{107}{\code {unix-word-rubout (C-w)}}
\entry{unix-filename-rubout ()}{107}{\code {unix-filename-rubout ()}}
\entry{delete-horizontal-space ()}{107}{\code {delete-horizontal-space ()}}
\entry{kill-region ()}{107}{\code {kill-region ()}}
\entry{copy-region-as-kill ()}{107}{\code {copy-region-as-kill ()}}
\entry{copy-backward-word ()}{107}{\code {copy-backward-word ()}}
\entry{copy-forward-word ()}{107}{\code {copy-forward-word ()}}
\entry{yank (C-y)}{108}{\code {yank (C-y)}}
\entry{yank-pop (M-y)}{108}{\code {yank-pop (M-y)}}
\entry{digit-argument (M-0, M-1, ...{} M--)}{108}{\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}}
\entry{universal-argument ()}{108}{\code {universal-argument ()}}
\entry{complete (TAB)}{108}{\code {complete (\key {TAB})}}
\entry{possible-completions (M-?)}{108}{\code {possible-completions (M-?)}}
\entry{insert-completions (M-*)}{108}{\code {insert-completions (M-*)}}
\entry{menu-complete ()}{108}{\code {menu-complete ()}}
\entry{delete-char-or-list ()}{109}{\code {delete-char-or-list ()}}
\entry{complete-filename (M-/)}{109}{\code {complete-filename (M-/)}}
\entry{possible-filename-completions (C-x /)}{109}{\code {possible-filename-completions (C-x /)}}
\entry{complete-username (M-~)}{109}{\code {complete-username (M-~)}}
\entry{possible-username-completions (C-x ~)}{109}{\code {possible-username-completions (C-x ~)}}
\entry{complete-variable (M-$)}{109}{\code {complete-variable (M-$)}}
\entry{possible-variable-completions (C-x $)}{109}{\code {possible-variable-completions (C-x $)}}
\entry{complete-hostname (M-@)}{109}{\code {complete-hostname (M-@)}}
\entry{possible-hostname-completions (C-x @)}{109}{\code {possible-hostname-completions (C-x @)}}
\entry{complete-command (M-!)}{109}{\code {complete-command (M-!)}}
\entry{possible-command-completions (C-x !)}{109}{\code {possible-command-completions (C-x !)}}
\entry{dynamic-complete-history (M-TAB)}{109}{\code {dynamic-complete-history (M-\key {TAB})}}
\entry{dabbrev-expand ()}{109}{\code {dabbrev-expand ()}}
\entry{complete-into-braces (M-{\tt \char 123})}{109}{\code {complete-into-braces (M-{\tt \char 123})}}
\entry{start-kbd-macro (C-x ()}{110}{\code {start-kbd-macro (C-x ()}}
\entry{end-kbd-macro (C-x ))}{110}{\code {end-kbd-macro (C-x ))}}
\entry{call-last-kbd-macro (C-x e)}{110}{\code {call-last-kbd-macro (C-x e)}}
\entry{re-read-init-file (C-x C-r)}{110}{\code {re-read-init-file (C-x C-r)}}
\entry{abort (C-g)}{110}{\code {abort (C-g)}}
\entry{do-uppercase-version (M-a, M-b, M-x, ...{})}{110}{\code {do-uppercase-version (M-a, M-b, M-\var {x}, \dots {})}}
\entry{prefix-meta (ESC)}{110}{\code {prefix-meta (\key {ESC})}}
\entry{undo (C-_ or C-x C-u)}{110}{\code {undo (C-_ or C-x C-u)}}
\entry{revert-line (M-r)}{110}{\code {revert-line (M-r)}}
\entry{tilde-expand (M-&)}{110}{\code {tilde-expand (M-&)}}
\entry{set-mark (C-@)}{110}{\code {set-mark (C-@)}}
\entry{exchange-point-and-mark (C-x C-x)}{110}{\code {exchange-point-and-mark (C-x C-x)}}
\entry{character-search (C-])}{110}{\code {character-search (C-])}}
\entry{character-search-backward (M-C-])}{111}{\code {character-search-backward (M-C-])}}
\entry{insert-comment (M-#)}{111}{\code {insert-comment (M-#)}}
\entry{dump-functions ()}{111}{\code {dump-functions ()}}
\entry{dump-variables ()}{111}{\code {dump-variables ()}}
\entry{dump-macros ()}{111}{\code {dump-macros ()}}
\entry{glob-complete-word (M-g)}{111}{\code {glob-complete-word (M-g)}}
\entry{glob-expand-word (C-x *)}{111}{\code {glob-expand-word (C-x *)}}
\entry{glob-list-expansions (C-x g)}{111}{\code {glob-list-expansions (C-x g)}}
\entry{display-shell-version (C-x C-v)}{111}{\code {display-shell-version (C-x C-v)}}
\entry{shell-expand-line (M-C-e)}{111}{\code {shell-expand-line (M-C-e)}}
\entry{history-expand-line (M-^)}{112}{\code {history-expand-line (M-^)}}
\entry{magic-space ()}{112}{\code {magic-space ()}}
\entry{alias-expand-line ()}{112}{\code {alias-expand-line ()}}
\entry{history-and-alias-expand-line ()}{112}{\code {history-and-alias-expand-line ()}}
\entry{insert-last-argument (M-. or M-_)}{112}{\code {insert-last-argument (M-. or M-_)}}
\entry{operate-and-get-next (C-o)}{112}{\code {operate-and-get-next (C-o)}}
\entry{edit-and-execute-command (C-xC-e)}{112}{\code {edit-and-execute-command (C-xC-e)}}
+97 -96
View File
@@ -1,116 +1,117 @@
\initial {A}
\entry {\code {abort (C-g)}}{109}
\entry {\code {accept-line (Newline or Return)}}{103}
\entry {\code {alias-expand-line ()}}{111}
\entry {\code {abort (C-g)}}{110}
\entry {\code {accept-line (Newline or Return)}}{104}
\entry {\code {alias-expand-line ()}}{112}
\initial {B}
\entry {\code {backward-char (C-b)}}{103}
\entry {\code {backward-delete-char (Rubout)}}{105}
\entry {\code {backward-kill-line (C-x Rubout)}}{106}
\entry {\code {backward-kill-word (M-\key {DEL})}}{106}
\entry {\code {backward-word (M-b)}}{103}
\entry {\code {beginning-of-history (M-<)}}{104}
\entry {\code {beginning-of-line (C-a)}}{103}
\entry {\code {backward-char (C-b)}}{104}
\entry {\code {backward-delete-char (Rubout)}}{106}
\entry {\code {backward-kill-line (C-x Rubout)}}{107}
\entry {\code {backward-kill-word (M-\key {DEL})}}{107}
\entry {\code {backward-word (M-b)}}{104}
\entry {\code {beginning-of-history (M-<)}}{105}
\entry {\code {beginning-of-line (C-a)}}{104}
\initial {C}
\entry {\code {call-last-kbd-macro (C-x e)}}{109}
\entry {\code {capitalize-word (M-c)}}{105}
\entry {\code {character-search (C-])}}{109}
\entry {\code {character-search-backward (M-C-])}}{109}
\entry {\code {clear-screen (C-l)}}{103}
\entry {\code {complete (\key {TAB})}}{107}
\entry {\code {complete-command (M-!)}}{108}
\entry {\code {complete-filename (M-/)}}{108}
\entry {\code {complete-hostname (M-@)}}{108}
\entry {\code {complete-into-braces (M-{\tt \char 123})}}{108}
\entry {\code {complete-username (M-~)}}{108}
\entry {\code {complete-variable (M-$)}}{108}
\entry {\code {copy-backward-word ()}}{106}
\entry {\code {copy-forward-word ()}}{106}
\entry {\code {copy-region-as-kill ()}}{106}
\entry {\code {call-last-kbd-macro (C-x e)}}{110}
\entry {\code {capitalize-word (M-c)}}{106}
\entry {\code {character-search (C-])}}{110}
\entry {\code {character-search-backward (M-C-])}}{111}
\entry {\code {clear-screen (C-l)}}{104}
\entry {\code {complete (\key {TAB})}}{108}
\entry {\code {complete-command (M-!)}}{109}
\entry {\code {complete-filename (M-/)}}{109}
\entry {\code {complete-hostname (M-@)}}{109}
\entry {\code {complete-into-braces (M-{\tt \char 123})}}{109}
\entry {\code {complete-username (M-~)}}{109}
\entry {\code {complete-variable (M-$)}}{109}
\entry {\code {copy-backward-word ()}}{107}
\entry {\code {copy-forward-word ()}}{107}
\entry {\code {copy-region-as-kill ()}}{107}
\initial {D}
\entry {\code {delete-char (C-d)}}{105}
\entry {\code {delete-char-or-list ()}}{108}
\entry {\code {delete-horizontal-space ()}}{106}
\entry {\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}}{107}
\entry {\code {display-shell-version (C-x C-v)}}{110}
\entry {\code {do-uppercase-version (M-a, M-b, M-\var {x}, \dots {})}}{109}
\entry {\code {downcase-word (M-l)}}{105}
\entry {\code {dump-functions ()}}{110}
\entry {\code {dump-macros ()}}{110}
\entry {\code {dump-variables ()}}{110}
\entry {\code {dynamic-complete-history (M-\key {TAB})}}{108}
\entry {\code {dabbrev-expand ()}}{109}
\entry {\code {delete-char (C-d)}}{106}
\entry {\code {delete-char-or-list ()}}{109}
\entry {\code {delete-horizontal-space ()}}{107}
\entry {\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}}{108}
\entry {\code {display-shell-version (C-x C-v)}}{111}
\entry {\code {do-uppercase-version (M-a, M-b, M-\var {x}, \dots {})}}{110}
\entry {\code {downcase-word (M-l)}}{106}
\entry {\code {dump-functions ()}}{111}
\entry {\code {dump-macros ()}}{111}
\entry {\code {dump-variables ()}}{111}
\entry {\code {dynamic-complete-history (M-\key {TAB})}}{109}
\initial {E}
\entry {\code {edit-and-execute-command (C-xC-e)}}{111}
\entry {\code {end-kbd-macro (C-x ))}}{109}
\entry {\code {end-of-history (M->)}}{104}
\entry {\code {end-of-line (C-e)}}{103}
\entry {\code {exchange-point-and-mark (C-x C-x)}}{109}
\entry {\code {edit-and-execute-command (C-xC-e)}}{112}
\entry {\code {end-kbd-macro (C-x ))}}{110}
\entry {\code {end-of-history (M->)}}{105}
\entry {\code {end-of-line (C-e)}}{104}
\entry {\code {exchange-point-and-mark (C-x C-x)}}{110}
\initial {F}
\entry {\code {forward-backward-delete-char ()}}{105}
\entry {\code {forward-char (C-f)}}{103}
\entry {\code {forward-search-history (C-s)}}{104}
\entry {\code {forward-word (M-f)}}{103}
\entry {\code {forward-backward-delete-char ()}}{106}
\entry {\code {forward-char (C-f)}}{104}
\entry {\code {forward-search-history (C-s)}}{105}
\entry {\code {forward-word (M-f)}}{104}
\initial {G}
\entry {\code {glob-complete-word (M-g)}}{110}
\entry {\code {glob-expand-word (C-x *)}}{110}
\entry {\code {glob-list-expansions (C-x g)}}{110}
\entry {\code {glob-complete-word (M-g)}}{111}
\entry {\code {glob-expand-word (C-x *)}}{111}
\entry {\code {glob-list-expansions (C-x g)}}{111}
\initial {H}
\entry {\code {history-and-alias-expand-line ()}}{111}
\entry {\code {history-expand-line (M-^)}}{110}
\entry {\code {history-search-backward ()}}{104}
\entry {\code {history-search-forward ()}}{104}
\entry {\code {history-and-alias-expand-line ()}}{112}
\entry {\code {history-expand-line (M-^)}}{112}
\entry {\code {history-search-backward ()}}{105}
\entry {\code {history-search-forward ()}}{105}
\initial {I}
\entry {\code {insert-comment (M-#)}}{110}
\entry {\code {insert-completions (M-*)}}{107}
\entry {\code {insert-last-argument (M-. or M-_)}}{111}
\entry {\code {insert-comment (M-#)}}{111}
\entry {\code {insert-completions (M-*)}}{108}
\entry {\code {insert-last-argument (M-. or M-_)}}{112}
\initial {K}
\entry {\code {kill-line (C-k)}}{106}
\entry {\code {kill-region ()}}{106}
\entry {\code {kill-whole-line ()}}{106}
\entry {\code {kill-word (M-d)}}{106}
\entry {\code {kill-line (C-k)}}{107}
\entry {\code {kill-region ()}}{107}
\entry {\code {kill-whole-line ()}}{107}
\entry {\code {kill-word (M-d)}}{107}
\initial {M}
\entry {\code {magic-space ()}}{111}
\entry {\code {menu-complete ()}}{107}
\entry {\code {magic-space ()}}{112}
\entry {\code {menu-complete ()}}{108}
\initial {N}
\entry {\code {next-history (C-n)}}{104}
\entry {\code {non-incremental-forward-search-history (M-n)}}{104}
\entry {\code {non-incremental-reverse-search-history (M-p)}}{104}
\entry {\code {next-history (C-n)}}{105}
\entry {\code {non-incremental-forward-search-history (M-n)}}{105}
\entry {\code {non-incremental-reverse-search-history (M-p)}}{105}
\initial {O}
\entry {\code {operate-and-get-next (C-o)}}{111}
\entry {\code {overwrite-mode ()}}{105}
\entry {\code {operate-and-get-next (C-o)}}{112}
\entry {\code {overwrite-mode ()}}{106}
\initial {P}
\entry {\code {possible-command-completions (C-x !)}}{108}
\entry {\code {possible-completions (M-?)}}{107}
\entry {\code {possible-filename-completions (C-x /)}}{108}
\entry {\code {possible-hostname-completions (C-x @)}}{108}
\entry {\code {possible-username-completions (C-x ~)}}{108}
\entry {\code {possible-variable-completions (C-x $)}}{108}
\entry {\code {prefix-meta (\key {ESC})}}{109}
\entry {\code {previous-history (C-p)}}{104}
\entry {\code {possible-command-completions (C-x !)}}{109}
\entry {\code {possible-completions (M-?)}}{108}
\entry {\code {possible-filename-completions (C-x /)}}{109}
\entry {\code {possible-hostname-completions (C-x @)}}{109}
\entry {\code {possible-username-completions (C-x ~)}}{109}
\entry {\code {possible-variable-completions (C-x $)}}{109}
\entry {\code {prefix-meta (\key {ESC})}}{110}
\entry {\code {previous-history (C-p)}}{105}
\initial {Q}
\entry {\code {quoted-insert (C-q or C-v)}}{105}
\entry {\code {quoted-insert (C-q or C-v)}}{106}
\initial {R}
\entry {\code {re-read-init-file (C-x C-r)}}{109}
\entry {\code {redraw-current-line ()}}{103}
\entry {\code {reverse-search-history (C-r)}}{104}
\entry {\code {revert-line (M-r)}}{109}
\entry {\code {re-read-init-file (C-x C-r)}}{110}
\entry {\code {redraw-current-line ()}}{104}
\entry {\code {reverse-search-history (C-r)}}{105}
\entry {\code {revert-line (M-r)}}{110}
\initial {S}
\entry {\code {self-insert (a, b, A, 1, !, \dots {})}}{105}
\entry {\code {set-mark (C-@)}}{109}
\entry {\code {shell-expand-line (M-C-e)}}{110}
\entry {\code {start-kbd-macro (C-x ()}}{108}
\entry {\code {self-insert (a, b, A, 1, !, \dots {})}}{106}
\entry {\code {set-mark (C-@)}}{110}
\entry {\code {shell-expand-line (M-C-e)}}{111}
\entry {\code {start-kbd-macro (C-x ()}}{110}
\initial {T}
\entry {\code {tilde-expand (M-&)}}{109}
\entry {\code {transpose-chars (C-t)}}{105}
\entry {\code {transpose-words (M-t)}}{105}
\entry {\code {tilde-expand (M-&)}}{110}
\entry {\code {transpose-chars (C-t)}}{106}
\entry {\code {transpose-words (M-t)}}{106}
\initial {U}
\entry {\code {undo (C-_ or C-x C-u)}}{109}
\entry {\code {universal-argument ()}}{107}
\entry {\code {unix-filename-rubout ()}}{106}
\entry {\code {unix-line-discard (C-u)}}{106}
\entry {\code {unix-word-rubout (C-w)}}{106}
\entry {\code {upcase-word (M-u)}}{105}
\entry {\code {undo (C-_ or C-x C-u)}}{110}
\entry {\code {universal-argument ()}}{108}
\entry {\code {unix-filename-rubout ()}}{107}
\entry {\code {unix-line-discard (C-u)}}{107}
\entry {\code {unix-word-rubout (C-w)}}{107}
\entry {\code {upcase-word (M-u)}}{106}
\initial {Y}
\entry {\code {yank (C-y)}}{107}
\entry {\code {yank-last-arg (M-. or M-_)}}{104}
\entry {\code {yank-nth-arg (M-C-y)}}{104}
\entry {\code {yank-pop (M-y)}}{107}
\entry {\code {yank (C-y)}}{108}
\entry {\code {yank-last-arg (M-. or M-_)}}{105}
\entry {\code {yank-nth-arg (M-C-y)}}{105}
\entry {\code {yank-pop (M-y)}}{108}
+2322 -2136
View File
File diff suppressed because it is too large Load Diff
+378 -238
View File
File diff suppressed because it is too large Load Diff
+37 -87
View File
@@ -1,6 +1,6 @@
This is TeX, Version 3.141592 (Web2C 7.5.4) (format=tex 2008.4.8) 8 APR 2008 09:50
**/usr/homes/chet/src/bash/src/doc/bashref.texi
(/usr/homes/chet/src/bash/src/doc/bashref.texi (./texinfo.tex
This is TeX, Version 3.141592 (Web2C 7.5.4) (format=tex 2008.4.8) 29 MAY 2008 11:48
**/Users/chet/src/bash/src/doc/bashref.texi
(/Users/chet/src/bash/src/doc/bashref.texi (./texinfo.tex
Loading texinfo [version 2003-02-03.16]: Basics,
\bindingoffset=\dimen16
\normaloffset=\dimen17
@@ -158,7 +158,7 @@ localization,
[1]
Chapter 2 [2] [3] Chapter 3 [4] [5] [6] [7] [8] [9] [10]
Overfull \hbox (43.33539pt too wide) in paragraph at lines 843--843
Overfull \hbox (43.33539pt too wide) in paragraph at lines 850--850
[]@texttt case @textttsl word @texttt in [ [(] @textttsl pat-tern @texttt [| @
textttsl pat-tern@texttt ][]) @textttsl command-list @texttt ;;][] esac[][]
@@ -171,9 +171,9 @@ textttsl pat-tern@texttt ][]) @textttsl command-list @texttt ;;][] esac[][]
.etc.
[11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25]
[26] [27] [28] [29] [30] [31] [32] Chapter 4 [33] [34] [35] [36] [37] [38]
[26] [27] [28] [29] [30] [31] [32] [33] Chapter 4 [34] [35] [36] [37] [38]
[39] [40] [41]
Underfull \hbox (badness 5231) in paragraph at lines 3139--3152
Underfull \hbox (badness 5231) in paragraph at lines 3194--3207
@texttt emacs-meta[]@textrm , @texttt emacs-ctlx[]@textrm , @texttt vi[]@textr
m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
@@ -185,8 +185,8 @@ m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
.@texttt c
.etc.
[42] [43] [44] [45]
Overfull \hbox (102.08961pt too wide) in paragraph at lines 3491--3491
[42] [43] [44] [45] [46]
Overfull \hbox (102.08961pt too wide) in paragraph at lines 3602--3602
[]@texttt read [-ers] [-a @textttsl aname@texttt ] [-d @textttsl de-lim@texttt
] [-i @textttsl text@texttt ] [-n @textttsl nchars@texttt ] [-p @textttsl prom
pt@texttt ] [-t @textttsl time-
@@ -199,8 +199,8 @@ pt@texttt ] [-t @textttsl time-
.@texttt a
.etc.
[46] [47] [48] [49] [50] [51] [52] [53] [54]
Underfull \hbox (badness 2573) in paragraph at lines 4133--4137
[47] [48] [49] [50] [51] [52] [53] [54]
Underfull \hbox (badness 2573) in paragraph at lines 4251--4255
[] []@textrm Error trac-ing is en-abled: com-mand sub-sti-tu-tion, shell
@hbox(7.60416+2.12917)x433.62, glue set 2.95305
@@ -215,9 +215,9 @@ Underfull \hbox (badness 2573) in paragraph at lines 4133--4137
.@textrm E
.etc.
[55] [56] Chapter 5 [57] [58] [59] [60] [61] [62] [63] [64] [65] [66]
[55] [56] [57] Chapter 5 [58] [59] [60] [61] [62] [63] [64] [65] [66]
Chapter 6 [67] [68]
Overfull \hbox (51.96864pt too wide) in paragraph at lines 4950--4950
Overfull \hbox (51.96864pt too wide) in paragraph at lines 5074--5074
[]@texttt bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@t
exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
@@ -230,7 +230,7 @@ exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
.etc.
Overfull \hbox (76.23077pt too wide) in paragraph at lines 4951--4951
Overfull \hbox (76.23077pt too wide) in paragraph at lines 5075--5075
[]@texttt bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@texttt
] [-O @textttsl shopt_option@texttt ] -c @textttsl string @texttt [@textttsl ar
-
@@ -244,7 +244,7 @@ Overfull \hbox (76.23077pt too wide) in paragraph at lines 4951--4951
.etc.
Overfull \hbox (34.72258pt too wide) in paragraph at lines 4952--4952
Overfull \hbox (34.72258pt too wide) in paragraph at lines 5076--5076
[]@texttt bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@text
tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
@@ -257,7 +257,7 @@ tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
.etc.
[69] [70]
Underfull \hbox (badness 2245) in paragraph at lines 5126--5128
Underfull \hbox (badness 2245) in paragraph at lines 5250--5252
[]@textrm When a lo-gin shell ex-its, Bash reads and ex-e-cutes com-mands from
the file
@@ -270,7 +270,7 @@ the file
.etc.
[71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84]
Underfull \hbox (badness 2521) in paragraph at lines 6242--6245
Underfull \hbox (badness 2521) in paragraph at lines 6366--6369
@textrm `@texttt --enable-strict-posix-default[]@textrm '[] to @texttt configur
e[] @textrm when build-ing (see Sec-tion 10.8
@@ -283,9 +283,9 @@ e[] @textrm when build-ing (see Sec-tion 10.8
.etc.
Chapter 7 [85] [86] [87] [88] [89]
(/usr/homes/chet/src/bash/src/lib/readline/doc/rluser.texi Chapter 8 [90]
[91] [92] [93] [94] [95] [96]
Underfull \hbox (badness 5231) in paragraph at lines 507--523
(/Users/chet/src/bash/src/lib/readline/doc/rluser.texi Chapter 8 [90] [91]
[92] [93] [94] [95] [96]
Underfull \hbox (badness 5231) in paragraph at lines 514--530
@texttt emacs-meta[]@textrm , @texttt emacs-ctlx[]@textrm , @texttt vi[]@textr
m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
@@ -297,8 +297,8 @@ m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
.@texttt c
.etc.
[97] [98] [99] [100]
Overfull \hbox (26.43913pt too wide) in paragraph at lines 822--822
[97] [98] [99] [100] [101]
Overfull \hbox (26.43913pt too wide) in paragraph at lines 836--836
[]@texttt Meta-Control-h: backward-kill-word Text after the function name is i
gnored[]
@@ -310,21 +310,9 @@ gnored[]
.@texttt t
.etc.
[101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112]
Overfull \hbox (17.80585pt too wide) in paragraph at lines 1671--1671
[]@texttt complete [-abcdefgjksuv] [-o @textttsl comp-option@texttt ] [-A @tex
tttsl ac-tion@texttt ] [-G @textttsl glob-
@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.
[113] [114]
Underfull \hbox (badness 2753) in paragraph at lines 1773--1776
[102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113]
[114] [115]
Underfull \hbox (badness 2753) in paragraph at lines 1795--1798
@texttt hostname[]@textrm Hostnames, as taken from the file spec-i-fied by
@hbox(7.60416+2.12917)x433.62, glue set 3.02202
@@ -335,9 +323,10 @@ Underfull \hbox (badness 2753) in paragraph at lines 1773--1776
.@texttt o
.etc.
[115]) (/usr/homes/chet/src/bash/src/lib/readline/doc/hsuser.texi Chapter 9
[116] [117] [118] [119] [120]) Chapter 10 [121] [122] [123] [124] [125]
Underfull \hbox (badness 2772) in paragraph at lines 6838--6842
[116]) (/Users/chet/src/bash/src/lib/readline/doc/hsuser.texi Chapter 9
[117] [118] [119] [120] [121] [122]) Chapter 10 [123] [124] [125] [126]
[127]
Underfull \hbox (badness 2772) in paragraph at lines 6962--6966
[]@textrm Enable sup-port for large files (@texttt http://www.sas.com/standard
s/large_
@@ -349,57 +338,18 @@ s/large_
.@textrm a
.etc.
[126] [127] [128] Appendix A [129] [130] Appendix B [131] [132] [133] [134]
[135] [136] [137] Appendix C [138] (./fdl.texi [139] [140] [141] [142] [143]
[144]) Appendix D [145] [146] (./bashref.bts) [147]
Overfull \vbox (45.71959pt too high) has occurred while \output is active
\vbox(643.19986+2.0)x433.62, glue set - 1.0
.\glue(\topskip) 26.00002
.\vbox(9.99998+0.0)x433.62
..\hbox(9.99998+0.0)x433.62, glue set 163.10767fil
...\hbox(0.0+0.0)x0.0
...\secrm D
...\secrm .
...\secrm 1
...\kern 8.09999
...etc.
.\penalty 10000
.\kern 13.2
.\penalty 10000
.etc.
[148] (./bashref.rws) (./bashref.vrs [149] [150]) (./bashref.fns [151])
Overfull \vbox (39.33694pt too high) has occurred while \output is active
\vbox(643.19986+2.0)x433.62
.\glue(\topskip) 0.0
.\hbox(682.5368+2.0)x433.62, glue set 18.01016fil
..\vbox(682.5368+0.0)x207.80492, glue set 0.01196
...\glue(\topskip) 29.75
...\hbox(6.25+2.0)x207.80492, glue set 20.64868fil []
...\penalty 20000
...\glue(\baselineskip) 2.70001
...\hbox(5.79999+0.0)x189.30504, glue set 163.09688fill, shifted 18.49988 []
...etc.
..\glue 0.0 plus 1.0fil
..\vbox(682.5368+2.0)x207.80492, glue set 0.96613
...\glue(\splittopskip) 26.12001
...\hbox(9.87999+0.0)x207.80492, glue set 195.63828fil []
...\glue 3.46501 plus 1.05006
...\penalty 10000
...\glue 0.0 plus 1.0
...etc.
.\penalty 10000
[152] (./bashref.cps [153]) [154] )
[128] [129] [130] Appendix A [131] [132] Appendix B [133] [134] [135] [136]
[137] [138] [139] Appendix C [140] (./fdl.texi [141] [142] [143] [144] [145]
[146]) Appendix D [147] [148] (./bashref.bts [149]) (./bashref.rws)
(./bashref.vrs [150] [151]) (./bashref.fns [152] [153]) (./bashref.cps [154])
[155] [156] )
Here is how much of TeX's memory you used:
1732 strings out of 97980
23667 string characters out of 1221006
56767 words of memory out of 1500000
23635 string characters out of 1221006
51884 words of memory out of 1500000
2583 multiletter control sequences out of 10000+50000
31953 words of font info for 111 fonts, out of 1200000 for 2000
19 hyphenation exceptions out of 8191
15i,8n,11p,273b,471s stack positions out of 5000i,500n,6000p,200000b,5000s
15i,8n,11p,269b,471s stack positions out of 5000i,500n,6000p,200000b,5000s
Output written on bashref.dvi (160 pages, 615548 bytes).
Output written on bashref.dvi (162 pages, 624132 bytes).
BIN
View File
Binary file not shown.
+4922 -4769
View File
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -1,8 +1,8 @@
\entry{time}{8}{\code {time}}
\entry{!}{8}{\code {!}}
\entry{until}{9}{\code {until}}
\entry{do}{9}{\code {do}}
\entry{done}{9}{\code {done}}
\entry{until}{10}{\code {until}}
\entry{do}{10}{\code {do}}
\entry{done}{10}{\code {done}}
\entry{while}{10}{\code {while}}
\entry{for}{10}{\code {for}}
\entry{if}{10}{\code {if}}
@@ -13,9 +13,9 @@
\entry{case}{11}{\code {case}}
\entry{in}{11}{\code {in}}
\entry{esac}{11}{\code {esac}}
\entry{select}{11}{\code {select}}
\entry{select}{12}{\code {select}}
\entry{[[}{12}{\code {[[}}
\entry{]]}{12}{\code {]]}}
\entry{{\tt \char 123}}{13}{\code {{\tt \char 123}}}
\entry{{\tt \char 125}}{13}{\code {{\tt \char 125}}}
\entry{{\tt \char 123}}{14}{\code {{\tt \char 123}}}
\entry{{\tt \char 125}}{14}{\code {{\tt \char 125}}}
\entry{function}{14}{\code {function}}
+6 -6
View File
@@ -5,14 +5,14 @@
\initial {]}
\entry {\code {]]}}{12}
\initial {{\tt \char 123}}
\entry {\code {{\tt \char 123}}}{13}
\entry {\code {{\tt \char 123}}}{14}
\initial {{\tt \char 125}}
\entry {\code {{\tt \char 125}}}{13}
\entry {\code {{\tt \char 125}}}{14}
\initial {C}
\entry {\code {case}}{11}
\initial {D}
\entry {\code {do}}{9}
\entry {\code {done}}{9}
\entry {\code {do}}{10}
\entry {\code {done}}{10}
\initial {E}
\entry {\code {elif}}{10}
\entry {\code {else}}{10}
@@ -25,11 +25,11 @@
\entry {\code {if}}{10}
\entry {\code {in}}{11}
\initial {S}
\entry {\code {select}}{11}
\entry {\code {select}}{12}
\initial {T}
\entry {\code {then}}{10}
\entry {\code {time}}{8}
\initial {U}
\entry {\code {until}}{9}
\entry {\code {until}}{10}
\initial {W}
\entry {\code {while}}{10}
+8 -1
View File
@@ -4928,6 +4928,12 @@ is readonly.
If set, the value is interpreted as a command to execute
before the printing of each primary prompt (@env{$PS1}).
@item PROMPT_DIRTRIM
If set to a number greater than zero, the value is used as the number of
trailing directory components to retain when expanding the @code{\w} and
@code{\W} prompt string escapes (@pxref{Printing a Prompt}).
Characters removed are replaced with an ellipsis.
@item PS3
The value of this variable is used as the prompt for the
@code{select} command. If this variable is not set, the
@@ -6050,7 +6056,8 @@ The version of Bash (e.g., 2.00)
@item \V
The release of Bash, version + patchlevel (e.g., 2.00.0)
@item \w
The current working directory, with @env{$HOME} abbreviated with a tilde.
The current working directory, with @env{$HOME} abbreviated with a tilde
(uses the @env{$PROMPT_DIRTRIM} variable).
@item \W
The basename of @env{$PWD}, with @env{$HOME} abbreviated with a tilde.
@item \!
+20 -2
View File
@@ -859,14 +859,17 @@ of alphabetic characters.
The @samp{|} is used to separate multiple patterns, and the @samp{)}
operator terminates a pattern list.
A list of patterns and an associated command-list is known
as a @var{clause}. Each clause must be terminated with @samp{;;}.
as a @var{clause}.
Each clause must be terminated with @samp{;;}, @samp{,&}, or @samp{;;&}.
The @var{word} undergoes tilde expansion, parameter expansion, command
substitution, arithmetic expansion, and quote removal before matching is
attempted. Each @var{pattern} undergoes tilde expansion, parameter
expansion, command substitution, and arithmetic expansion.
There may be an arbitrary number of @code{case} clauses, each terminated
by a @samp{;;}. The first pattern that matches determines the
by a @samp{;;}, @samp{;&}, or @samp{;;&}.
The first pattern that matches determines the
command-list that is executed.
Here is an example using @code{case} in a script that could be used to
@@ -885,6 +888,15 @@ echo " legs."
@end example
@noindent
If the @samp{;;} operator is used, no subsequent matches are attempted after
the first pattern match.
Using @samp{;&} in place of @samp{;;} causes execution to continue with
the @var{command-list} associated with the next clause, if any.
Using @samp{;;&} in place of @samp{;;} causes the shell to test the patterns
in the next clause, if any, and execute any associated @var{command-list}
on a successful match.
The return status is zero if no @var{pattern} is matched. Otherwise, the
return status is the exit status of the @var{command-list} executed.
@@ -4916,6 +4928,12 @@ is readonly.
If set, the value is interpreted as a command to execute
before the printing of each primary prompt (@env{$PS1}).
@item PROMPT_DIRTRIM
If set to a number greater than zero, the value is used as the number of
trailing directory components to retain when expanding the @code{\w} and
@code{\W} prompt string escapes (@pxref{Printing a Prompt}).
Characters removed are replaced with an ellipsis.
@item PS3
The value of this variable is used as the prompt for the
@code{select} command. If this variable is not set, the
+65 -64
View File
@@ -15,51 +15,52 @@
\secentry{Shell Commands}{3}{2}{7}
\subsecentry{Simple Commands}{3}{2}{1}{8}
\subsecentry{Pipelines}{3}{2}{2}{8}
\subsecentry{Lists of Commands}{3}{2}{3}{8}
\subsecentry{Lists of Commands}{3}{2}{3}{9}
\subsecentry{Compound Commands}{3}{2}{4}{9}
\subsubsecentry{Looping Constructs}{3}{2}{4}{1}{9}
\subsubsecentry{Conditional Constructs}{3}{2}{4}{2}{10}
\subsubsecentry{Grouping Commands}{3}{2}{4}{3}{13}
\secentry{Shell Functions}{3}{3}{13}
\secentry{Shell Functions}{3}{3}{14}
\secentry{Shell Parameters}{3}{4}{15}
\subsecentry{Positional Parameters}{3}{4}{1}{15}
\subsecentry{Positional Parameters}{3}{4}{1}{16}
\subsecentry{Special Parameters}{3}{4}{2}{16}
\secentry{Shell Expansions}{3}{5}{17}
\subsecentry{Brace Expansion}{3}{5}{1}{17}
\subsecentry{Tilde Expansion}{3}{5}{2}{18}
\subsecentry{Shell Parameter Expansion}{3}{5}{3}{19}
\subsecentry{Command Substitution}{3}{5}{4}{21}
\subsecentry{Command Substitution}{3}{5}{4}{22}
\subsecentry{Arithmetic Expansion}{3}{5}{5}{22}
\subsecentry{Process Substitution}{3}{5}{6}{22}
\subsecentry{Word Splitting}{3}{5}{7}{22}
\subsecentry{Word Splitting}{3}{5}{7}{23}
\subsecentry{Filename Expansion}{3}{5}{8}{23}
\subsubsecentry{Pattern Matching}{3}{5}{8}{1}{23}
\subsubsecentry{Pattern Matching}{3}{5}{8}{1}{24}
\subsecentry{Quote Removal}{3}{5}{9}{25}
\secentry{Redirections}{3}{6}{25}
\subsecentry{Redirecting Input}{3}{6}{1}{26}
\subsecentry{Redirecting Output}{3}{6}{2}{26}
\subsecentry{Appending Redirected Output}{3}{6}{3}{26}
\subsecentry{Redirecting Standard Output and Standard Error}{3}{6}{4}{26}
\subsecentry{Here Documents}{3}{6}{5}{27}
\subsecentry{Here Strings}{3}{6}{6}{27}
\subsecentry{Duplicating File Descriptors}{3}{6}{7}{27}
\subsecentry{Moving File Descriptors}{3}{6}{8}{28}
\subsecentry{Opening File Descriptors for Reading and Writing}{3}{6}{9}{28}
\secentry{Executing Commands}{3}{7}{28}
\subsecentry{Simple Command Expansion}{3}{7}{1}{28}
\subsecentry{Command Search and Execution}{3}{7}{2}{29}
\subsecentry{Command Execution Environment}{3}{7}{3}{29}
\subsecentry{Environment}{3}{7}{4}{30}
\subsecentry{Exit Status}{3}{7}{5}{31}
\subsecentry{Signals}{3}{7}{6}{31}
\secentry{Shell Scripts}{3}{8}{32}
\subsecentry{Appending Redirected Output}{3}{6}{3}{27}
\subsecentry{Redirecting Standard Output and Standard Error}{3}{6}{4}{27}
\subsecentry{Appending Standard Output and Standard Error}{3}{6}{5}{27}
\subsecentry{Here Documents}{3}{6}{6}{27}
\subsecentry{Here Strings}{3}{6}{7}{28}
\subsecentry{Duplicating File Descriptors}{3}{6}{8}{28}
\subsecentry{Moving File Descriptors}{3}{6}{9}{28}
\subsecentry{Opening File Descriptors for Reading and Writing}{3}{6}{10}{29}
\secentry{Executing Commands}{3}{7}{29}
\subsecentry{Simple Command Expansion}{3}{7}{1}{29}
\subsecentry{Command Search and Execution}{3}{7}{2}{30}
\subsecentry{Command Execution Environment}{3}{7}{3}{30}
\subsecentry{Environment}{3}{7}{4}{31}
\subsecentry{Exit Status}{3}{7}{5}{32}
\subsecentry{Signals}{3}{7}{6}{32}
\secentry{Shell Scripts}{3}{8}{33}
\chapentry{Shell Builtin Commands}{4}{35}
\secentry{Bourne Shell Builtins}{4}{1}{35}
\secentry{Bash Builtin Commands}{4}{2}{41}
\secentry{Modifying Shell Behavior}{4}{3}{49}
\subsecentry{The Set Builtin}{4}{3}{1}{49}
\secentry{Modifying Shell Behavior}{4}{3}{50}
\subsecentry{The Set Builtin}{4}{3}{1}{50}
\subsecentry{The Shopt Builtin}{4}{3}{2}{53}
\secentry{Special Builtins}{4}{4}{57}
\secentry{Special Builtins}{4}{4}{58}
\chapentry{Shell Variables}{5}{59}
\secentry{Bourne Shell Variables}{5}{1}{59}
\secentry{Bash Variables}{5}{2}{59}
@@ -93,43 +94,43 @@
\subsecentry{Searching for Commands in the History}{8}{2}{5}{93}
\secentry{Readline Init File}{8}{3}{94}
\subsecentry{Readline Init File Syntax}{8}{3}{1}{94}
\subsecentry{Conditional Init Constructs}{8}{3}{2}{99}
\subsecentry{Sample Init File}{8}{3}{3}{100}
\secentry{Bindable Readline Commands}{8}{4}{103}
\subsecentry{Commands For Moving}{8}{4}{1}{103}
\subsecentry{Commands For Manipulating The History}{8}{4}{2}{103}
\subsecentry{Commands For Changing Text}{8}{4}{3}{105}
\subsecentry{Killing And Yanking}{8}{4}{4}{106}
\subsecentry{Specifying Numeric Arguments}{8}{4}{5}{107}
\subsecentry{Letting Readline Type For You}{8}{4}{6}{107}
\subsecentry{Keyboard Macros}{8}{4}{7}{108}
\subsecentry{Some Miscellaneous Commands}{8}{4}{8}{109}
\secentry{Readline vi Mode}{8}{5}{111}
\secentry{Programmable Completion}{8}{6}{111}
\secentry{Programmable Completion Builtins}{8}{7}{113}
\chapentry{Using History Interactively}{9}{117}
\secentry{Bash History Facilities}{9}{1}{117}
\secentry{Bash History Builtins}{9}{2}{117}
\secentry{History Expansion}{9}{3}{119}
\subsecentry{Event Designators}{9}{3}{1}{119}
\subsecentry{Word Designators}{9}{3}{2}{120}
\subsecentry{Modifiers}{9}{3}{3}{121}
\chapentry{Installing Bash}{10}{123}
\secentry{Basic Installation}{10}{1}{123}
\secentry{Compilers and Options}{10}{2}{123}
\secentry{Compiling For Multiple Architectures}{10}{3}{124}
\secentry{Installation Names}{10}{4}{124}
\secentry{Specifying the System Type}{10}{5}{124}
\secentry{Sharing Defaults}{10}{6}{125}
\secentry{Operation Controls}{10}{7}{125}
\secentry{Optional Features}{10}{8}{125}
\appendixentry{Reporting Bugs}{A}{131}
\appendixentry{Major Differences From The Bourne Shell}{B}{133}
\secentry{Implementation Differences From The SVR4.2 Shell}{B}{1}{137}
\appendixentry{GNU Free Documentation License}{C}{139}
\appendixentry{Indexes}{D}{147}
\secentry{Index of Shell Builtin Commands}{D}{1}{147}
\secentry{Index of Shell Reserved Words}{D}{2}{149}
\secentry{Parameter and Variable Index}{D}{3}{149}
\secentry{Function Index}{D}{4}{151}
\secentry{Concept Index}{D}{5}{153}
\subsecentry{Conditional Init Constructs}{8}{3}{2}{100}
\subsecentry{Sample Init File}{8}{3}{3}{101}
\secentry{Bindable Readline Commands}{8}{4}{104}
\subsecentry{Commands For Moving}{8}{4}{1}{104}
\subsecentry{Commands For Manipulating The History}{8}{4}{2}{104}
\subsecentry{Commands For Changing Text}{8}{4}{3}{106}
\subsecentry{Killing And Yanking}{8}{4}{4}{107}
\subsecentry{Specifying Numeric Arguments}{8}{4}{5}{108}
\subsecentry{Letting Readline Type For You}{8}{4}{6}{108}
\subsecentry{Keyboard Macros}{8}{4}{7}{109}
\subsecentry{Some Miscellaneous Commands}{8}{4}{8}{110}
\secentry{Readline vi Mode}{8}{5}{112}
\secentry{Programmable Completion}{8}{6}{112}
\secentry{Programmable Completion Builtins}{8}{7}{114}
\chapentry{Using History Interactively}{9}{119}
\secentry{Bash History Facilities}{9}{1}{119}
\secentry{Bash History Builtins}{9}{2}{119}
\secentry{History Expansion}{9}{3}{121}
\subsecentry{Event Designators}{9}{3}{1}{121}
\subsecentry{Word Designators}{9}{3}{2}{122}
\subsecentry{Modifiers}{9}{3}{3}{123}
\chapentry{Installing Bash}{10}{125}
\secentry{Basic Installation}{10}{1}{125}
\secentry{Compilers and Options}{10}{2}{125}
\secentry{Compiling For Multiple Architectures}{10}{3}{126}
\secentry{Installation Names}{10}{4}{126}
\secentry{Specifying the System Type}{10}{5}{126}
\secentry{Sharing Defaults}{10}{6}{127}
\secentry{Operation Controls}{10}{7}{127}
\secentry{Optional Features}{10}{8}{127}
\appendixentry{Reporting Bugs}{A}{133}
\appendixentry{Major Differences From The Bourne Shell}{B}{135}
\secentry{Implementation Differences From The SVR4.2 Shell}{B}{1}{139}
\appendixentry{GNU Free Documentation License}{C}{141}
\appendixentry{Indexes}{D}{149}
\secentry{Index of Shell Builtin Commands}{D}{1}{149}
\secentry{Index of Shell Reserved Words}{D}{2}{150}
\secentry{Parameter and Variable Index}{D}{3}{150}
\secentry{Function Index}{D}{4}{152}
\secentry{Concept Index}{D}{5}{154}
+8 -6
View File
@@ -6,10 +6,10 @@
\entry{#}{16}{\code {#}}
\entry{?}{16}{\code {?}}
\entry{-}{16}{\code {-}}
\entry{$}{16}{\code {$}}
\entry{!}{16}{\code {!}}
\entry{0}{16}{\code {0}}
\entry{_}{16}{\code {_}}
\entry{$}{17}{\code {$}}
\entry{!}{17}{\code {!}}
\entry{0}{17}{\code {0}}
\entry{_}{17}{\code {_}}
\entry{CDPATH}{59}{\code {CDPATH}}
\entry{HOME}{59}{\code {HOME}}
\entry{IFS}{59}{\code {IFS}}
@@ -97,6 +97,7 @@
\entry{bell-style}{95}{\code {bell-style}}
\entry{bind-tty-special-chars}{95}{\code {bind-tty-special-chars}}
\entry{comment-begin}{95}{\code {comment-begin}}
\entry{completion-prefix-display-length}{95}{\code {completion-prefix-display-length}}
\entry{completion-query-items}{95}{\code {completion-query-items}}
\entry{convert-meta}{96}{\code {convert-meta}}
\entry{disable-completion}{96}{\code {disable-completion}}
@@ -108,13 +109,14 @@
\entry{horizontal-scroll-mode}{96}{\code {horizontal-scroll-mode}}
\entry{input-meta}{96}{\code {input-meta}}
\entry{meta-flag}{96}{\code {meta-flag}}
\entry{isearch-terminators}{96}{\code {isearch-terminators}}
\entry{isearch-terminators}{97}{\code {isearch-terminators}}
\entry{keymap}{97}{\code {keymap}}
\entry{mark-modified-lines}{97}{\code {mark-modified-lines}}
\entry{mark-symlinked-directories}{97}{\code {mark-symlinked-directories}}
\entry{match-hidden-files}{97}{\code {match-hidden-files}}
\entry{output-meta}{97}{\code {output-meta}}
\entry{page-completions}{97}{\code {page-completions}}
\entry{show-all-if-ambiguous}{97}{\code {show-all-if-ambiguous}}
\entry{revert-all-at-newline}{98}{\code {revert-all-at-newline}}
\entry{show-all-if-ambiguous}{98}{\code {show-all-if-ambiguous}}
\entry{show-all-if-unmodified}{98}{\code {show-all-if-unmodified}}
\entry{visible-stats}{98}{\code {visible-stats}}
+8 -6
View File
@@ -1,9 +1,9 @@
\initial {!}
\entry {\code {!}}{16}
\entry {\code {!}}{17}
\initial {#}
\entry {\code {#}}{16}
\initial {$}
\entry {\code {$}}{16}
\entry {\code {$}}{17}
\initial {*}
\entry {\code {*}}{16}
\initial {-}
@@ -13,9 +13,9 @@
\initial {@}
\entry {\code {@}}{16}
\initial {_}
\entry {\code {_}}{16}
\entry {\code {_}}{17}
\initial {0}
\entry {\code {0}}{16}
\entry {\code {0}}{17}
\initial {A}
\entry {\code {auto_resume}}{90}
\initial {B}
@@ -45,6 +45,7 @@
\entry {\code {COMP_TYPE}}{61}
\entry {\code {COMP_WORDBREAKS}}{62}
\entry {\code {COMP_WORDS}}{62}
\entry {\code {completion-prefix-display-length}}{95}
\entry {\code {completion-query-items}}{95}
\entry {\code {COMPREPLY}}{62}
\entry {\code {convert-meta}}{96}
@@ -85,7 +86,7 @@
\entry {\code {IGNOREEOF}}{64}
\entry {\code {input-meta}}{96}
\entry {\code {INPUTRC}}{64}
\entry {\code {isearch-terminators}}{96}
\entry {\code {isearch-terminators}}{97}
\initial {K}
\entry {\code {keymap}}{97}
\initial {L}
@@ -128,12 +129,13 @@
\initial {R}
\entry {\code {RANDOM}}{66}
\entry {\code {REPLY}}{66}
\entry {\code {revert-all-at-newline}}{98}
\initial {S}
\entry {\code {SECONDS}}{66}
\entry {\code {SHELL}}{66}
\entry {\code {SHELLOPTS}}{66}
\entry {\code {SHLVL}}{66}
\entry {\code {show-all-if-ambiguous}}{97}
\entry {\code {show-all-if-ambiguous}}{98}
\entry {\code {show-all-if-unmodified}}{98}
\initial {T}
\entry {\code {TEXTDOMAIN}}{7}
+253 -205
View File
@@ -97,7 +97,13 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
Remove any current binding for _k_e_y_s_e_q.
--xx _k_e_y_s_e_q::_s_h_e_l_l_-_c_o_m_m_a_n_d
Cause _s_h_e_l_l_-_c_o_m_m_a_n_d to be executed whenever _k_e_y_s_e_q is
entered.
entered. When _s_h_e_l_l_-_c_o_m_m_a_n_d is executed, the shell sets
the RREEAADDLLIINNEE__LLIINNEE variable to the contents of the rreeaadd--
lliinnee line buffer and the RREEAADDLLIINNEE__PPOOIINNTT variable to the
current location of the insertion point. If the executed
command changes the value of RREEAADDLLIINNEE__LLIINNEE or RREEAADD--
LLIINNEE__PPOOIINNTT, those new values will be reflected in the
editing state.
The return value is 0 unless an unrecognized option is given or
an error occurred.
@@ -106,8 +112,8 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
Exit from within a ffoorr, wwhhiillee, uunnttiill, or sseelleecctt loop. If _n is
specified, break _n levels. _n must be >= 1. If _n is greater
than the number of enclosing loops, all enclosing loops are
exited. The return value is 0 unless the shell is not executing
a loop when bbrreeaakk is executed.
exited. The return value is 0 unless _n is not greater than or
equal to 1.
bbuuiillttiinn _s_h_e_l_l_-_b_u_i_l_t_i_n [_a_r_g_u_m_e_n_t_s]
Execute the specified shell builtin, passing it _a_r_g_u_m_e_n_t_s, and
@@ -117,6 +123,19 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
commonly redefined this way. The return status is false if
_s_h_e_l_l_-_b_u_i_l_t_i_n is not a shell builtin command.
ccaalllleerr [_e_x_p_r]
Returns the context of any active subroutine call (a shell func-
tion or a script executed with the .. or ssoouurrccee builtins. With-
out _e_x_p_r, ccaalllleerr displays the line number and source filename of
the current subroutine call. If a non-negative integer is sup-
plied as _e_x_p_r, ccaalllleerr displays the line number, subroutine name,
and source file corresponding to that position in the current
execution call stack. This extra information may be used, for
example, to print a stack trace. The current frame is frame 0.
The return value is 0 unless the shell is not executing a sub-
routine call or _e_x_p_r does not correspond to a valid position in
the call stack.
ccdd [--LL||--PP] [_d_i_r]
Change the current directory to _d_i_r. The variable HHOOMMEE is the
default _d_i_r. The variable CCDDPPAATTHH defines the search path for
@@ -134,19 +153,6 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
output. The return value is true if the directory was success-
fully changed; false otherwise.
ccaalllleerr [_e_x_p_r]
Returns the context of any active subroutine call (a shell func-
tion or a script executed with the .. or ssoouurrccee builtins. With-
out _e_x_p_r, ccaalllleerr displays the line number and source filename of
the current subroutine call. If a non-negative integer is sup-
plied as _e_x_p_r, ccaalllleerr displays the line number, subroutine name,
and source file corresponding to that position in the current
execution call stack. This extra information may be used, for
example, to print a stack trace. The current frame is frame 0.
The return value is 0 unless the shell is not executing a sub-
routine call or _e_x_p_r does not correspond to a valid position in
the call stack.
ccoommmmaanndd [--ppVVvv] _c_o_m_m_a_n_d [_a_r_g ...]
Run _c_o_m_m_a_n_d with _a_r_g_s suppressing the normal shell function
lookup. Only builtin commands or commands found in the PPAATTHH are
@@ -178,16 +184,18 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
The return value is true unless an invalid option is supplied,
or no matches were generated.
ccoommpplleettee [--aabbccddeeffggjjkkssuuvv] [--oo _c_o_m_p_-_o_p_t_i_o_n] [--AA _a_c_t_i_o_n] [--GG _g_l_o_b_p_a_t] [--WW
_w_o_r_d_l_i_s_t] [--FF _f_u_n_c_t_i_o_n] [--CC _c_o_m_m_a_n_d]
ccoommpplleettee [--aabbccddeeffggjjkkssuuvv] [--oo _c_o_m_p_-_o_p_t_i_o_n] [--EE] [--AA _a_c_t_i_o_n] [--GG _g_l_o_b_p_a_t]
[--WW _w_o_r_d_l_i_s_t] [--FF _f_u_n_c_t_i_o_n] [--CC _c_o_m_m_a_n_d]
[--XX _f_i_l_t_e_r_p_a_t] [--PP _p_r_e_f_i_x] [--SS _s_u_f_f_i_x] _n_a_m_e [_n_a_m_e _._._.]
ccoommpplleettee --pprr [_n_a_m_e ...]
ccoommpplleettee --pprr [--EE] [_n_a_m_e ...]
Specify how arguments to each _n_a_m_e should be completed. If the
--pp option is supplied, or if no options are supplied, existing
completion specifications are printed in a way that allows them
to be reused as input. The --rr option removes a completion spec-
ification for each _n_a_m_e, or, if no _n_a_m_es are supplied, all com-
pletion specifications.
pletion specifications. The --EE option indicates that the
remaining options and actions should apply to ``empty'' command
completion; that is, completion attempted on a blank line.
The process of applying these completion specifications when
word completion is attempted is described above under PPrroo--
@@ -319,8 +327,8 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
sseelleecctt loop. If _n is specified, resume at the _nth enclosing
loop. _n must be >= 1. If _n is greater than the number of
enclosing loops, the last enclosing loop (the ``top-level''
loop) is resumed. The return value is 0 unless the shell is not
executing a loop when ccoonnttiinnuuee is executed.
loop) is resumed. The return value is 0 unless _n is not greater
than or equal to 1.
ddeeccllaarree [--aaffFFiirrttxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
ttyyppeesseett [--aaffFFiirrttxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
@@ -601,13 +609,16 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
printed. The return status is true unless a _n_a_m_e is not found
or an invalid option is supplied.
hheellpp [--ss] [_p_a_t_t_e_r_n]
hheellpp [--ddmmss] [_p_a_t_t_e_r_n]
Display helpful information about builtin commands. If _p_a_t_t_e_r_n
is specified, hheellpp gives detailed help on all commands matching
_p_a_t_t_e_r_n; otherwise help for all the builtins and shell control
structures is printed. The --ss option restricts the information
displayed to a short usage synopsis. The return status is 0
unless no command matches _p_a_t_t_e_r_n.
structures is printed.
--dd Display a short description of each _p_a_t_t_e_r_n
--mm Display the description of each _p_a_t_t_e_r_n in a manpage-like
format
--ss Display only a short usage synopsis for each _p_a_t_t_e_r_n
The return status is 0 unless no command matches _p_a_t_t_e_r_n.
hhiissttoorryy [[_n]]
hhiissttoorryy --cc
@@ -617,44 +628,44 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
hhiissttoorryy --ss _a_r_g [_a_r_g _._._.]
With no options, display the command history list with line num-
bers. Lines listed with a ** have been modified. An argument of
_n lists only the last _n lines. If the shell variable HHIISSTTTTIIMMEE--
FFOORRMMAATT is set and not null, it is used as a format string for
_s_t_r_f_t_i_m_e(3) to display the time stamp associated with each dis-
played history entry. No intervening blank is printed between
the formatted time stamp and the history line. If _f_i_l_e_n_a_m_e is
supplied, it is used as the name of the history file; if not,
the value of HHIISSTTFFIILLEE is used. Options, if supplied, have the
_n lists only the last _n lines. If the shell variable HHIISSTTTTIIMMEE--
FFOORRMMAATT is set and not null, it is used as a format string for
_s_t_r_f_t_i_m_e(3) to display the time stamp associated with each dis-
played history entry. No intervening blank is printed between
the formatted time stamp and the history line. If _f_i_l_e_n_a_m_e is
supplied, it is used as the name of the history file; if not,
the value of HHIISSTTFFIILLEE is used. Options, if supplied, have the
following meanings:
--cc Clear the history list by deleting all the entries.
--dd _o_f_f_s_e_t
Delete the history entry at position _o_f_f_s_e_t.
--aa Append the ``new'' history lines (history lines entered
since the beginning of the current bbaasshh session) to the
--aa Append the ``new'' history lines (history lines entered
since the beginning of the current bbaasshh session) to the
history file.
--nn Read the history lines not already read from the history
file into the current history list. These are lines
appended to the history file since the beginning of the
--nn Read the history lines not already read from the history
file into the current history list. These are lines
appended to the history file since the beginning of the
current bbaasshh session.
--rr Read the contents of the history file and use them as the
current history.
--ww Write the current history to the history file, overwrit-
--ww Write the current history to the history file, overwrit-
ing the history file's contents.
--pp Perform history substitution on the following _a_r_g_s and
display the result on the standard output. Does not
store the results in the history list. Each _a_r_g must be
--pp Perform history substitution on the following _a_r_g_s and
display the result on the standard output. Does not
store the results in the history list. Each _a_r_g must be
quoted to disable normal history expansion.
--ss Store the _a_r_g_s in the history list as a single entry.
The last command in the history list is removed before
--ss Store the _a_r_g_s in the history list as a single entry.
The last command in the history list is removed before
the _a_r_g_s are added.
If the HHIISSTTTTIIMMEEFFOORRMMAATT is set, the time stamp information associ-
ated with each history entry is written to the history file,
marked with the history comment character. When the history
ated with each history entry is written to the history file,
marked with the history comment character. When the history
file is read, lines beginning with the history comment character
followed immediately by a digit are interpreted as timestamps
for the previous history line. The return value is 0 unless an
invalid option is encountered, an error occurs while reading or
writing the history file, an invalid _o_f_f_s_e_t is supplied as an
followed immediately by a digit are interpreted as timestamps
for the previous history line. The return value is 0 unless an
invalid option is encountered, an error occurs while reading or
writing the history file, an invalid _o_f_f_s_e_t is supplied as an
argument to --dd, or the history expansion supplied as an argument
to --pp fails.
@@ -663,54 +674,81 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
The first form lists the active jobs. The options have the fol-
lowing meanings:
--ll List process IDs in addition to the normal information.
--pp List only the process ID of the job's process group
--pp List only the process ID of the job's process group
leader.
--nn Display information only about jobs that have changed
status since the user was last notified of their status.
--nn Display information only about jobs that have changed
status since the user was last notified of their status.
--rr Restrict output to running jobs.
--ss Restrict output to stopped jobs.
If _j_o_b_s_p_e_c is given, output is restricted to information about
that job. The return status is 0 unless an invalid option is
If _j_o_b_s_p_e_c is given, output is restricted to information about
that job. The return status is 0 unless an invalid option is
encountered or an invalid _j_o_b_s_p_e_c is supplied.
If the --xx option is supplied, jjoobbss replaces any _j_o_b_s_p_e_c found in
_c_o_m_m_a_n_d or _a_r_g_s with the corresponding process group ID, and
_c_o_m_m_a_n_d or _a_r_g_s with the corresponding process group ID, and
executes _c_o_m_m_a_n_d passing it _a_r_g_s, returning its exit status.
kkiillll [--ss _s_i_g_s_p_e_c | --nn _s_i_g_n_u_m | --_s_i_g_s_p_e_c] [_p_i_d | _j_o_b_s_p_e_c] ...
kkiillll --ll [_s_i_g_s_p_e_c | _e_x_i_t___s_t_a_t_u_s]
Send the signal named by _s_i_g_s_p_e_c or _s_i_g_n_u_m to the processes
named by _p_i_d or _j_o_b_s_p_e_c. _s_i_g_s_p_e_c is either a case-insensitive
signal name such as SSIIGGKKIILLLL (with or without the SSIIGG prefix) or
a signal number; _s_i_g_n_u_m is a signal number. If _s_i_g_s_p_e_c is not
present, then SSIIGGTTEERRMM is assumed. An argument of --ll lists the
signal names. If any arguments are supplied when --ll is given,
the names of the signals corresponding to the arguments are
Send the signal named by _s_i_g_s_p_e_c or _s_i_g_n_u_m to the processes
named by _p_i_d or _j_o_b_s_p_e_c. _s_i_g_s_p_e_c is either a case-insensitive
signal name such as SSIIGGKKIILLLL (with or without the SSIIGG prefix) or
a signal number; _s_i_g_n_u_m is a signal number. If _s_i_g_s_p_e_c is not
present, then SSIIGGTTEERRMM is assumed. An argument of --ll lists the
signal names. If any arguments are supplied when --ll is given,
the names of the signals corresponding to the arguments are
listed, and the return status is 0. The _e_x_i_t___s_t_a_t_u_s argument to
--ll is a number specifying either a signal number or the exit
status of a process terminated by a signal. kkiillll returns true
if at least one signal was successfully sent, or false if an
--ll is a number specifying either a signal number or the exit
status of a process terminated by a signal. kkiillll returns true
if at least one signal was successfully sent, or false if an
error occurs or an invalid option is encountered.
lleett _a_r_g [_a_r_g ...]
Each _a_r_g is an arithmetic expression to be evaluated (see AARRIITTHH--
MMEETTIICC EEVVAALLUUAATTIIOONN). If the last _a_r_g evaluates to 0, lleett returns
MMEETTIICC EEVVAALLUUAATTIIOONN). If the last _a_r_g evaluates to 0, lleett returns
1; 0 is returned otherwise.
llooccaall [_o_p_t_i_o_n] [_n_a_m_e[=_v_a_l_u_e] ...]
For each argument, a local variable named _n_a_m_e is created, and
assigned _v_a_l_u_e. The _o_p_t_i_o_n can be any of the options accepted
For each argument, a local variable named _n_a_m_e is created, and
assigned _v_a_l_u_e. The _o_p_t_i_o_n can be any of the options accepted
by ddeeccllaarree. When llooccaall is used within a function, it causes the
variable _n_a_m_e to have a visible scope restricted to that func-
variable _n_a_m_e to have a visible scope restricted to that func-
tion and its children. With no operands, llooccaall writes a list of
local variables to the standard output. It is an error to use
local variables to the standard output. It is an error to use
llooccaall when not within a function. The return status is 0 unless
llooccaall is used outside a function, an invalid _n_a_m_e is supplied,
llooccaall is used outside a function, an invalid _n_a_m_e is supplied,
or _n_a_m_e is a readonly variable.
llooggoouutt Exit a login shell.
mmaappffiillee [--nn _c_o_u_n_t] [--OO _o_r_i_g_i_n] [--ss _c_o_u
nt_] _[--tt_] _[--uu _f_d_] _[--CC _c_a_l_l_b_a_c_k_] _[--cc _I_q_u_a_n_t_u_m]] [[_a_r_r_a_y]] RReeaadd lliinneess
ffrroomm tthhee ssttaannddaarrdd iinnppuutt iinnttoo aarrrraayy vvaarriiaabbllee _a_r_r_a_y, or from file
descriptor _f_d if the --uu option is supplied. The variable MMAAPP--
FFIILLEE is the default _a_r_r_a_y. Options, if supplied, have the fol-
lowing meanings:
--nn Copy at most _c_o_u_n_t lines. If _c_o_u_n_t is 0, all lines are
copied.
--OO Begin assigning to _a_r_r_a_y at index _o_r_i_g_i_n. The default
index is 0.
--ss Discard the first _c_o_u_n_t lines read.
--tt Remove a trailing line from each line read.
--uu Read lines from file descriptor _f_d instead of the stan-
dard input.
--CC Evaluate _c_a_l_l_b_a_c_k each time _q_u_a_n_t_u_m lines are read. The
--cc option specifies _q_u_a_n_t_u_m.
--cc Specify the number of lines read between each call to
_c_a_l_l_b_a_c_k.
If --CC is specified without --cc, the default quantum is 5000.
If not supplied with an explicit origin, mmaappffiillee will clear
_a_r_r_a_y before assigning to it.
mmaappffiillee returns successfully unless an invalid option or option
argument is supplied, or _a_r_r_a_y is invalid or unassignable.
ppooppdd [-nn] [+_n] [-_n]
Removes entries from the directory stack. With no arguments,
removes the top directory from the stack, and performs a ccdd to
@@ -833,9 +871,10 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
ters are not echoed.
--tt _t_i_m_e_o_u_t
Cause rreeaadd to time out and return failure if a complete
line of input is not read within _t_i_m_e_o_u_t seconds. This
option has no effect if rreeaadd is not reading input from
the terminal or a pipe.
line of input is not read within _t_i_m_e_o_u_t seconds. _t_i_m_e_-
_o_u_t may be a decimal number with a fractional portion
following the decimal point. This option has no effect
if rreeaadd is not reading input from the terminal or a pipe.
--uu _f_d Read input from file descriptor _f_d.
If no _n_a_m_e_s are supplied, the line read is assigned to the vari-
@@ -1104,6 +1143,10 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
If set, bbaasshh changes its behavior to that of version 3.1
with respect to quoted arguments to the conditional com-
mand's =~ operator.
ddiirrssppeellll
If set, bbaasshh attempts spelling correction on directory
names during word completion if the directory name ini-
tially supplied does not exist.
ddoottgglloobb If set, bbaasshh includes filenames beginning with a `.' in
the results of pathname expansion.
eexxeeccffaaiill
@@ -1153,62 +1196,67 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
ble completions. See SSHHEELLLL VVAARRIIAABBLLEESS above for a
description of FFIIGGNNOORREE. This option is enabled by
default.
gglloobbssttaarr
If set, the pattern **** used in a filename expansion con-
text will match a files and zero or more directories and
subdirectories. If the pattern is followed by a //, only
directories and subdirectories match.
ggnnuu__eerrrrffmmtt
If set, shell error messages are written in the standard
GNU error message format.
hhiissttaappppeenndd
If set, the history list is appended to the file named
by the value of the HHIISSTTFFIILLEE variable when the shell
If set, the history list is appended to the file named
by the value of the HHIISSTTFFIILLEE variable when the shell
exits, rather than overwriting the file.
hhiissttrreeeeddiitt
If set, and rreeaaddlliinnee is being used, a user is given the
If set, and rreeaaddlliinnee is being used, a user is given the
opportunity to re-edit a failed history substitution.
hhiissttvveerriiffyy
If set, and rreeaaddlliinnee is being used, the results of his-
tory substitution are not immediately passed to the
shell parser. Instead, the resulting line is loaded
If set, and rreeaaddlliinnee is being used, the results of his-
tory substitution are not immediately passed to the
shell parser. Instead, the resulting line is loaded
into the rreeaaddlliinnee editing buffer, allowing further modi-
fication.
hhoossttccoommpplleettee
If set, and rreeaaddlliinnee is being used, bbaasshh will attempt to
perform hostname completion when a word containing a @@
is being completed (see CCoommpplleettiinngg under RREEAADDLLIINNEE
perform hostname completion when a word containing a @@
is being completed (see CCoommpplleettiinngg under RREEAADDLLIINNEE
above). This is enabled by default.
hhuuppoonneexxiitt
If set, bbaasshh will send SSIIGGHHUUPP to all jobs when an inter-
active login shell exits.
iinntteerraaccttiivvee__ccoommmmeennttss
If set, allow a word beginning with ## to cause that word
and all remaining characters on that line to be ignored
in an interactive shell (see CCOOMMMMEENNTTSS above). This
and all remaining characters on that line to be ignored
in an interactive shell (see CCOOMMMMEENNTTSS above). This
option is enabled by default.
lliitthhiisstt If set, and the ccmmddhhiisstt option is enabled, multi-line
lliitthhiisstt If set, and the ccmmddhhiisstt option is enabled, multi-line
commands are saved to the history with embedded newlines
rather than using semicolon separators where possible.
llooggiinn__sshheellll
The shell sets this option if it is started as a login
shell (see IINNVVOOCCAATTIIOONN above). The value may not be
The shell sets this option if it is started as a login
shell (see IINNVVOOCCAATTIIOONN above). The value may not be
changed.
mmaaiillwwaarrnn
If set, and a file that bbaasshh is checking for mail has
been accessed since the last time it was checked, the
message ``The mail in _m_a_i_l_f_i_l_e has been read'' is dis-
If set, and a file that bbaasshh is checking for mail has
been accessed since the last time it was checked, the
message ``The mail in _m_a_i_l_f_i_l_e has been read'' is dis-
played.
nnoo__eemmppttyy__ccmmdd__ccoommpplleettiioonn
If set, and rreeaaddlliinnee is being used, bbaasshh will not
If set, and rreeaaddlliinnee is being used, bbaasshh will not
attempt to search the PPAATTHH for possible completions when
completion is attempted on an empty line.
nnooccaasseegglloobb
If set, bbaasshh matches filenames in a case-insensitive
If set, bbaasshh matches filenames in a case-insensitive
fashion when performing pathname expansion (see PPaatthhnnaammee
EExxppaannssiioonn above).
nnooccaasseemmaattcchh
If set, bbaasshh matches patterns in a case-insensitive
If set, bbaasshh matches patterns in a case-insensitive
fashion when performing matching while executing ccaassee or
[[[[ conditional commands.
nnuullllgglloobb
If set, bbaasshh allows patterns which match no files (see
PPaatthhnnaammee EExxppaannssiioonn above) to expand to a null string,
If set, bbaasshh allows patterns which match no files (see
PPaatthhnnaammee EExxppaannssiioonn above) to expand to a null string,
rather than themselves.
pprrooggccoommpp
If set, the programmable completion facilities (see PPrroo--
@@ -1216,47 +1264,47 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
enabled by default.
pprroommppttvvaarrss
If set, prompt strings undergo parameter expansion, com-
mand substitution, arithmetic expansion, and quote
removal after being expanded as described in PPRROOMMPPTTIINNGG
mand substitution, arithmetic expansion, and quote
removal after being expanded as described in PPRROOMMPPTTIINNGG
above. This option is enabled by default.
rreessttrriicctteedd__sshheellll
The shell sets this option if it is started in
The shell sets this option if it is started in
restricted mode (see RREESSTTRRIICCTTEEDD SSHHEELLLL below). The value
may not be changed. This is not reset when the startup
files are executed, allowing the startup files to dis-
may not be changed. This is not reset when the startup
files are executed, allowing the startup files to dis-
cover whether or not a shell is restricted.
sshhiifftt__vveerrbboossee
If set, the sshhiifftt builtin prints an error message when
If set, the sshhiifftt builtin prints an error message when
the shift count exceeds the number of positional parame-
ters.
ssoouurrcceeppaatthh
If set, the ssoouurrccee (..) builtin uses the value of PPAATTHH to
find the directory containing the file supplied as an
find the directory containing the file supplied as an
argument. This option is enabled by default.
xxppgg__eecchhoo
If set, the eecchhoo builtin expands backslash-escape
If set, the eecchhoo builtin expands backslash-escape
sequences by default.
ssuussppeenndd [--ff]
Suspend the execution of this shell until it receives a SSIIGGCCOONNTT
signal. The --ff option says not to complain if this is a login
shell; just suspend anyway. The return status is 0 unless the
Suspend the execution of this shell until it receives a SSIIGGCCOONNTT
signal. The --ff option says not to complain if this is a login
shell; just suspend anyway. The return status is 0 unless the
shell is a login shell and --ff is not supplied, or if job control
is not enabled.
tteesstt _e_x_p_r
[[ _e_x_p_r ]]
Return a status of 0 or 1 depending on the evaluation of the
conditional expression _e_x_p_r. Each operator and operand must be
a separate argument. Expressions are composed of the primaries
described above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS. tteesstt does not
Return a status of 0 or 1 depending on the evaluation of the
conditional expression _e_x_p_r. Each operator and operand must be
a separate argument. Expressions are composed of the primaries
described above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS. tteesstt does not
accept any options, nor does it accept and ignore an argument of
---- as signifying the end of options.
Expressions may be combined using the following operators,
Expressions may be combined using the following operators,
listed in decreasing order of precedence. The evaluation
depends on the number of arguments; see below.
!! _e_x_p_r True if _e_x_p_r is false.
(( _e_x_p_r ))
Returns the value of _e_x_p_r. This may be used to override
Returns the value of _e_x_p_r. This may be used to override
the normal precedence of operators.
_e_x_p_r_1 -aa _e_x_p_r_2
True if both _e_x_p_r_1 and _e_x_p_r_2 are true.
@@ -1273,108 +1321,108 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
null.
2 arguments
If the first argument is !!, the expression is true if and
only if the second argument is null. If the first argu-
ment is one of the unary conditional operators listed
above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the expression is
only if the second argument is null. If the first argu-
ment is one of the unary conditional operators listed
above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the expression is
true if the unary test is true. If the first argument is
not a valid unary conditional operator, the expression is
false.
3 arguments
If the second argument is one of the binary conditional
If the second argument is one of the binary conditional
operators listed above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the
result of the expression is the result of the binary test
using the first and third arguments as operands. The --aa
and --oo operators are considered binary operators when
there are three arguments. If the first argument is !!,
the value is the negation of the two-argument test using
using the first and third arguments as operands. The --aa
and --oo operators are considered binary operators when
there are three arguments. If the first argument is !!,
the value is the negation of the two-argument test using
the second and third arguments. If the first argument is
exactly (( and the third argument is exactly )), the result
is the one-argument test of the second argument. Other-
is the one-argument test of the second argument. Other-
wise, the expression is false.
4 arguments
If the first argument is !!, the result is the negation of
the three-argument expression composed of the remaining
the three-argument expression composed of the remaining
arguments. Otherwise, the expression is parsed and eval-
uated according to precedence using the rules listed
uated according to precedence using the rules listed
above.
5 or more arguments
The expression is parsed and evaluated according to
The expression is parsed and evaluated according to
precedence using the rules listed above.
ttiimmeess Print the accumulated user and system times for the shell and
ttiimmeess Print the accumulated user and system times for the shell and
for processes run from the shell. The return status is 0.
ttrraapp [--llpp] [[_a_r_g] _s_i_g_s_p_e_c ...]
The command _a_r_g is to be read and executed when the shell
receives signal(s) _s_i_g_s_p_e_c. If _a_r_g is absent (and there is a
single _s_i_g_s_p_e_c) or --, each specified signal is reset to its
original disposition (the value it had upon entrance to the
shell). If _a_r_g is the null string the signal specified by each
_s_i_g_s_p_e_c is ignored by the shell and by the commands it invokes.
If _a_r_g is not present and --pp has been supplied, then the trap
commands associated with each _s_i_g_s_p_e_c are displayed. If no
arguments are supplied or if only --pp is given, ttrraapp prints the
list of commands associated with each signal. The --ll option
causes the shell to print a list of signal names and their cor-
responding numbers. Each _s_i_g_s_p_e_c is either a signal name
defined in <_s_i_g_n_a_l_._h>, or a signal number. Signal names are
case insensitive and the SIG prefix is optional. If a _s_i_g_s_p_e_c
is EEXXIITT (0) the command _a_r_g is executed on exit from the shell.
If a _s_i_g_s_p_e_c is DDEEBBUUGG, the command _a_r_g is executed before every
The command _a_r_g is to be read and executed when the shell
receives signal(s) _s_i_g_s_p_e_c. If _a_r_g is absent (and there is a
single _s_i_g_s_p_e_c) or --, each specified signal is reset to its
original disposition (the value it had upon entrance to the
shell). If _a_r_g is the null string the signal specified by each
_s_i_g_s_p_e_c is ignored by the shell and by the commands it invokes.
If _a_r_g is not present and --pp has been supplied, then the trap
commands associated with each _s_i_g_s_p_e_c are displayed. If no
arguments are supplied or if only --pp is given, ttrraapp prints the
list of commands associated with each signal. The --ll option
causes the shell to print a list of signal names and their cor-
responding numbers. Each _s_i_g_s_p_e_c is either a signal name
defined in <_s_i_g_n_a_l_._h>, or a signal number. Signal names are
case insensitive and the SIG prefix is optional. If a _s_i_g_s_p_e_c
is EEXXIITT (0) the command _a_r_g is executed on exit from the shell.
If a _s_i_g_s_p_e_c is DDEEBBUUGG, the command _a_r_g is executed before every
_s_i_m_p_l_e _c_o_m_m_a_n_d, _f_o_r command, _c_a_s_e command, _s_e_l_e_c_t command, every
arithmetic _f_o_r command, and before the first command executes in
a shell function (see SSHHEELLLL GGRRAAMMMMAARR above). Refer to the
description of the eexxttddeebbuugg option to the sshhoopptt builtin for
details of its effect on the DDEEBBUUGG trap. If a _s_i_g_s_p_e_c is EERRRR,
the command _a_r_g is executed whenever a simple command has a
non-zero exit status, subject to the following conditions. The
EERRRR trap is not executed if the failed command is part of the
command list immediately following a wwhhiillee or uunnttiill keyword,
part of the test in an _i_f statement, part of a command executed
in a &&&& or |||| list, or if the command's return value is being
inverted via !!. These are the same conditions obeyed by the
a shell function (see SSHHEELLLL GGRRAAMMMMAARR above). Refer to the
description of the eexxttddeebbuugg option to the sshhoopptt builtin for
details of its effect on the DDEEBBUUGG trap. If a _s_i_g_s_p_e_c is EERRRR,
the command _a_r_g is executed whenever a simple command has a
non-zero exit status, subject to the following conditions. The
EERRRR trap is not executed if the failed command is part of the
command list immediately following a wwhhiillee or uunnttiill keyword,
part of the test in an _i_f statement, part of a command executed
in a &&&& or |||| list, or if the command's return value is being
inverted via !!. These are the same conditions obeyed by the
eerrrreexxiitt option. If a _s_i_g_s_p_e_c is RREETTUURRNN, the command _a_r_g is exe-
cuted each time a shell function or a script executed with the ..
or ssoouurrccee builtins finishes executing. Signals ignored upon
entry to the shell cannot be trapped or reset. Trapped signals
or ssoouurrccee builtins finishes executing. Signals ignored upon
entry to the shell cannot be trapped or reset. Trapped signals
that are not being ignored are reset to their original values in
a child process when it is created. The return status is false
a child process when it is created. The return status is false
if any _s_i_g_s_p_e_c is invalid; otherwise ttrraapp returns true.
ttyyppee [--aaffttppPP] _n_a_m_e [_n_a_m_e ...]
With no options, indicate how each _n_a_m_e would be interpreted if
With no options, indicate how each _n_a_m_e would be interpreted if
used as a command name. If the --tt option is used, ttyyppee prints a
string which is one of _a_l_i_a_s, _k_e_y_w_o_r_d, _f_u_n_c_t_i_o_n, _b_u_i_l_t_i_n, or
_f_i_l_e if _n_a_m_e is an alias, shell reserved word, function,
builtin, or disk file, respectively. If the _n_a_m_e is not found,
then nothing is printed, and an exit status of false is
returned. If the --pp option is used, ttyyppee either returns the
string which is one of _a_l_i_a_s, _k_e_y_w_o_r_d, _f_u_n_c_t_i_o_n, _b_u_i_l_t_i_n, or
_f_i_l_e if _n_a_m_e is an alias, shell reserved word, function,
builtin, or disk file, respectively. If the _n_a_m_e is not found,
then nothing is printed, and an exit status of false is
returned. If the --pp option is used, ttyyppee either returns the
name of the disk file that would be executed if _n_a_m_e were speci-
fied as a command name, or nothing if ``type -t name'' would not
return _f_i_l_e. The --PP option forces a PPAATTHH search for each _n_a_m_e,
return _f_i_l_e. The --PP option forces a PPAATTHH search for each _n_a_m_e,
even if ``type -t name'' would not return _f_i_l_e. If a command is
hashed, --pp and --PP print the hashed value, not necessarily the
hashed, --pp and --PP print the hashed value, not necessarily the
file that appears first in PPAATTHH. If the --aa option is used, ttyyppee
prints all of the places that contain an executable named _n_a_m_e.
This includes aliases and functions, if and only if the --pp
option is not also used. The table of hashed commands is not
consulted when using --aa. The --ff option suppresses shell func-
tion lookup, as with the ccoommmmaanndd builtin. ttyyppee returns true if
any of the arguments are found, false if none are found.
prints all of the places that contain an executable named _n_a_m_e.
This includes aliases and functions, if and only if the --pp
option is not also used. The table of hashed commands is not
consulted when using --aa. The --ff option suppresses shell func-
tion lookup, as with the ccoommmmaanndd builtin. ttyyppee returns true if
all of the arguments are found, false if any are not found.
uulliimmiitt [--HHSSTTaabbccddeeffiillmmnnppqqrrssttuuvvxx [_l_i_m_i_t]]
Provides control over the resources available to the shell and
to processes started by it, on systems that allow such control.
Provides control over the resources available to the shell and
to processes started by it, on systems that allow such control.
The --HH and --SS options specify that the hard or soft limit is set
for the given resource. A hard limit cannot be increased by a
non-root user once it is set; a soft limit may be increased up
to the value of the hard limit. If neither --HH nor --SS is speci-
for the given resource. A hard limit cannot be increased by a
non-root user once it is set; a soft limit may be increased up
to the value of the hard limit. If neither --HH nor --SS is speci-
fied, both the soft and hard limits are set. The value of _l_i_m_i_t
can be a number in the unit specified for the resource or one of
the special values hhaarrdd, ssoofftt, or uunnlliimmiitteedd, which stand for the
current hard limit, the current soft limit, and no limit,
respectively. If _l_i_m_i_t is omitted, the current value of the
soft limit of the resource is printed, unless the --HH option is
current hard limit, the current soft limit, and no limit,
respectively. If _l_i_m_i_t is omitted, the current value of the
soft limit of the resource is printed, unless the --HH option is
given. When more than one resource is specified, the limit name
and unit are printed before the value. Other options are inter-
preted as follows:
@@ -1383,7 +1431,7 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
--cc The maximum size of core files created
--dd The maximum size of a process's data segment
--ee The maximum scheduling priority ("nice")
--ff The maximum size of files written by the shell and its
--ff The maximum size of files written by the shell and its
children
--ii The maximum number of pending signals
--ll The maximum size that may be locked into memory
@@ -1395,58 +1443,58 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
--rr The maximum real-time scheduling priority
--ss The maximum stack size
--tt The maximum amount of cpu time in seconds
--uu The maximum number of processes available to a single
--uu The maximum number of processes available to a single
user
--vv The maximum amount of virtual memory available to the
--vv The maximum amount of virtual memory available to the
shell
--xx The maximum number of file locks
--TT The maximum number of threads
If _l_i_m_i_t is given, it is the new value of the specified resource
(the --aa option is display only). If no option is given, then --ff
is assumed. Values are in 1024-byte increments, except for --tt,
which is in seconds, --pp, which is in units of 512-byte blocks,
and --TT, --bb, --nn, and --uu, which are unscaled values. The return
is assumed. Values are in 1024-byte increments, except for --tt,
which is in seconds, --pp, which is in units of 512-byte blocks,
and --TT, --bb, --nn, and --uu, which are unscaled values. The return
status is 0 unless an invalid option or argument is supplied, or
an error occurs while setting a new limit.
uummaasskk [--pp] [--SS] [_m_o_d_e]
The user file-creation mask is set to _m_o_d_e. If _m_o_d_e begins with
a digit, it is interpreted as an octal number; otherwise it is
interpreted as a symbolic mode mask similar to that accepted by
_c_h_m_o_d(1). If _m_o_d_e is omitted, the current value of the mask is
printed. The --SS option causes the mask to be printed in sym-
bolic form; the default output is an octal number. If the --pp
a digit, it is interpreted as an octal number; otherwise it is
interpreted as a symbolic mode mask similar to that accepted by
_c_h_m_o_d(1). If _m_o_d_e is omitted, the current value of the mask is
printed. The --SS option causes the mask to be printed in sym-
bolic form; the default output is an octal number. If the --pp
option is supplied, and _m_o_d_e is omitted, the output is in a form
that may be reused as input. The return status is 0 if the mode
was successfully changed or if no _m_o_d_e argument was supplied,
was successfully changed or if no _m_o_d_e argument was supplied,
and false otherwise.
uunnaalliiaass [-aa] [_n_a_m_e ...]
Remove each _n_a_m_e from the list of defined aliases. If --aa is
supplied, all alias definitions are removed. The return value
Remove each _n_a_m_e from the list of defined aliases. If --aa is
supplied, all alias definitions are removed. The return value
is true unless a supplied _n_a_m_e is not a defined alias.
uunnsseett [-ffvv] [_n_a_m_e ...]
For each _n_a_m_e, remove the corresponding variable or function.
For each _n_a_m_e, remove the corresponding variable or function.
If no options are supplied, or the --vv option is given, each _n_a_m_e
refers to a shell variable. Read-only variables may not be
unset. If --ff is specified, each _n_a_m_e refers to a shell func-
tion, and the function definition is removed. Each unset vari-
able or function is removed from the environment passed to sub-
sequent commands. If any of RRAANNDDOOMM, SSEECCOONNDDSS, LLIINNEENNOO, HHIISSTTCCMMDD,
refers to a shell variable. Read-only variables may not be
unset. If --ff is specified, each _n_a_m_e refers to a shell func-
tion, and the function definition is removed. Each unset vari-
able or function is removed from the environment passed to sub-
sequent commands. If any of RRAANNDDOOMM, SSEECCOONNDDSS, LLIINNEENNOO, HHIISSTTCCMMDD,
FFUUNNCCNNAAMMEE, GGRROOUUPPSS, or DDIIRRSSTTAACCKK are unset, they lose their special
properties, even if they are subsequently reset. The exit sta-
properties, even if they are subsequently reset. The exit sta-
tus is true unless a _n_a_m_e is readonly.
wwaaiitt [_n _._._.]
Wait for each specified process and return its termination sta-
tus. Each _n may be a process ID or a job specification; if a
job spec is given, all processes in that job's pipeline are
waited for. If _n is not given, all currently active child pro-
cesses are waited for, and the return status is zero. If _n
specifies a non-existent process or job, the return status is
127. Otherwise, the return status is the exit status of the
Wait for each specified process and return its termination sta-
tus. Each _n may be a process ID or a job specification; if a
job spec is given, all processes in that job's pipeline are
waited for. If _n is not given, all currently active child pro-
cesses are waited for, and the return status is zero. If _n
specifies a non-existent process or job, the return status is
127. Otherwise, the return status is the exit status of the
last process or job waited for.
SSEEEE AALLSSOO
+1591 -1527
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.19.2
%%CreationDate: Tue Apr 8 09:14:15 2008
%%CreationDate: Thu May 29 11:48:42 2008
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%DocumentSuppliedResources: procset grops 1.19 2
+3 -3
View File
@@ -2,9 +2,9 @@
Copyright (C) 1988-2008 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Sun May 25 10:48:26 EDT 2008
@set LASTCHANGE Mon Jun 2 20:32:28 EDT 2008
@set EDITION 4.0
@set VERSION 4.0
@set UPDATED 25 May 2008
@set UPDATED-MONTH May 2008
@set UPDATED 2 June 2008
@set UPDATED-MONTH June 2008
+2 -2
View File
@@ -2,9 +2,9 @@
Copyright (C) 1988-2008 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Sun May 4 22:23:58 EDT 2008
@set LASTCHANGE Sun May 25 10:48:26 EDT 2008
@set EDITION 4.0
@set VERSION 4.0
@set UPDATED 4 May 2008
@set UPDATED 25 May 2008
@set UPDATED-MONTH May 2008
+1
View File
@@ -96,6 +96,7 @@ extern char **brace_expand __P((char *));
/* Miscellaneous functions from parse.y */
extern int yyparse __P((void));
extern int return_EOF __P((void));
extern char *xparse_dolparen __P((char *, char *, int *, int));
extern void reset_parser __P((void));
extern WORD_LIST *parse_string_to_word_list __P((char *, int, const char *));
+1
View File
@@ -274,6 +274,7 @@ extern int sh_contains_shell_metas __P((char *));
/* declarations for functions defined in lib/sh/spell.c */
extern int spname __P((char *, char *));
extern char *dirspell __P((char *));
/* declarations for functions defined in lib/sh/strcasecmp.c */
#if !defined (HAVE_STRCASECMP)
+13 -5
View File
@@ -217,8 +217,6 @@ int check_window_size;
/* Functions local to this file. */
static void run_sigchld_trap __P((int));
static sighandler wait_sigint_handler __P((int));
static sighandler sigchld_handler __P((int));
static sighandler sigcont_sighandler __P((int));
@@ -3123,7 +3121,17 @@ waitchld (wpid, block)
/* Call a SIGCHLD trap handler for each child that exits, if one is set. */
if (job_control && signal_is_trapped (SIGCHLD) && children_exited &&
trap_list[SIGCHLD] != (char *)IGNORE_SIG)
run_sigchld_trap (children_exited);
{
if (this_shell_builtin && this_shell_builtin == wait_builtin)
{
interrupt_immediately = 0;
trap_handler (SIGCHLD); /* set pending_traps[SIGCHLD] */
wait_signal_received = SIGCHLD;
longjmp (wait_intr_buf, 1);
}
run_sigchld_trap (children_exited);
}
/* We have successfully recorded the useful information about this process
that has just changed state. If we notify asynchronously, and the job
@@ -3342,7 +3350,7 @@ setjstatus (j)
#endif
}
static void
void
run_sigchld_trap (nchild)
int nchild;
{
@@ -3373,7 +3381,7 @@ run_sigchld_trap (nchild)
subst_assign_varlist = (WORD_LIST *)NULL;
the_pipeline = (PROCESS *)NULL;
restore_default_signal (SIGCHLD);
set_impossible_sigchld_trap ();
jobs_list_frozen = 1;
for (i = 0; i < nchild; i++)
{
+14 -5
View File
@@ -217,8 +217,6 @@ int check_window_size;
/* Functions local to this file. */
static void run_sigchld_trap __P((int));
static sighandler wait_sigint_handler __P((int));
static sighandler sigchld_handler __P((int));
static sighandler sigcont_sighandler __P((int));
@@ -2214,6 +2212,7 @@ wait_sigint_handler (sig)
/* XXX - should this be interrupt_state? If it is, the shell will act
as if it got the SIGINT interrupt. */
wait_sigint_received = 1;
/* Otherwise effectively ignore the SIGINT and allow the running job to
be killed. */
SIGRETURN (0);
@@ -3122,7 +3121,17 @@ waitchld (wpid, block)
/* Call a SIGCHLD trap handler for each child that exits, if one is set. */
if (job_control && signal_is_trapped (SIGCHLD) && children_exited &&
trap_list[SIGCHLD] != (char *)IGNORE_SIG)
run_sigchld_trap (children_exited);
{
if (posixly_correct && this_shell_builtin && this_shell_builtin == wait_builtin)
{
interrupt_immediately = 0;
trap_handler (SIGCHLD); /* set pending_traps[SIGCHLD] */
wait_signal_received = SIGCHLD;
longjmp (wait_intr_buf, 1);
}
run_sigchld_trap (children_exited);
}
/* We have successfully recorded the useful information about this process
that has just changed state. If we notify asynchronously, and the job
@@ -3341,7 +3350,7 @@ setjstatus (j)
#endif
}
static void
void
run_sigchld_trap (nchild)
int nchild;
{
@@ -3372,7 +3381,7 @@ run_sigchld_trap (nchild)
subst_assign_varlist = (WORD_LIST *)NULL;
the_pipeline = (PROCESS *)NULL;
restore_default_signal (SIGCHLD);
set_impossible_sigchld_trap ();
jobs_list_frozen = 1;
for (i = 0; i < nchild; i++)
{
+2
View File
@@ -221,6 +221,8 @@ extern int initialize_job_control __P((int));
extern void initialize_job_signals __P((void));
extern int give_terminal_to __P((pid_t, int));
extern void run_sigchld_trap __P((int));
extern void unfreeze_jobs_list __P((void));
extern int set_job_control __P((int));
extern void without_job_control __P((void));
+501 -67
View File
@@ -148,6 +148,7 @@ static int yy_readline_unget __P((int));
static int yy_string_get __P((void));
static int yy_string_unget __P((int));
static void rewind_input_string __P((void));
static int yy_stream_get __P((void));
static int yy_stream_unget __P((int));
@@ -170,6 +171,7 @@ static int time_command_acceptable __P((void));
static int special_case_tokens __P((char *));
static int read_token __P((int));
static char *parse_matched_pair __P((int, int, int, int *, int));
static char *parse_comsub __P((int, int, int, int *, int));
#if defined (ARRAY_VARS)
static char *parse_compound_assignment __P((int *));
#endif
@@ -1345,6 +1347,31 @@ with_input_from_string (string, name)
init_yy_io (yy_string_get, yy_string_unget, st_string, name, location);
}
/* Count the number of characters we've consumed from bash_input.location.string
and read into shell_input_line, but have not returned from shell_getc.
That is the true input location. Rewind bash_input.location.string by
that number of characters, so it points to the last character actually
consumed by the parser. */
void
rewind_input_string ()
{
int xchars;
/* number of unconsumed characters in the input -- XXX need to take newlines
into account, e.g., $(...\n) */
xchars = shell_input_line_len - shell_input_line_index;
/* XXX - how to reflect bash_input.location.string back to string passed to
parse_and_execute or xparse_dolparen? xparse_dolparen needs to know how
far into the string we parsed. parse_and_execute knows where bash_input.
location.string is, and how far from orig_string that is -- that's the
number of characters the command consumed. */
/* bash_input.location.string - xchars should be where we parsed to */
/* need to do more validation on xchars value for sanity -- test cases. */
bash_input.location.string -= xchars;
}
/* **************************************************************** */
/* */
/* Let input come from STREAM. */
@@ -2787,7 +2814,7 @@ tokword:
#define LEX_HEREDELIM 0x100 /* reading here-doc delimiter */
#define LEX_STRIPDOC 0x200 /* <<- strip tabs from here doc delim */
#define COMSUB_META(ch) ((ch) == ';' || (ch) == '&' || (ch) = '|')
#define COMSUB_META(ch) ((ch) == ';' || (ch) == '&' || (ch) == '|')
#define CHECK_NESTRET_ERROR() \
do { \
@@ -2816,15 +2843,17 @@ parse_matched_pair (qc, open, close, lenp, flags)
int open, close;
int *lenp, flags;
{
int count, ch, was_dollar, in_comment, check_comment;
int pass_next_character, backq_backslash, nestlen, ttranslen, start_lineno;
int count, ch, tflags;
int nestlen, ttranslen, start_lineno;
char *ret, *nestret, *ttrans;
int retind, retsize, rflags;
/* itrace("parse_matched_pair: open = %c close = %c", open, close); */
count = 1;
pass_next_character = backq_backslash = was_dollar = in_comment = 0;
check_comment = (flags & P_COMMAND) && qc != '`' && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0;
tflags = 0;
if ((flags & P_COMMAND) && qc != '`' && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0)
tflags |= LEX_CKCOMMENT;
/* RFLAGS is the set of flags we want to pass to recursive calls. */
rflags = (qc == '"') ? P_DQUOTE : (flags & P_DQUOTE);
@@ -2835,7 +2864,7 @@ parse_matched_pair (qc, open, close, lenp, flags)
start_lineno = line_number;
while (count)
{
ch = shell_getc (qc != '\'' && pass_next_character == 0 && backq_backslash == 0);
ch = shell_getc (qc != '\'' && (tflags & LEX_PASSNEXT) == 0);
if (ch == EOF)
{
@@ -2849,36 +2878,33 @@ parse_matched_pair (qc, open, close, lenp, flags)
if (ch == '\n' && SHOULD_PROMPT ())
prompt_again ();
if (in_comment)
/* Don't bother counting parens or doing anything else if in a comment
or part of a case statement */
if (tflags & LEX_INCOMMENT)
{
/* Add this character. */
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = ch;
if (ch == '\n')
in_comment = 0;
tflags &= ~LEX_INCOMMENT;
continue;
}
/* Not exactly right yet, should handle shell metacharacters, too. If
any changes are made to this test, make analogous changes to subst.c:
extract_delimited_string(). */
else if MBTEST(check_comment && in_comment == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind - 1])))
in_comment = 1;
else if MBTEST((tflags & LEX_CKCOMMENT) && (tflags & LEX_INCOMMENT) == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind - 1])))
tflags |= LEX_INCOMMENT;
/* last char was backslash inside backquoted command substitution */
if (backq_backslash)
if (tflags & LEX_PASSNEXT) /* last char was backslash */
{
backq_backslash = 0;
/* Placeholder for adding special characters */
}
if (pass_next_character) /* last char was backslash */
{
pass_next_character = 0;
tflags &= ~LEX_PASSNEXT;
if (qc != '\'' && ch == '\n') /* double-quoted \<newline> disappears. */
{
if (retind > 0) retind--; /* swallow previously-added backslash */
if (retind > 0)
retind--; /* swallow previously-added backslash */
continue;
}
@@ -2898,7 +2924,7 @@ parse_matched_pair (qc, open, close, lenp, flags)
else if MBTEST(ch == close) /* ending delimiter */
count--;
/* handle nested ${...} specially. */
else if MBTEST(open != close && was_dollar && open == '{' && ch == open) /* } */
else if MBTEST(open != close && (tflags & LEX_WASDOL) && open == '{' && ch == open) /* } */
count++;
else if MBTEST(((flags & P_FIRSTCLOSE) == 0) && ch == open) /* nested begin */
count++;
@@ -2907,37 +2933,36 @@ parse_matched_pair (qc, open, close, lenp, flags)
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = ch;
/* If we just read the ending character, don't bother continuing. */
if (count == 0)
break;
if (open == '\'') /* '' inside grouping construct */
{
if MBTEST((flags & P_ALLOWESC) && ch == '\\')
pass_next_character++;
#if 0
else if MBTEST((flags & P_BACKQUOTE) && ch == '\\')
backq_backslash++;
#endif
tflags |= LEX_PASSNEXT;
continue;
}
if MBTEST(ch == '\\') /* backslashes */
pass_next_character++;
tflags |= LEX_PASSNEXT;
/* Could also check open == '`' if we want to parse grouping constructs
inside old-style command substitution. */
if (open != close) /* a grouping construct */
{
if MBTEST(shellquote (ch))
{
/* '', ``, or "" inside $(...) or other grouping construct. */
push_delimiter (dstack, ch);
if MBTEST(was_dollar && ch == '\'') /* $'...' inside group */
if MBTEST((tflags & LEX_WASDOL) && ch == '\'') /* $'...' inside group */
nestret = parse_matched_pair (ch, ch, ch, &nestlen, P_ALLOWESC|rflags);
else
nestret = parse_matched_pair (ch, ch, ch, &nestlen, rflags);
pop_delimiter (dstack);
if (nestret == &matched_pair_error)
{
free (ret);
return &matched_pair_error;
}
if MBTEST(was_dollar && ch == '\'' && (extended_quote || (rflags & P_DQUOTE) == 0))
CHECK_NESTRET_ERROR ();
if MBTEST((tflags & LEX_WASDOL) && ch == '\'' && (extended_quote || (rflags & P_DQUOTE) == 0))
{
/* Translate $'...' here. */
ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen);
@@ -2956,7 +2981,7 @@ parse_matched_pair (qc, open, close, lenp, flags)
}
retind -= 2; /* back up before the $' */
}
else if MBTEST(was_dollar && ch == '"' && (extended_quote || (rflags & P_DQUOTE) == 0))
else if MBTEST((tflags & LEX_WASDOL) && ch == '"' && (extended_quote || (rflags & P_DQUOTE) == 0))
{
/* Locale expand $"..." here. */
ttrans = localeexpand (nestret, 0, nestlen - 1, start_lineno, &ttranslen);
@@ -2968,12 +2993,7 @@ parse_matched_pair (qc, open, close, lenp, flags)
retind -= 2; /* back up before the $" */
}
if (nestlen)
{
RESIZE_MALLOCED_BUFFER (ret, retind, nestlen, retsize, 64);
strcpy (ret + retind, nestret);
retind += nestlen;
}
APPEND_NESTRET ();
FREE (nestret);
}
}
@@ -2983,32 +3003,13 @@ parse_matched_pair (qc, open, close, lenp, flags)
else if MBTEST(open == '"' && ch == '`')
{
nestret = parse_matched_pair (0, '`', '`', &nestlen, rflags);
add_nestret:
if (nestret == &matched_pair_error)
{
free (ret);
return &matched_pair_error;
}
if (nestlen)
{
RESIZE_MALLOCED_BUFFER (ret, retind, nestlen, retsize, 64);
strcpy (ret + retind, nestret);
retind += nestlen;
}
CHECK_NESTRET_ERROR ();
APPEND_NESTRET ();
FREE (nestret);
}
#if 0
else if MBTEST(qc == '`' && (ch == '"' || ch == '\'') && in_comment == 0)
{
/* Add P_BACKQUOTE so backslash quotes the next character and
shell_getc does the right thing with \<newline>. We do this for
a measure of backwards compatibility -- it's not strictly the
right POSIX thing. */
nestret = parse_matched_pair (0, ch, ch, &nestlen, rflags|P_BACKQUOTE);
goto add_nestret;
}
#endif
else if MBTEST(open != '`' && was_dollar && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
else if MBTEST(open != '`' && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
/* check for $(), $[], or ${} inside quoted string. */
{
if (open == ch) /* undo previous increment */
@@ -3020,9 +3021,15 @@ add_nestret:
else if (ch == '[') /* ] */
nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags);
goto add_nestret;
CHECK_NESTRET_ERROR ();
APPEND_NESTRET ();
FREE (nestret);
}
was_dollar = MBTEST(ch == '$');
if MBTEST(ch == '$')
tflags |= LEX_WASDOL;
else
tflags &= ~LEX_WASDOL;
}
ret[retind] = '\0';
@@ -3031,6 +3038,432 @@ add_nestret:
return ret;
}
/* Parse a $(...) command substitution. This is messier than I'd like, and
reproduces a lot more of the token-reading code than I'd like. */
static char *
parse_comsub (qc, open, close, lenp, flags)
int qc; /* `"' if this construct is within double quotes */
int open, close;
int *lenp, flags;
{
int count, ch, peekc, tflags, lex_rwlen, lex_firstind;
int nestlen, ttranslen, start_lineno;
char *ret, *nestret, *ttrans, *heredelim;
int retind, retsize, rflags, hdlen;
/*itrace("parse_comsub: qc = `%c' open = %c close = %c", qc, open, close);*/
count = 1;
tflags = LEX_RESWDOK;
if ((flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0)
tflags |= LEX_CKCASE;
if ((tflags & LEX_CKCASE) && (interactive == 0 || interactive_comments))
tflags |= LEX_CKCOMMENT;
/* RFLAGS is the set of flags we want to pass to recursive calls. */
rflags = (flags & P_DQUOTE);
ret = (char *)xmalloc (retsize = 64);
retind = 0;
start_lineno = line_number;
lex_rwlen = 0;
heredelim = 0;
lex_firstind = -1;
while (count)
{
comsub_readchar:
ch = shell_getc (qc != '\'' && (tflags & LEX_PASSNEXT) == 0);
if (ch == EOF)
{
eof_error:
free (ret);
FREE (heredelim);
parser_error (start_lineno, _("unexpected EOF while looking for matching `%c'"), close);
EOF_Reached = 1; /* XXX */
return (&matched_pair_error);
}
/* If we hit the end of a line and are reading the contents of a here
document, and it's not the same line that the document starts on,
check for this line being the here doc delimiter. Otherwise, if
we're in a here document, mark the next character as the beginning
of a line. */
if (ch == '\n')
{
if ((tflags & LEX_HEREDELIM) && heredelim)
{
tflags &= ~LEX_HEREDELIM;
tflags |= LEX_INHEREDOC;
lex_firstind = retind + 1;
}
else if (tflags & LEX_INHEREDOC)
{
int tind;
tind = lex_firstind;
while ((tflags & LEX_STRIPDOC) && ret[tind] == '\t')
tind++;
if (STREQN (ret + tind, heredelim, hdlen))
{
tflags &= ~(LEX_STRIPDOC|LEX_INHEREDOC);
/*itrace("parse_comsub:%d: found here doc end `%s'", line_number, ret + tind);*/
lex_firstind = -1;
}
else
lex_firstind = retind + 1;
}
}
/* Possible reprompting. */
if (ch == '\n' && SHOULD_PROMPT ())
prompt_again ();
/* Don't bother counting parens or doing anything else if in a comment */
if (tflags & (LEX_INCOMMENT|LEX_INHEREDOC))
{
/* Add this character. */
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = ch;
if ((tflags & LEX_INCOMMENT) && ch == '\n')
tflags &= ~LEX_INCOMMENT;
continue;
}
/* Skip whitespace */
if MBTEST(shellblank (ch) && lex_rwlen == 0)
{
/* Add this character. */
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = ch;
continue;
}
/* Either we are looking for the start of the here-doc delimiter
(lex_firstind == -1) or we are reading one (lex_firstind >= 0).
If this character is a shell break character and we are reading
the delimiter, save it and note that we are now reading a here
document. If we've found the start of the delimiter, note it by
setting lex_firstind. Backslashes can quote shell metacharacters
in here-doc delimiters. */
if (tflags & LEX_HEREDELIM)
{
if (lex_firstind == -1 && shellbreak (ch) == 0)
lex_firstind = retind;
else if (lex_firstind >= 0 && (tflags & LEX_PASSNEXT) == 0 && shellbreak (ch))
{
nestret = substring (ret, lex_firstind, retind);
heredelim = string_quote_removal (nestret, 0);
free (nestret);
hdlen = STRLEN(heredelim);
/*itrace("parse_comsub:%d: found here doc delimiter `%s' (%d)", line_number, heredelim, hdlen);*/
if (ch == '\n')
{
tflags |= LEX_INHEREDOC;
tflags &= ~LEX_HEREDELIM;
lex_firstind = retind + 1;
}
else
lex_firstind = -1;
}
}
/* Meta-characters that can introduce a reserved word. Not perfect yet. */
if MBTEST((tflags & LEX_RESWDOK) == 0 && (tflags & LEX_CKCASE) && (tflags & LEX_INCOMMENT) == 0 && shellmeta(ch))
{
/* Add this character. */
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = ch;
peekc = shell_getc (1);
if (ch == peekc && (ch == '&' || ch == '|' || ch == ';')) /* two-character tokens */
{
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = peekc;
/*itrace("parse_comsub:%d: set lex_reswordok = 1, ch = `%c'", line_number, ch); */
tflags |= LEX_RESWDOK;
lex_rwlen = 0;
continue;
}
else if (ch == '\n' || COMSUB_META(ch))
{
shell_ungetc (peekc);
tflags |= LEX_RESWDOK;
/*itrace("parse_comsub:%d: set lex_reswordok = 1, ch = `%c'", line_number, ch);*/
lex_rwlen = 0;
continue;
}
else if (ch == EOF)
goto eof_error;
else
{
/* `unget' the character we just added and fall through */
retind--;
shell_ungetc (peekc);
}
}
/* If we can read a reserved word, try to read one. */
if (tflags & LEX_RESWDOK)
{
if MBTEST(islower (ch))
{
/* Add this character. */
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = ch;
lex_rwlen++;
continue;
}
else if MBTEST(lex_rwlen == 4 && shellbreak (ch))
{
if (STREQN (ret + retind - 4, "case", 4))
{
tflags |= LEX_INCASE;
/*itrace("parse_comsub:%d: found `case', lex_incase -> 1", line_number);*/
}
else if (STREQN (ret + retind - 4, "esac", 4))
{
tflags &= ~LEX_INCASE;
/*itrace("parse_comsub:%d: found `esac', lex_incase -> 0", line_number);*/
}
tflags &= ~LEX_RESWDOK;
}
else if (shellbreak (ch) == 0)
{
tflags &= ~LEX_RESWDOK;
/*itrace("parse_comsub:%d: found `%c', lex_reswordok -> 0", line_number, ch);*/
}
}
if MBTEST((tflags & LEX_INCOMMENT) == 0 && (tflags & LEX_CKCASE) && ch == '<')
{
/* Add this character. */
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = ch;
peekc = shell_getc (1);
if (peekc == EOF)
goto eof_error;
if (peekc == ch)
{
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = peekc;
peekc = shell_getc (1);
if (peekc == EOF)
goto eof_error;
if (peekc == '-')
{
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = peekc;
tflags |= LEX_STRIPDOC;
}
else
shell_ungetc (peekc);
tflags |= LEX_HEREDELIM;
lex_firstind = -1;
continue;
}
else
ch = peekc; /* fall through and continue XXX - this skips comments if peekc == '#' */
}
/* Not exactly right yet, should handle shell metacharacters, too. If
any changes are made to this test, make analogous changes to subst.c:
extract_delimited_string(). */
else if MBTEST((tflags & LEX_CKCOMMENT) && (tflags & LEX_INCOMMENT) == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || shellblank (ret[retind - 1])))
tflags |= LEX_INCOMMENT;
if (tflags & LEX_PASSNEXT) /* last char was backslash */
{
tflags &= ~LEX_PASSNEXT;
if (qc != '\'' && ch == '\n') /* double-quoted \<newline> disappears. */
{
if (retind > 0)
retind--; /* swallow previously-added backslash */
continue;
}
RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
if MBTEST(ch == CTLESC || ch == CTLNUL)
ret[retind++] = CTLESC;
ret[retind++] = ch;
continue;
}
else if MBTEST(ch == CTLESC || ch == CTLNUL) /* special shell escapes */
{
RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
ret[retind++] = CTLESC;
ret[retind++] = ch;
continue;
}
#if 0
else if MBTEST((tflags & LEX_INCASE) && ch == close && close == ')')
tflags &= ~LEX_INCASE; /* XXX */
#endif
else if MBTEST(ch == close && (tflags & LEX_INCASE) == 0) /* ending delimiter */
{
count--;
/*itrace("parse_comsub:%d: found close: count = %d", line_number, count);*/
}
else if MBTEST(((flags & P_FIRSTCLOSE) == 0) && (tflags & LEX_INCASE) == 0 && ch == open) /* nested begin */
count++;
/* Add this character. */
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = ch;
/* If we just read the ending character, don't bother continuing. */
if (count == 0)
break;
if MBTEST(ch == '\\') /* backslashes */
tflags |= LEX_PASSNEXT;
if MBTEST(shellquote (ch))
{
/* '', ``, or "" inside $(...). */
push_delimiter (dstack, ch);
if MBTEST((tflags & LEX_WASDOL) && ch == '\'') /* $'...' inside group */
nestret = parse_matched_pair (ch, ch, ch, &nestlen, P_ALLOWESC|rflags);
else
nestret = parse_matched_pair (ch, ch, ch, &nestlen, rflags);
pop_delimiter (dstack);
CHECK_NESTRET_ERROR ();
if MBTEST((tflags & LEX_WASDOL) && ch == '\'' && (extended_quote || (rflags & P_DQUOTE) == 0))
{
/* Translate $'...' here. */
ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen);
xfree (nestret);
if ((rflags & P_DQUOTE) == 0)
{
nestret = sh_single_quote (ttrans);
free (ttrans);
nestlen = strlen (nestret);
}
else
{
nestret = ttrans;
nestlen = ttranslen;
}
retind -= 2; /* back up before the $' */
}
else if MBTEST((tflags & LEX_WASDOL) && ch == '"' && (extended_quote || (rflags & P_DQUOTE) == 0))
{
/* Locale expand $"..." here. */
ttrans = localeexpand (nestret, 0, nestlen - 1, start_lineno, &ttranslen);
xfree (nestret);
nestret = sh_mkdoublequoted (ttrans, ttranslen, 0);
free (ttrans);
nestlen = ttranslen + 2;
retind -= 2; /* back up before the $" */
}
APPEND_NESTRET ();
FREE (nestret);
}
else if MBTEST((tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
/* check for $(), $[], or ${} inside command substitution. */
{
if ((tflags & LEX_INCASE) == 0 && open == ch) /* undo previous increment */
count--;
if (ch == '(') /* ) */
nestret = parse_comsub (0, '(', ')', &nestlen, (rflags|P_COMMAND) & ~P_DQUOTE);
else if (ch == '{') /* } */
nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags);
else if (ch == '[') /* ] */
nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags);
CHECK_NESTRET_ERROR ();
APPEND_NESTRET ();
FREE (nestret);
}
if MBTEST(ch == '$')
tflags |= LEX_WASDOL;
else
tflags &= ~LEX_WASDOL;
}
FREE (heredelim);
ret[retind] = '\0';
if (lenp)
*lenp = retind;
/*itrace("parse_comsub:%d: returning `%s'", line_number, ret);*/
return ret;
}
/* XXX - this needs to handle functionality like subst.c:no_longjmp_on_fatal_error;
maybe extract_command_subst should handle it. */
char *
xparse_dolparen (base, string, indp, flags)
char *base;
char *string;
int *indp;
int flags;
{
sh_parser_state_t ps;
int orig_ind, nc, sflags;
char *ret, *s, *ep, *ostring;
/*yydebug = 1;*/
orig_ind = *indp;
ostring = string;
sflags = SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOFREE;
if (flags & 0x010) /* EX_NOLONGJMP */
sflags |= SEVAL_NOLONGJMP;
save_parser_state (&ps);
/*(*/
parser_state |= PST_CMDSUBST|PST_EOFTOKEN; /* allow instant ')' */ /*(*/
shell_eof_token = ')';
parse_string (string, "command substitution", sflags, &ep);
restore_parser_state (&ps);
reset_parser ();
if (interactive)
token_to_read = 0;
/* Need to find how many characters parse_and_execute consumed, update
*indp, if flags != 0, copy the portion of the string parsed into RET
and return it. If flags & 1 (EX_NOALLOC) we can return NULL. */
/*(*/
if (ep[-1] != ')')
{
#if DEBUG
itrace("xparse_dolparen:%d: ep[-1] != RPAREN (%d), ep = `%s'", line_number, ep[-1], ep);
#endif
while (ep > ostring && ep[-1] == '\n') ep--;
}
nc = ep - ostring;
*indp = ep - base - 1;
/*(*/
#if DEBUG
if (base[*indp] != ')')
itrace("xparse_dolparen:%d: base[%d] != RPAREN (%d), base = `%s'", line_number, *indp, base[*indp], base);
#endif
if (flags & 1)
return (char *)NULL;
if (nc == 0)
{
ret = xmalloc (1);
ret[0] = '\0';
}
else
ret = substring (ostring, 0, nc - 1);
return ret;
}
#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND)
/* Parse a double-paren construct. It can be either an arithmetic
command, an arithmetic `for' command, or a nested subshell. Returns
@@ -4319,6 +4752,7 @@ decode_prompt_string (string)
no longer than PATH_MAX - 1 characters. */
strcpy (t_string, polite_directory_format (t_string));
temp = trim_pathname (t_string, PATH_MAX - 1);
/* If we're going to be expanding the prompt string later,
quote the directory name. */
if (promptvars || posixly_correct)
+5512
View File
File diff suppressed because it is too large Load Diff
+500 -67
View File
@@ -148,6 +148,7 @@ static int yy_readline_unget __P((int));
static int yy_string_get __P((void));
static int yy_string_unget __P((int));
static void rewind_input_string __P((void));
static int yy_stream_get __P((void));
static int yy_stream_unget __P((int));
@@ -170,6 +171,7 @@ static int time_command_acceptable __P((void));
static int special_case_tokens __P((char *));
static int read_token __P((int));
static char *parse_matched_pair __P((int, int, int, int *, int));
static char *parse_comsub __P((int, int, int, int *, int));
#if defined (ARRAY_VARS)
static char *parse_compound_assignment __P((int *));
#endif
@@ -1345,6 +1347,31 @@ with_input_from_string (string, name)
init_yy_io (yy_string_get, yy_string_unget, st_string, name, location);
}
/* Count the number of characters we've consumed from bash_input.location.string
and read into shell_input_line, but have not returned from shell_getc.
That is the true input location. Rewind bash_input.location.string by
that number of characters, so it points to the last character actually
consumed by the parser. */
void
rewind_input_string ()
{
int xchars;
/* number of unconsumed characters in the input -- XXX need to take newlines
into account, e.g., $(...\n) */
xchars = shell_input_line_len - shell_input_line_index;
/* XXX - how to reflect bash_input.location.string back to string passed to
parse_and_execute or xparse_dolparen? xparse_dolparen needs to know how
far into the string we parsed. parse_and_execute knows where bash_input.
location.string is, and how far from orig_string that is -- that's the
number of characters the command consumed. */
/* bash_input.location.string - xchars should be where we parsed to */
/* need to do more validation on xchars value for sanity -- test cases. */
bash_input.location.string -= xchars;
}
/* **************************************************************** */
/* */
/* Let input come from STREAM. */
@@ -2787,7 +2814,7 @@ tokword:
#define LEX_HEREDELIM 0x100 /* reading here-doc delimiter */
#define LEX_STRIPDOC 0x200 /* <<- strip tabs from here doc delim */
#define COMSUB_META(ch) ((ch) == ';' || (ch) == '&' || (ch) = '|')
#define COMSUB_META(ch) ((ch) == ';' || (ch) == '&' || (ch) == '|')
#define CHECK_NESTRET_ERROR() \
do { \
@@ -2816,15 +2843,17 @@ parse_matched_pair (qc, open, close, lenp, flags)
int open, close;
int *lenp, flags;
{
int count, ch, was_dollar, in_comment, check_comment;
int pass_next_character, backq_backslash, nestlen, ttranslen, start_lineno;
int count, ch, tflags;
int nestlen, ttranslen, start_lineno;
char *ret, *nestret, *ttrans;
int retind, retsize, rflags;
/* itrace("parse_matched_pair: open = %c close = %c", open, close); */
count = 1;
pass_next_character = backq_backslash = was_dollar = in_comment = 0;
check_comment = (flags & P_COMMAND) && qc != '`' && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0;
tflags = 0;
if ((flags & P_COMMAND) && qc != '`' && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0)
tflags |= LEX_CKCOMMENT;
/* RFLAGS is the set of flags we want to pass to recursive calls. */
rflags = (qc == '"') ? P_DQUOTE : (flags & P_DQUOTE);
@@ -2835,7 +2864,7 @@ parse_matched_pair (qc, open, close, lenp, flags)
start_lineno = line_number;
while (count)
{
ch = shell_getc (qc != '\'' && pass_next_character == 0 && backq_backslash == 0);
ch = shell_getc (qc != '\'' && (tflags & LEX_PASSNEXT) == 0);
if (ch == EOF)
{
@@ -2849,36 +2878,33 @@ parse_matched_pair (qc, open, close, lenp, flags)
if (ch == '\n' && SHOULD_PROMPT ())
prompt_again ();
if (in_comment)
/* Don't bother counting parens or doing anything else if in a comment
or part of a case statement */
if (tflags & LEX_INCOMMENT)
{
/* Add this character. */
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = ch;
if (ch == '\n')
in_comment = 0;
tflags &= ~LEX_INCOMMENT;
continue;
}
/* Not exactly right yet, should handle shell metacharacters, too. If
any changes are made to this test, make analogous changes to subst.c:
extract_delimited_string(). */
else if MBTEST(check_comment && in_comment == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind - 1])))
in_comment = 1;
else if MBTEST((tflags & LEX_CKCOMMENT) && (tflags & LEX_INCOMMENT) == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind - 1])))
tflags |= LEX_INCOMMENT;
/* last char was backslash inside backquoted command substitution */
if (backq_backslash)
if (tflags & LEX_PASSNEXT) /* last char was backslash */
{
backq_backslash = 0;
/* Placeholder for adding special characters */
}
if (pass_next_character) /* last char was backslash */
{
pass_next_character = 0;
tflags &= ~LEX_PASSNEXT;
if (qc != '\'' && ch == '\n') /* double-quoted \<newline> disappears. */
{
if (retind > 0) retind--; /* swallow previously-added backslash */
if (retind > 0)
retind--; /* swallow previously-added backslash */
continue;
}
@@ -2898,7 +2924,7 @@ parse_matched_pair (qc, open, close, lenp, flags)
else if MBTEST(ch == close) /* ending delimiter */
count--;
/* handle nested ${...} specially. */
else if MBTEST(open != close && was_dollar && open == '{' && ch == open) /* } */
else if MBTEST(open != close && (tflags & LEX_WASDOL) && open == '{' && ch == open) /* } */
count++;
else if MBTEST(((flags & P_FIRSTCLOSE) == 0) && ch == open) /* nested begin */
count++;
@@ -2907,37 +2933,36 @@ parse_matched_pair (qc, open, close, lenp, flags)
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = ch;
/* If we just read the ending character, don't bother continuing. */
if (count == 0)
break;
if (open == '\'') /* '' inside grouping construct */
{
if MBTEST((flags & P_ALLOWESC) && ch == '\\')
pass_next_character++;
#if 0
else if MBTEST((flags & P_BACKQUOTE) && ch == '\\')
backq_backslash++;
#endif
tflags |= LEX_PASSNEXT;
continue;
}
if MBTEST(ch == '\\') /* backslashes */
pass_next_character++;
tflags |= LEX_PASSNEXT;
/* Could also check open == '`' if we want to parse grouping constructs
inside old-style command substitution. */
if (open != close) /* a grouping construct */
{
if MBTEST(shellquote (ch))
{
/* '', ``, or "" inside $(...) or other grouping construct. */
push_delimiter (dstack, ch);
if MBTEST(was_dollar && ch == '\'') /* $'...' inside group */
if MBTEST((tflags & LEX_WASDOL) && ch == '\'') /* $'...' inside group */
nestret = parse_matched_pair (ch, ch, ch, &nestlen, P_ALLOWESC|rflags);
else
nestret = parse_matched_pair (ch, ch, ch, &nestlen, rflags);
pop_delimiter (dstack);
if (nestret == &matched_pair_error)
{
free (ret);
return &matched_pair_error;
}
if MBTEST(was_dollar && ch == '\'' && (extended_quote || (rflags & P_DQUOTE) == 0))
CHECK_NESTRET_ERROR ();
if MBTEST((tflags & LEX_WASDOL) && ch == '\'' && (extended_quote || (rflags & P_DQUOTE) == 0))
{
/* Translate $'...' here. */
ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen);
@@ -2956,7 +2981,7 @@ parse_matched_pair (qc, open, close, lenp, flags)
}
retind -= 2; /* back up before the $' */
}
else if MBTEST(was_dollar && ch == '"' && (extended_quote || (rflags & P_DQUOTE) == 0))
else if MBTEST((tflags & LEX_WASDOL) && ch == '"' && (extended_quote || (rflags & P_DQUOTE) == 0))
{
/* Locale expand $"..." here. */
ttrans = localeexpand (nestret, 0, nestlen - 1, start_lineno, &ttranslen);
@@ -2968,12 +2993,7 @@ parse_matched_pair (qc, open, close, lenp, flags)
retind -= 2; /* back up before the $" */
}
if (nestlen)
{
RESIZE_MALLOCED_BUFFER (ret, retind, nestlen, retsize, 64);
strcpy (ret + retind, nestret);
retind += nestlen;
}
APPEND_NESTRET ();
FREE (nestret);
}
}
@@ -2983,32 +3003,13 @@ parse_matched_pair (qc, open, close, lenp, flags)
else if MBTEST(open == '"' && ch == '`')
{
nestret = parse_matched_pair (0, '`', '`', &nestlen, rflags);
add_nestret:
if (nestret == &matched_pair_error)
{
free (ret);
return &matched_pair_error;
}
if (nestlen)
{
RESIZE_MALLOCED_BUFFER (ret, retind, nestlen, retsize, 64);
strcpy (ret + retind, nestret);
retind += nestlen;
}
CHECK_NESTRET_ERROR ();
APPEND_NESTRET ();
FREE (nestret);
}
#if 0
else if MBTEST(qc == '`' && (ch == '"' || ch == '\'') && in_comment == 0)
{
/* Add P_BACKQUOTE so backslash quotes the next character and
shell_getc does the right thing with \<newline>. We do this for
a measure of backwards compatibility -- it's not strictly the
right POSIX thing. */
nestret = parse_matched_pair (0, ch, ch, &nestlen, rflags|P_BACKQUOTE);
goto add_nestret;
}
#endif
else if MBTEST(open != '`' && was_dollar && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
else if MBTEST(open != '`' && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
/* check for $(), $[], or ${} inside quoted string. */
{
if (open == ch) /* undo previous increment */
@@ -3020,9 +3021,15 @@ add_nestret:
else if (ch == '[') /* ] */
nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags);
goto add_nestret;
CHECK_NESTRET_ERROR ();
APPEND_NESTRET ();
FREE (nestret);
}
was_dollar = MBTEST(ch == '$');
if MBTEST(ch == '$')
tflags |= LEX_WASDOL;
else
tflags &= ~LEX_WASDOL;
}
ret[retind] = '\0';
@@ -3031,6 +3038,432 @@ add_nestret:
return ret;
}
/* Parse a $(...) command substitution. This is messier than I'd like, and
reproduces a lot more of the token-reading code than I'd like. */
static char *
parse_comsub (qc, open, close, lenp, flags)
int qc; /* `"' if this construct is within double quotes */
int open, close;
int *lenp, flags;
{
int count, ch, peekc, tflags, lex_rwlen, lex_firstind;
int nestlen, ttranslen, start_lineno;
char *ret, *nestret, *ttrans, *heredelim;
int retind, retsize, rflags, hdlen;
/*itrace("parse_comsub: qc = `%c' open = %c close = %c", qc, open, close);*/
count = 1;
tflags = LEX_RESWDOK;
if ((flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0)
tflags |= LEX_CKCASE;
if ((tflags & LEX_CKCASE) && (interactive == 0 || interactive_comments))
tflags |= LEX_CKCOMMENT;
/* RFLAGS is the set of flags we want to pass to recursive calls. */
rflags = (flags & P_DQUOTE);
ret = (char *)xmalloc (retsize = 64);
retind = 0;
start_lineno = line_number;
lex_rwlen = 0;
heredelim = 0;
lex_firstind = -1;
while (count)
{
comsub_readchar:
ch = shell_getc (qc != '\'' && (tflags & LEX_PASSNEXT) == 0);
if (ch == EOF)
{
eof_error:
free (ret);
FREE (heredelim);
parser_error (start_lineno, _("unexpected EOF while looking for matching `%c'"), close);
EOF_Reached = 1; /* XXX */
return (&matched_pair_error);
}
/* If we hit the end of a line and are reading the contents of a here
document, and it's not the same line that the document starts on,
check for this line being the here doc delimiter. Otherwise, if
we're in a here document, mark the next character as the beginning
of a line. */
if (ch == '\n')
{
if ((tflags & LEX_HEREDELIM) && heredelim)
{
tflags &= ~LEX_HEREDELIM;
tflags |= LEX_INHEREDOC;
lex_firstind = retind + 1;
}
else if (tflags & LEX_INHEREDOC)
{
int tind;
tind = lex_firstind;
while ((tflags & LEX_STRIPDOC) && ret[tind] == '\t')
tind++;
if (STREQN (ret + tind, heredelim, hdlen))
{
tflags &= ~(LEX_STRIPDOC|LEX_INHEREDOC);
/*itrace("parse_comsub:%d: found here doc end `%s'", line_number, ret + tind);*/
lex_firstind = -1;
}
else
lex_firstind = retind + 1;
}
}
/* Possible reprompting. */
if (ch == '\n' && SHOULD_PROMPT ())
prompt_again ();
/* Don't bother counting parens or doing anything else if in a comment */
if (tflags & (LEX_INCOMMENT|LEX_INHEREDOC))
{
/* Add this character. */
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = ch;
if ((tflags & LEX_INCOMMENT) && ch == '\n')
tflags &= ~LEX_INCOMMENT;
continue;
}
/* Skip whitespace */
if MBTEST(shellblank (ch) && lex_rwlen == 0)
{
/* Add this character. */
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = ch;
continue;
}
/* Either we are looking for the start of the here-doc delimiter
(lex_firstind == -1) or we are reading one (lex_firstind >= 0).
If this character is a shell break character and we are reading
the delimiter, save it and note that we are now reading a here
document. If we've found the start of the delimiter, note it by
setting lex_firstind. Backslashes can quote shell metacharacters
in here-doc delimiters. */
if (tflags & LEX_HEREDELIM)
{
if (lex_firstind == -1 && shellbreak (ch) == 0)
lex_firstind = retind;
else if (lex_firstind >= 0 && (tflags & LEX_PASSNEXT) == 0 && shellbreak (ch))
{
nestret = substring (ret, lex_firstind, retind);
heredelim = string_quote_removal (nestret, 0);
free (nestret);
hdlen = STRLEN(heredelim);
/*itrace("parse_comsub:%d: found here doc delimiter `%s' (%d)", line_number, heredelim, hdlen);*/
if (ch == '\n')
{
tflags |= LEX_INHEREDOC;
tflags &= ~LEX_HEREDELIM;
lex_firstind = retind + 1;
}
else
lex_firstind = -1;
}
}
/* Meta-characters that can introduce a reserved word. Not perfect yet. */
if MBTEST((tflags & LEX_RESWDOK) == 0 && (tflags & LEX_CKCASE) && (tflags & LEX_INCOMMENT) == 0 && shellmeta(ch))
{
/* Add this character. */
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = ch;
peekc = shell_getc (1);
if (ch == peekc && (ch == '&' || ch == '|' || ch == ';')) /* two-character tokens */
{
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = peekc;
/*itrace("parse_comsub:%d: set lex_reswordok = 1, ch = `%c'", line_number, ch); */
tflags |= LEX_RESWDOK;
lex_rwlen = 0;
continue;
}
else if (ch == '\n' || COMSUB_META(ch))
{
shell_ungetc (peekc);
tflags |= LEX_RESWDOK;
/*itrace("parse_comsub:%d: set lex_reswordok = 1, ch = `%c'", line_number, ch);*/
lex_rwlen = 0;
continue;
}
else if (ch == EOF)
goto eof_error;
else
{
/* `unget' the character we just added and fall through */
retind--;
shell_ungetc (peekc);
}
}
/* If we can read a reserved word, try to read one. */
if (tflags & LEX_RESWDOK)
{
if MBTEST(islower (ch))
{
/* Add this character. */
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = ch;
lex_rwlen++;
continue;
}
else if MBTEST(lex_rwlen == 4 && shellbreak (ch))
{
if (STREQN (ret + retind - 4, "case", 4))
{
tflags |= LEX_INCASE;
/*itrace("parse_comsub:%d: found `case', lex_incase -> 1", line_number);*/
}
else if (STREQN (ret + retind - 4, "esac", 4))
{
tflags &= ~LEX_INCASE;
/*itrace("parse_comsub:%d: found `esac', lex_incase -> 0", line_number);*/
}
tflags &= ~LEX_RESWDOK;
}
else if (shellbreak (ch) == 0)
{
tflags &= ~LEX_RESWDOK;
/*itrace("parse_comsub:%d: found `%c', lex_reswordok -> 0", line_number, ch);*/
}
}
if MBTEST((tflags & LEX_INCOMMENT) == 0 && (tflags & LEX_CKCASE) && ch == '<')
{
/* Add this character. */
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = ch;
peekc = shell_getc (1);
if (peekc == EOF)
goto eof_error;
if (peekc == ch)
{
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = peekc;
peekc = shell_getc (1);
if (peekc == EOF)
goto eof_error;
if (peekc == '-')
{
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = peekc;
tflags |= LEX_STRIPDOC;
}
else
shell_ungetc (peekc);
tflags |= LEX_HEREDELIM;
lex_firstind = -1;
continue;
}
else
ch = peekc; /* fall through and continue XXX - this skips comments if peekc == '#' */
}
/* Not exactly right yet, should handle shell metacharacters, too. If
any changes are made to this test, make analogous changes to subst.c:
extract_delimited_string(). */
else if MBTEST((tflags & LEX_CKCOMMENT) && (tflags & LEX_INCOMMENT) == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || shellblank (ret[retind - 1])))
tflags |= LEX_INCOMMENT;
if (tflags & LEX_PASSNEXT) /* last char was backslash */
{
tflags &= ~LEX_PASSNEXT;
if (qc != '\'' && ch == '\n') /* double-quoted \<newline> disappears. */
{
if (retind > 0)
retind--; /* swallow previously-added backslash */
continue;
}
RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
if MBTEST(ch == CTLESC || ch == CTLNUL)
ret[retind++] = CTLESC;
ret[retind++] = ch;
continue;
}
else if MBTEST(ch == CTLESC || ch == CTLNUL) /* special shell escapes */
{
RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
ret[retind++] = CTLESC;
ret[retind++] = ch;
continue;
}
#if 0
else if MBTEST((tflags & LEX_INCASE) && ch == close && close == ')')
tflags &= ~LEX_INCASE; /* XXX */
#endif
else if MBTEST(ch == close && (tflags & LEX_INCASE) == 0) /* ending delimiter */
{
count--;
/*itrace("parse_comsub:%d: found close: count = %d", line_number, count);*/
}
else if MBTEST(((flags & P_FIRSTCLOSE) == 0) && (tflags & LEX_INCASE) == 0 && ch == open) /* nested begin */
count++;
/* Add this character. */
RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
ret[retind++] = ch;
/* If we just read the ending character, don't bother continuing. */
if (count == 0)
break;
if MBTEST(ch == '\\') /* backslashes */
tflags |= LEX_PASSNEXT;
if MBTEST(shellquote (ch))
{
/* '', ``, or "" inside $(...). */
push_delimiter (dstack, ch);
if MBTEST((tflags & LEX_WASDOL) && ch == '\'') /* $'...' inside group */
nestret = parse_matched_pair (ch, ch, ch, &nestlen, P_ALLOWESC|rflags);
else
nestret = parse_matched_pair (ch, ch, ch, &nestlen, rflags);
pop_delimiter (dstack);
CHECK_NESTRET_ERROR ();
if MBTEST((tflags & LEX_WASDOL) && ch == '\'' && (extended_quote || (rflags & P_DQUOTE) == 0))
{
/* Translate $'...' here. */
ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen);
xfree (nestret);
if ((rflags & P_DQUOTE) == 0)
{
nestret = sh_single_quote (ttrans);
free (ttrans);
nestlen = strlen (nestret);
}
else
{
nestret = ttrans;
nestlen = ttranslen;
}
retind -= 2; /* back up before the $' */
}
else if MBTEST((tflags & LEX_WASDOL) && ch == '"' && (extended_quote || (rflags & P_DQUOTE) == 0))
{
/* Locale expand $"..." here. */
ttrans = localeexpand (nestret, 0, nestlen - 1, start_lineno, &ttranslen);
xfree (nestret);
nestret = sh_mkdoublequoted (ttrans, ttranslen, 0);
free (ttrans);
nestlen = ttranslen + 2;
retind -= 2; /* back up before the $" */
}
APPEND_NESTRET ();
FREE (nestret);
}
else if MBTEST((tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
/* check for $(), $[], or ${} inside command substitution. */
{
if ((tflags & LEX_INCASE) == 0 && open == ch) /* undo previous increment */
count--;
if (ch == '(') /* ) */
nestret = parse_comsub (0, '(', ')', &nestlen, (rflags|P_COMMAND) & ~P_DQUOTE);
else if (ch == '{') /* } */
nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags);
else if (ch == '[') /* ] */
nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags);
CHECK_NESTRET_ERROR ();
APPEND_NESTRET ();
FREE (nestret);
}
if MBTEST(ch == '$')
tflags |= LEX_WASDOL;
else
tflags &= ~LEX_WASDOL;
}
FREE (heredelim);
ret[retind] = '\0';
if (lenp)
*lenp = retind;
/*itrace("parse_comsub:%d: returning `%s'", line_number, ret);*/
return ret;
}
/* XXX - this needs to handle functionality like subst.c:no_longjmp_on_fatal_error;
maybe extract_command_subst should handle it. */
char *
xparse_dolparen (base, string, indp, flags)
char *base;
char *string;
int *indp;
int flags;
{
sh_parser_state_t ps;
int orig_ind, nc, sflags;
char *ret, *s, *ep, *ostring;
/*yydebug = 1;*/
orig_ind = *indp;
ostring = string;
sflags = SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOFREE;
if (flags & 0x010) /* EX_NOLONGJMP */
sflags |= SEVAL_NOLONGJMP;
save_parser_state (&ps);
/*(*/
parser_state |= PST_CMDSUBST|PST_EOFTOKEN; /* allow instant ')' */ /*(*/
shell_eof_token = ')';
parse_string (string, "command substitution", sflags, &ep);
restore_parser_state (&ps);
reset_parser ();
if (interactive)
token_to_read = 0;
/* Need to find how many characters parse_and_execute consumed, update
*indp, if flags != 0, copy the portion of the string parsed into RET
and return it. If flags & 1 (EX_NOALLOC) we can return NULL. */
/*(*/
if (ep[-1] != ')')
{
#if DEBUG
itrace("xparse_dolparen:%d: ep[-1] != RPAREN (%d), ep = `%s'", line_number, ep[-1], ep);
#endif
while (ep > ostring && ep[-1] == '\n') ep--;
}
nc = ep - ostring;
*indp = ep - base - 1;
/*(*/
#if DEBUG
if (base[*indp] != ')')
itrace("xparse_dolparen:%d: base[%d] != RPAREN (%d), base = `%s'", line_number, *indp, base[*indp], base);
#endif
if (flags & 1)
return (char *)NULL;
if (nc == 0)
{
ret = xmalloc (1);
ret[0] = '\0';
}
else
ret = substring (ostring, 0, nc - 1);
return ret;
}
#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND)
/* Parse a double-paren construct. It can be either an arithmetic
command, an arithmetic `for' command, or a nested subshell. Returns
-2
View File
@@ -64,8 +64,6 @@ before false in trap2a.sub
after false in trap2a.sub
command substitution
caught a child death
caught a child death
caught a child death
trap -- 'echo caught a child death' SIGCHLD
trap -- 'echo exiting' EXIT
trap -- 'echo aborting' SIGABRT
+4
View File
@@ -75,6 +75,7 @@ trap 'echo caught a child death' SIGCHLD
sleep 7 & sleep 6 & sleep 5 &
# this will only catch the first, since there's a trap on SIGCHLD
wait
trap -p SIGCHLD
@@ -84,3 +85,6 @@ trap -p SIGCHLD
trap - SIGINT QUIT TERM
trap
trap - SIGCHLD
wait
+86
View File
@@ -0,0 +1,86 @@
# test the trap code
trap 'echo exiting' 0
trap 'echo aborting' 1 2 3 6 15
# make sure a user-specified subshell runs the exit trap, but does not
# inherit the exit trap from a parent shell
( trap 'echo subshell exit' 0; exit 0 )
( exit 0 )
trap
func()
{
trap 'echo ${FUNCNAME:-$0}[$LINENO] funcdebug' DEBUG
echo funcdebug line
}
trap 'echo [$LINENO] debug' DEBUG
echo debug line
trap
func
trap
trap 'echo ${FUNCNAME:-$0}[$LINENO] debug' DEBUG
func2()
{
echo func2debug line
}
declare -ft func2
func2
unset -f func2
trap '' DEBUG
trap
trap - debug
trap
trap - HUP
trap hup
trap '' INT
trap '' int
trap
# exit 0 in exit trap should set exit status
(
set -e
trap 'exit 0' EXIT
false
echo bad
)
echo $?
# hmmm...should this set the handling to SIG_IGN for children, too?
trap '' USR2
./trap1.sub
# test ERR trap
./trap2.sub
#
# show that setting a trap on SIGCHLD is not disastrous.
#
set -o monitor
trap 'echo caught a child death' SIGCHLD
sleep 7 & sleep 6 & sleep 5 &
wait
trap -p SIGCHLD
# Now reset some of the signals the shell handles specially back to
# their default values (with or without the SIG prefix)
trap - SIGINT QUIT TERM
trap
+27 -2
View File
@@ -295,6 +295,14 @@ run_pending_traps ()
run_interrupt_trap ();
CLRINTERRUPT;
}
#if defined (JOB_CONTROL) && defined (SIGCHLD)
else if (sig == SIGCHLD &&
trap_list[SIGCHLD] != (char *)IMPOSSIBLE_TRAP_HANDLER &&
(sigmodes[SIGCHLD] & SIG_INPROGRESS) == 0)
{
run_sigchld_trap (pending_traps[sig]); /* use as counter */
}
#endif
else if (trap_list[sig] == (char *)DEFAULT_SIG ||
trap_list[sig] == (char *)IGNORE_SIG ||
trap_list[sig] == (char *)IMPOSSIBLE_TRAP_HANDLER)
@@ -365,6 +373,9 @@ trap_handler (sig)
{
oerrno = errno;
#if defined (MUST_REINSTALL_SIGHANDLERS)
# if defined (JOB_CONTROL) && defined (SIGCHLD)
if (sig != SIGCHLD)
# endif /* JOB_CONTROL && SIGCHLD */
set_signal_handler (sig, trap_handler);
#endif /* MUST_REINSTALL_SIGHANDLERS */
@@ -399,14 +410,28 @@ set_sigchld_trap (command_string)
#endif
/* Make COMMAND_STRING be executed when SIGCHLD is caught iff SIGCHLD
is not already trapped. */
is not already trapped. IMPOSSIBLE_TRAP_HANDLER is used as a sentinel
to make sure that a SIGCHLD trap handler run via run_sigchld_trap can
reset the disposition to the default and not have the original signal
accidentally restored, undoing the user's command. */
void
maybe_set_sigchld_trap (command_string)
char *command_string;
{
if ((sigmodes[SIGCHLD] & SIG_TRAPPED) == 0)
if ((sigmodes[SIGCHLD] & SIG_TRAPPED) == 0 && trap_list[SIGCHLD] == (char *)IMPOSSIBLE_TRAP_HANDLER)
set_signal (SIGCHLD, command_string);
}
/* Temporarily set the SIGCHLD trap string to IMPOSSIBLE_TRAP_HANDLER. Used
as a sentinel in run_sigchld_trap and maybe_set_sigchld_trap to see whether
or not a SIGCHLD trap handler reset SIGCHLD disposition to the default. */
void
set_impossible_sigchld_trap ()
{
restore_default_signal (SIGCHLD);
change_signal (SIGCHLD, (char *)IMPOSSIBLE_TRAP_HANDLER);
sigmodes[SIGCHLD] &= ~SIG_TRAPPED; /* maybe_set_sigchld_trap checks this */
}
#endif /* JOB_CONTROL && SIGCHLD */
void
+28 -2
View File
@@ -295,6 +295,14 @@ run_pending_traps ()
run_interrupt_trap ();
CLRINTERRUPT;
}
#if defined (JOB_CONTROL) && defined (SIGCHLD)
else if (sig == SIGCHLD &&
trap_list[SIGCHLD] != (char *)IMPOSSIBLE_TRAP_HANDLER &&
(sigmodes[SIGCHLD] & SIG_INPROGRESS) == 0)
{
run_sigchld_trap (pending_traps[sig]); /* use as counter */
}
#endif
else if (trap_list[sig] == (char *)DEFAULT_SIG ||
trap_list[sig] == (char *)IGNORE_SIG ||
trap_list[sig] == (char *)IMPOSSIBLE_TRAP_HANDLER)
@@ -351,7 +359,9 @@ trap_handler (sig)
if ((sigmodes[sig] & SIG_TRAPPED) == 0)
{
#if defined (DEBUG)
internal_warning ("trap_handler: signal %d: signal not trapped", sig);
#endif
SIGRETURN (0);
}
@@ -363,6 +373,9 @@ trap_handler (sig)
{
oerrno = errno;
#if defined (MUST_REINSTALL_SIGHANDLERS)
# if defined (JOB_CONTROL) && defined (SIGCHLD)
if (sig != SIGCHLD)
# endif /* JOB_CONTROL && SIGCHLD */
set_signal_handler (sig, trap_handler);
#endif /* MUST_REINSTALL_SIGHANDLERS */
@@ -397,14 +410,27 @@ set_sigchld_trap (command_string)
#endif
/* Make COMMAND_STRING be executed when SIGCHLD is caught iff SIGCHLD
is not already trapped. */
is not already trapped. IMPOSSIBLE_TRAP_HANDLER is used as a sentinel
to make sure that a SIGCHLD trap handler run via run_sigchld_trap can
reset the disposition to the default and not have the original signal
accidentally restored, undoing the user's command. */
void
maybe_set_sigchld_trap (command_string)
char *command_string;
{
if ((sigmodes[SIGCHLD] & SIG_TRAPPED) == 0)
if ((sigmodes[SIGCHLD] & SIG_TRAPPED) == 0 && trap_list[SIGCHLD] == (char *)IMPOSSIBLE_TRAP_HANDLER)
set_signal (SIGCHLD, command_string);
}
/* Temporarily set the SIGCHLD trap string to IMPOSSIBLE_TRAP_HANDLER. Used
as a sentinel in run_sigchld_trap and maybe_set_sigchld_trap to see whether
or not a SIGCHLD trap handler reset SIGCHLD disposition to the default. */
void
set_impossible_sigchld_trap ()
{
restore_default_signal (SIGCHLD);
change_signal (SIGCHLD, (char *)IMPOSSIBLE_TRAP_HANDLER);
}
#endif /* JOB_CONTROL && SIGCHLD */
void
+1
View File
@@ -63,6 +63,7 @@ extern void initialize_traps __P((void));
extern void run_pending_traps __P((void));
extern void maybe_set_sigchld_trap __P((char *));
extern void set_impossible_sigchld_trap __P((void));
extern void set_sigchld_trap __P((char *));
extern void set_debug_trap __P((char *));