commit bash-20181123 snapshot

This commit is contained in:
Chet Ramey
2018-12-03 10:29:56 -05:00
parent d61300ec87
commit 0712a90cd8
42 changed files with 3440 additions and 4637 deletions
+41
View File
@@ -4760,3 +4760,44 @@ bashline.c
complete a partial first word (point appears in the middle of
the word) before resorting to command completion. Report and fix
from Luca Boccassi <bluca@debian.org>
[bash-5.0-beta2 frozen]
11/27
-----
bashline.c
- attempt_shell_completion: better fix for problems with fix from
11/16. Report and fix from Tom Ryder <tom@sanctum.geek.nz>
expr.c
- expr_skipsubscript: fix return type. Report and fix from
Andreas Schwab <schwab@linux-m68k.org>
11/29
-----
subst.c
- quote_escapes_internal: refactored quote_escapes into a function
that takes an additional flag saying whether or not we are going
to split the result. If we are not, and CTLESC is in IFS, we quote
the CTLESC (ditto for CTLNUL) to prevent it being removed when the
string is dequoted.
- quote_escapes: call quote_escapes_internal with FLAGS == 0
- quote_rhs: new function, calls quote_escapes with FLAGS == PF_NOSPLIT2
so that a CTLESC will be quoted if CTLESC is in $IFS
- parameter_brace_expand_word: call quote_rhs on the value of a variable
if PFLAGS includes PF_ASSIGNRHS, indicating that we will not be
splitting the word, but we will be dequoting it. Fixes bug reported
by Martijn Dekker <martijn@inlv.org>
- param_expand: same change as for parameter_brace_expand_word
execute_cmd.c
- execute_in_subshell: if we are running a trap (running_trap > 0),
turn off the SIG_INPROGRESS and SIG_CHANGED flags for that signal
by calling run_trap_cleanup and reset running_trap to 0 (watch the
second part!)
11/30
-----
lib/readline/doc/rltech.texi
- rl_set_keymap_name: correct typo in the name; some updates to the
description that clarify usage. Report from <hirooih@gmail.com>
-1
View File
@@ -941,7 +941,6 @@ tests/cond-regexp2.sub f
tests/cond-regexp3.sub f
tests/coproc.tests f
tests/coproc.right f
tests/coproc1.sub f
tests/cprint.tests f
tests/cprint.right f
tests/dbg-support.right f
+2 -1
View File
@@ -1583,7 +1583,8 @@ attempt_shell_completion (text, start, end)
/* command completion if programmable completion fails */
/* If we have a completion for the initial word, we can prefer that */
in_command_position = s == start && (iw_compspec || STREQ (n, text)); /* XXX */
foundcs = foundcs && (iw_compspec == 0);
if (iw_compspec && in_command_position)
foundcs = 0;
}
/* empty command name following command separator */
else if (s >= e && n[0] == '\0' && text[0] == '\0' && start > 0 &&
+1 -1
View File
@@ -38,7 +38,7 @@ Options:
without any specific completion defined
-E apply the completions and actions to "empty" commands --
completion attempted on a blank line
-I apply the completions and actions to the intial (usually the
-I apply the completions and actions to the initial (usually the
command) word
When completion is attempted, the actions are applied in the order the
+2 -2
View File
@@ -5211,8 +5211,8 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
displayed only if input is coming from a terminal.
--rr Backslash does not act as an escape character. The back-
slash is considered to be part of the line. In particu-
lar, a backslash-newline pair may not be used as a line
continuation.
lar, a backslash-newline pair may not then be used as a
line continuation.
--ss Silent mode. If input is coming from a terminal, charac-
ters are not echoed.
--tt _t_i_m_e_o_u_t
+3 -3
View File
@@ -8036,8 +8036,8 @@ Mark \fIname\fPs for export to subsequent commands via the environment.
.PP
Using `+' instead of `\-'
turns off the attribute instead,
with the exceptions that \fB+a\fP
may not be used to destroy an array variable and \fB+r\fP will not
with the exceptions that \fB+a\fP and \fB+A\fP
may not be used to destroy array variables and \fB+r\fP will not
remove the readonly attribute.
When used in a function,
.B declare
@@ -9195,7 +9195,7 @@ is displayed only if input is coming from a terminal.
.B \-r
Backslash does not act as an escape character.
The backslash is considered to be part of the line.
In particular, a backslash-newline pair may not be used as a line
In particular, a backslash-newline pair may not then be used as a line
continuation.
.TP
.B \-s
+2 -2
View File
@@ -11634,7 +11634,7 @@ is displayed only if input is coming from a terminal.
<DD>
Backslash does not act as an escape character.
The backslash is considered to be part of the line.
In particular, a backslash-newline pair may not be used as a line
In particular, a backslash-newline pair may not then be used as a line
continuation.
<DT><B>-s</B>
@@ -14022,6 +14022,6 @@ There may be only one active coprocess at a time.
</DL>
<HR>
This document was created by man2html from bash.1.<BR>
Time: 16 November 2018 09:02:02 EST
Time: 19 November 2018 15:21:08 EST
</BODY>
</HTML>
+79 -79
View File
@@ -3847,8 +3847,8 @@ standard.
'-r'
If this option is given, backslash does not act as an escape
character. The backslash is considered to be part of the
line. In particular, a backslash-newline pair may not be used
as a line continuation.
line. In particular, a backslash-newline pair may not then be
used as a line continuation.
'-s'
Silent mode. If input is coming from a terminal, characters
@@ -11732,82 +11732,82 @@ Node: Shell Scripts120604
Node: Shell Builtin Commands123119
Node: Bourne Shell Builtins125157
Node: Bash Builtins145907
Node: Modifying Shell Behavior174815
Node: The Set Builtin175160
Node: The Shopt Builtin185573
Node: Special Builtins203145
Node: Shell Variables204124
Node: Bourne Shell Variables204561
Node: Bash Variables206665
Node: Bash Features237125
Node: Invoking Bash238024
Node: Bash Startup Files244037
Node: Interactive Shells249140
Node: What is an Interactive Shell?249550
Node: Is this Shell Interactive?250199
Node: Interactive Shell Behavior251014
Node: Bash Conditional Expressions254501
Node: Shell Arithmetic259078
Node: Aliases261895
Node: Arrays264515
Node: The Directory Stack269881
Node: Directory Stack Builtins270665
Node: Controlling the Prompt273633
Node: The Restricted Shell276399
Node: Bash POSIX Mode278224
Node: Job Control289157
Node: Job Control Basics289617
Node: Job Control Builtins294585
Node: Job Control Variables299312
Node: Command Line Editing300468
Node: Introduction and Notation302139
Node: Readline Interaction303762
Node: Readline Bare Essentials304953
Node: Readline Movement Commands306736
Node: Readline Killing Commands307696
Node: Readline Arguments309614
Node: Searching310658
Node: Readline Init File312844
Node: Readline Init File Syntax313991
Node: Conditional Init Constructs334430
Node: Sample Init File338626
Node: Bindable Readline Commands341743
Node: Commands For Moving342947
Node: Commands For History344796
Node: Commands For Text349091
Node: Commands For Killing352479
Node: Numeric Arguments354960
Node: Commands For Completion356099
Node: Keyboard Macros360290
Node: Miscellaneous Commands360977
Node: Readline vi Mode366930
Node: Programmable Completion367837
Node: Programmable Completion Builtins375617
Node: A Programmable Completion Example386310
Node: Using History Interactively391550
Node: Bash History Facilities392234
Node: Bash History Builtins395239
Node: History Interaction399770
Node: Event Designators403390
Node: Word Designators404609
Node: Modifiers406246
Node: Installing Bash407648
Node: Basic Installation408785
Node: Compilers and Options412043
Node: Compiling For Multiple Architectures412784
Node: Installation Names414477
Node: Specifying the System Type415295
Node: Sharing Defaults416011
Node: Operation Controls416684
Node: Optional Features417642
Node: Reporting Bugs428160
Node: Major Differences From The Bourne Shell429354
Node: GNU Free Documentation License446206
Node: Indexes471383
Node: Builtin Index471837
Node: Reserved Word Index478664
Node: Variable Index481112
Node: Function Index496863
Node: Concept Index510166
Node: Modifying Shell Behavior174820
Node: The Set Builtin175165
Node: The Shopt Builtin185578
Node: Special Builtins203150
Node: Shell Variables204129
Node: Bourne Shell Variables204566
Node: Bash Variables206670
Node: Bash Features237130
Node: Invoking Bash238029
Node: Bash Startup Files244042
Node: Interactive Shells249145
Node: What is an Interactive Shell?249555
Node: Is this Shell Interactive?250204
Node: Interactive Shell Behavior251019
Node: Bash Conditional Expressions254506
Node: Shell Arithmetic259083
Node: Aliases261900
Node: Arrays264520
Node: The Directory Stack269886
Node: Directory Stack Builtins270670
Node: Controlling the Prompt273638
Node: The Restricted Shell276404
Node: Bash POSIX Mode278229
Node: Job Control289162
Node: Job Control Basics289622
Node: Job Control Builtins294590
Node: Job Control Variables299317
Node: Command Line Editing300473
Node: Introduction and Notation302144
Node: Readline Interaction303767
Node: Readline Bare Essentials304958
Node: Readline Movement Commands306741
Node: Readline Killing Commands307701
Node: Readline Arguments309619
Node: Searching310663
Node: Readline Init File312849
Node: Readline Init File Syntax313996
Node: Conditional Init Constructs334435
Node: Sample Init File338631
Node: Bindable Readline Commands341748
Node: Commands For Moving342952
Node: Commands For History344801
Node: Commands For Text349096
Node: Commands For Killing352484
Node: Numeric Arguments354965
Node: Commands For Completion356104
Node: Keyboard Macros360295
Node: Miscellaneous Commands360982
Node: Readline vi Mode366935
Node: Programmable Completion367842
Node: Programmable Completion Builtins375622
Node: A Programmable Completion Example386315
Node: Using History Interactively391555
Node: Bash History Facilities392239
Node: Bash History Builtins395244
Node: History Interaction399775
Node: Event Designators403395
Node: Word Designators404614
Node: Modifiers406251
Node: Installing Bash407653
Node: Basic Installation408790
Node: Compilers and Options412048
Node: Compiling For Multiple Architectures412789
Node: Installation Names414482
Node: Specifying the System Type415300
Node: Sharing Defaults416016
Node: Operation Controls416689
Node: Optional Features417647
Node: Reporting Bugs428165
Node: Major Differences From The Bourne Shell429359
Node: GNU Free Documentation License446211
Node: Indexes471388
Node: Builtin Index471842
Node: Reserved Word Index478669
Node: Variable Index481117
Node: Function Index496868
Node: Concept Index510171

End Tag Table
BIN
View File
Binary file not shown.
+742 -740
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -5303,7 +5303,7 @@ The prompt is displayed only if input is coming from a terminal.
<dt><code>-r</code></dt>
<dd><p>If this option is given, backslash does not act as an escape character.
The backslash is considered to be part of the line.
In particular, a backslash-newline pair may not be used as a line
In particular, a backslash-newline pair may not then be used as a line
continuation.
</p>
</dd>
+79 -79
View File
@@ -3847,8 +3847,8 @@ standard.
'-r'
If this option is given, backslash does not act as an escape
character. The backslash is considered to be part of the
line. In particular, a backslash-newline pair may not be used
as a line continuation.
line. In particular, a backslash-newline pair may not then be
used as a line continuation.
'-s'
Silent mode. If input is coming from a terminal, characters
@@ -11732,82 +11732,82 @@ Node: Shell Scripts120604
Node: Shell Builtin Commands123119
Node: Bourne Shell Builtins125157
Node: Bash Builtins145907
Node: Modifying Shell Behavior174815
Node: The Set Builtin175160
Node: The Shopt Builtin185573
Node: Special Builtins203145
Node: Shell Variables204124
Node: Bourne Shell Variables204561
Node: Bash Variables206665
Node: Bash Features237125
Node: Invoking Bash238024
Node: Bash Startup Files244037
Node: Interactive Shells249140
Node: What is an Interactive Shell?249550
Node: Is this Shell Interactive?250199
Node: Interactive Shell Behavior251014
Node: Bash Conditional Expressions254501
Node: Shell Arithmetic259078
Node: Aliases261895
Node: Arrays264515
Node: The Directory Stack269881
Node: Directory Stack Builtins270665
Node: Controlling the Prompt273633
Node: The Restricted Shell276399
Node: Bash POSIX Mode278224
Node: Job Control289157
Node: Job Control Basics289617
Node: Job Control Builtins294585
Node: Job Control Variables299312
Node: Command Line Editing300468
Node: Introduction and Notation302139
Node: Readline Interaction303762
Node: Readline Bare Essentials304953
Node: Readline Movement Commands306736
Node: Readline Killing Commands307696
Node: Readline Arguments309614
Node: Searching310658
Node: Readline Init File312844
Node: Readline Init File Syntax313991
Node: Conditional Init Constructs334430
Node: Sample Init File338626
Node: Bindable Readline Commands341743
Node: Commands For Moving342947
Node: Commands For History344796
Node: Commands For Text349091
Node: Commands For Killing352479
Node: Numeric Arguments354960
Node: Commands For Completion356099
Node: Keyboard Macros360290
Node: Miscellaneous Commands360977
Node: Readline vi Mode366930
Node: Programmable Completion367837
Node: Programmable Completion Builtins375617
Node: A Programmable Completion Example386310
Node: Using History Interactively391550
Node: Bash History Facilities392234
Node: Bash History Builtins395239
Node: History Interaction399770
Node: Event Designators403390
Node: Word Designators404609
Node: Modifiers406246
Node: Installing Bash407648
Node: Basic Installation408785
Node: Compilers and Options412043
Node: Compiling For Multiple Architectures412784
Node: Installation Names414477
Node: Specifying the System Type415295
Node: Sharing Defaults416011
Node: Operation Controls416684
Node: Optional Features417642
Node: Reporting Bugs428160
Node: Major Differences From The Bourne Shell429354
Node: GNU Free Documentation License446206
Node: Indexes471383
Node: Builtin Index471837
Node: Reserved Word Index478664
Node: Variable Index481112
Node: Function Index496863
Node: Concept Index510166
Node: Modifying Shell Behavior174820
Node: The Set Builtin175165
Node: The Shopt Builtin185578
Node: Special Builtins203150
Node: Shell Variables204129
Node: Bourne Shell Variables204566
Node: Bash Variables206670
Node: Bash Features237130
Node: Invoking Bash238029
Node: Bash Startup Files244042
Node: Interactive Shells249145
Node: What is an Interactive Shell?249555
Node: Is this Shell Interactive?250204
Node: Interactive Shell Behavior251019
Node: Bash Conditional Expressions254506
Node: Shell Arithmetic259083
Node: Aliases261900
Node: Arrays264520
Node: The Directory Stack269886
Node: Directory Stack Builtins270670
Node: Controlling the Prompt273638
Node: The Restricted Shell276404
Node: Bash POSIX Mode278229
Node: Job Control289162
Node: Job Control Basics289622
Node: Job Control Builtins294590
Node: Job Control Variables299317
Node: Command Line Editing300473
Node: Introduction and Notation302144
Node: Readline Interaction303767
Node: Readline Bare Essentials304958
Node: Readline Movement Commands306741
Node: Readline Killing Commands307701
Node: Readline Arguments309619
Node: Searching310663
Node: Readline Init File312849
Node: Readline Init File Syntax313996
Node: Conditional Init Constructs334435
Node: Sample Init File338631
Node: Bindable Readline Commands341748
Node: Commands For Moving342952
Node: Commands For History344801
Node: Commands For Text349096
Node: Commands For Killing352484
Node: Numeric Arguments354965
Node: Commands For Completion356104
Node: Keyboard Macros360295
Node: Miscellaneous Commands360982
Node: Readline vi Mode366935
Node: Programmable Completion367842
Node: Programmable Completion Builtins375622
Node: A Programmable Completion Example386315
Node: Using History Interactively391555
Node: Bash History Facilities392239
Node: Bash History Builtins395244
Node: History Interaction399775
Node: Event Designators403395
Node: Word Designators404614
Node: Modifiers406251
Node: Installing Bash407653
Node: Basic Installation408790
Node: Compilers and Options412048
Node: Compiling For Multiple Architectures412789
Node: Installation Names414482
Node: Specifying the System Type415300
Node: Sharing Defaults416016
Node: Operation Controls416689
Node: Optional Features417647
Node: Reporting Bugs428165
Node: Major Differences From The Bourne Shell429359
Node: GNU Free Documentation License446211
Node: Indexes471388
Node: Builtin Index471842
Node: Reserved Word Index478669
Node: Variable Index481117
Node: Function Index496868
Node: Concept Index510171

End Tag Table
+2 -2
View File
@@ -1,4 +1,4 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/MacPorts 2018.47642_1) (preloaded format=pdfetex 2018.9.7) 16 NOV 2018 09:02
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/MacPorts 2018.47642_1) (preloaded format=pdfetex 2018.9.7) 19 NOV 2018 15:21
entering extended mode
restricted \write18 enabled.
file:line:error style messages enabled.
@@ -295,7 +295,7 @@ s/type1/public/amsfonts/cm/cmtt12.pfb></opt/local/share/texmf-texlive/fonts/typ
e1/public/amsfonts/cm/cmtt9.pfb></opt/local/share/texmf-texlive/fonts/type1/pub
lic/cm-super/sfrm1095.pfb></opt/local/share/texmf-texlive/fonts/type1/public/cm
-super/sfrm1440.pfb>
Output written on bashref.pdf (184 pages, 753023 bytes).
Output written on bashref.pdf (184 pages, 753033 bytes).
PDF statistics:
2624 PDF objects out of 2984 (max. 8388607)
2395 compressed objects within 24 object streams
BIN
View File
Binary file not shown.
+23 -22
View File
@@ -1,7 +1,7 @@
%!PS-Adobe-2.0
%%Creator: dvips(k) 5.998 Copyright 2018 Radical Eye Software
%%Title: bashref.dvi
%%CreationDate: Fri Nov 16 14:01:57 2018
%%CreationDate: Mon Nov 19 20:21:05 2018
%%Pages: 184
%%PageOrder: Ascend
%%BoundingBox: 0 0 612 792
@@ -12,7 +12,7 @@
%DVIPSWebPage: (www.radicaleye.com)
%DVIPSCommandLine: dvips -D 600 -t letter -o bashref.ps bashref.dvi
%DVIPSParameters: dpi=600
%DVIPSSource: TeX output 2018.11.16:0901
%DVIPSSource: TeX output 2018.11.19:1521
%%BeginProcSet: tex.pro 0 0
%!
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
@@ -12461,26 +12461,27 @@ b(a)h(terminal.)630 3345 y Ft(-r)384 b Fu(If)21 b(this)h(option)g(is)f
(giv)m(en,)k(bac)m(kslash)d(do)s(es)f(not)h(act)h(as)f(an)f(escap)s(e)h
(c)m(haracter.)1110 3455 y(The)30 b(bac)m(kslash)i(is)f(considered)g
(to)h(b)s(e)e(part)h(of)g(the)g(line.)43 b(In)30 b(particular,)i(a)1110
3565 y(bac)m(kslash-newline)f(pair)f(ma)m(y)h(not)g(b)s(e)f(used)f(as)i
(a)g(line)f(con)m(tin)m(uation.)630 3718 y Ft(-s)384
b Fu(Silen)m(t)28 b(mo)s(de.)40 b(If)27 b(input)f(is)i(coming)g(from)f
(a)h(terminal,)h(c)m(haracters)g(are)f(not)1110 3828
y(ec)m(ho)s(ed.)630 3981 y Ft(-t)i Fj(timeout)1110 4091
y Fu(Cause)42 b Ft(read)g Fu(to)h(time)h(out)f(and)f(return)f(failure)i
(if)g(a)g(complete)h(line)f(of)1110 4200 y(input)26 b(\(or)h(a)g(sp)s
(eci\014ed)f(n)m(um)m(b)s(er)g(of)h(c)m(haracters\))h(is)f(not)g(read)g
(within)f Fr(time-)1110 4310 y(out)37 b Fu(seconds.)53
b Fr(timeout)38 b Fu(ma)m(y)d(b)s(e)f(a)h(decimal)h(n)m(um)m(b)s(er)d
(with)h(a)h(fractional)1110 4419 y(p)s(ortion)29 b(follo)m(wing)h(the)f
(decimal)h(p)s(oin)m(t.)40 b(This)29 b(option)g(is)g(only)g(e\013ectiv)
m(e)j(if)1110 4529 y Ft(read)j Fu(is)i(reading)g(input)e(from)h(a)h
(terminal,)i(pip)s(e,)e(or)g(other)f(sp)s(ecial)i(\014le;)1110
4639 y(it)31 b(has)g(no)g(e\013ect)h(when)e(reading)h(from)g(regular)g
(\014les.)42 b(If)30 b Ft(read)g Fu(times)h(out,)1110
4748 y Ft(read)d Fu(sa)m(v)m(es)j(an)m(y)f(partial)h(input)d(read)i(in)
m(to)h(the)e(sp)s(eci\014ed)g(v)-5 b(ariable)31 b Fr(name)p
Fu(.)1110 4858 y(If)k Fr(timeout)j Fu(is)e(0,)h Ft(read)e
Fu(returns)f(immediately)-8 b(,)39 b(without)c(trying)h(to)g(read)1110
3565 y(bac)m(kslash-newline)26 b(pair)e(ma)m(y)h(not)g(then)g(b)s(e)f
(used)g(as)h(a)g(line)g(con)m(tin)m(uation.)630 3718
y Ft(-s)384 b Fu(Silen)m(t)28 b(mo)s(de.)40 b(If)27 b(input)f(is)i
(coming)g(from)f(a)h(terminal,)h(c)m(haracters)g(are)f(not)1110
3828 y(ec)m(ho)s(ed.)630 3981 y Ft(-t)i Fj(timeout)1110
4091 y Fu(Cause)42 b Ft(read)g Fu(to)h(time)h(out)f(and)f(return)f
(failure)i(if)g(a)g(complete)h(line)f(of)1110 4200 y(input)26
b(\(or)h(a)g(sp)s(eci\014ed)f(n)m(um)m(b)s(er)g(of)h(c)m(haracters\))h
(is)f(not)g(read)g(within)f Fr(time-)1110 4310 y(out)37
b Fu(seconds.)53 b Fr(timeout)38 b Fu(ma)m(y)d(b)s(e)f(a)h(decimal)h(n)
m(um)m(b)s(er)d(with)h(a)h(fractional)1110 4419 y(p)s(ortion)29
b(follo)m(wing)h(the)f(decimal)h(p)s(oin)m(t.)40 b(This)29
b(option)g(is)g(only)g(e\013ectiv)m(e)j(if)1110 4529
y Ft(read)j Fu(is)i(reading)g(input)e(from)h(a)h(terminal,)i(pip)s(e,)e
(or)g(other)f(sp)s(ecial)i(\014le;)1110 4639 y(it)31
b(has)g(no)g(e\013ect)h(when)e(reading)h(from)g(regular)g(\014les.)42
b(If)30 b Ft(read)g Fu(times)h(out,)1110 4748 y Ft(read)d
Fu(sa)m(v)m(es)j(an)m(y)f(partial)h(input)d(read)i(in)m(to)h(the)e(sp)s
(eci\014ed)g(v)-5 b(ariable)31 b Fr(name)p Fu(.)1110
4858 y(If)k Fr(timeout)j Fu(is)e(0,)h Ft(read)e Fu(returns)f
(immediately)-8 b(,)39 b(without)c(trying)h(to)g(read)1110
4967 y(and)30 b(data.)44 b(The)30 b(exit)i(status)f(is)g(0)g(if)g
(input)f(is)h(a)m(v)-5 b(ailable)34 b(on)c(the)i(sp)s(eci\014ed)1110
5077 y(\014le)g(descriptor,)g(non-zero)h(otherwise.)46
+3 -3
View File
@@ -4207,8 +4207,8 @@ the environment.
@end table
Using @samp{+} instead of @samp{-} turns off the attribute instead,
with the exceptions that @samp{+a}
may not be used to destroy an array variable and @samp{+r} will not
with the exceptions that @samp{+a} and @samp{+A}
may not be used to destroy array variables and @samp{+r} will not
remove the readonly attribute.
When used in a function, @code{declare} makes each @var{name} local,
as with the @code{local} command, unless the @option{-g} option is used.
@@ -4564,7 +4564,7 @@ The prompt is displayed only if input is coming from a terminal.
@item -r
If this option is given, backslash does not act as an escape character.
The backslash is considered to be part of the line.
In particular, a backslash-newline pair may not be used as a line
In particular, a backslash-newline pair may not then be used as a line
continuation.
@item -s
+2 -2
View File
@@ -1017,8 +1017,8 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
displayed only if input is coming from a terminal.
--rr Backslash does not act as an escape character. The back-
slash is considered to be part of the line. In particu-
lar, a backslash-newline pair may not be used as a line
continuation.
lar, a backslash-newline pair may not then be used as a
line continuation.
--ss Silent mode. If input is coming from a terminal, charac-
ters are not echoed.
--tt _t_i_m_e_o_u_t
+642 -642
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.22.3
%%CreationDate: Fri Nov 16 09:01:51 2018
%%CreationDate: Mon Nov 19 15:20:58 2018
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%DocumentSuppliedResources: procset grops 1.22 3
+1 -1
View File
@@ -161,7 +161,7 @@ long_double_format (char const *fmt)
strcpy (ldfmt + length_modifier_offset + 1,
fmt + length_modifier_offset + has_L);
#else
strcpy (ldfmt + length_modifier_offset, fmt + length_modifier_offset)
strcpy (ldfmt + length_modifier_offset, fmt + length_modifier_offset);
#endif
return ldfmt;
}
+9
View File
@@ -1553,6 +1553,15 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close)
trap strings if we run trap to change a signal disposition. */
reset_signal_handlers ();
subshell_environment |= SUBSHELL_RESETTRAP;
#if 0 /* TAG:bash-5.1 */
/* We are in a subshell, so forget that we are running a trap handler or
that the signal handler has changed (we haven't changed it!) */
if (running_trap > 0)
{
run_trap_cleanup (running_trap - 1);
running_trap = 0;
}
#endif
/* Make sure restore_original_signals doesn't undo the work done by
make_child to ensure that asynchronous children are immune to SIGINT
+1 -1
View File
@@ -342,7 +342,7 @@ expr_bind_variable (lhs, rhs)
#if defined (ARRAY_VARS)
/* This is similar to the logic in arrayfunc.c:valid_array_subscript when
you pass VA_NOEXPAND. */
static char *
static int
expr_skipsubscript (vp, cp)
char *vp, *cp;
{
+1 -1
View File
@@ -260,7 +260,7 @@ extern int give_terminal_to __P((pid_t, int));
extern void run_sigchld_trap __P((int));
extern int freeze_jobs_list __P((void));
extern void unfreeeze_jobs_list __P((void));
extern void unfreeze_jobs_list __P((void));
extern void set_jobs_list_frozen __P((int));
extern int set_job_control __P((int));
extern void without_job_control __P((void));
+10 -1
View File
@@ -384,7 +384,7 @@ BRACKMATCH (p, test, flags)
{
register CHAR cstart, cend, c;
register int not; /* Nonzero if the sense of the character class is inverted. */
int brcnt, brchr, forcecoll;
int brcnt, brchr, forcecoll, isrange;
INT pc;
CHAR *savep;
U_CHAR orig_test;
@@ -519,6 +519,7 @@ BRACKMATCH (p, test, flags)
}
cstart = cend = FOLD (cstart);
isrange = 0;
/* POSIX.2 2.8.3.1.2 says: `An expression containing a `[' that
is not preceded by a backslash and is not part of a bracket
@@ -573,10 +574,18 @@ BRACKMATCH (p, test, flags)
c = FOLD (c);
continue;
}
isrange = 1;
}
#if 0 /* TAG: bash-5.1 */
if (isrange == 0 && test == cstart)
goto matched;
if (isrange && RANGECMP (test, cstart, forcecoll) >= 0 && RANGECMP (test, cend, forcecoll) <= 0)
goto matched;
#else
if (RANGECMP (test, cstart, forcecoll) >= 0 && RANGECMP (test, cend, forcecoll) <= 0)
goto matched;
#endif
if (c == L(']'))
break;
+17 -2
View File
@@ -30,6 +30,12 @@
#include "shmbutil.h"
#include "xmalloc.h"
#include <errno.h>
#if !defined (errno)
extern int errno;
#endif
/* First, compile `sm_loop.c' for single-byte characters. */
#define CHAR unsigned char
#define U_CHAR unsigned char
@@ -82,7 +88,7 @@ rangecmp (c1, c2, forcecoll)
if ((ret = strcoll (s1, s2)) != 0)
return ret;
return (c1 - c2);
return (c1 - c2); /* impose total ordering */
}
#else /* !HAVE_STRCOLL */
# define rangecmp(c1, c2, f) ((int)(c1) - (int)(c2))
@@ -289,6 +295,7 @@ rangecmp_wc (c1, c2, forcecoll)
{
static wchar_t s1[2] = { L' ', L'\0' };
static wchar_t s2[2] = { L' ', L'\0' };
int r, oerrno;
if (c1 == c2)
return 0;
@@ -299,14 +306,22 @@ rangecmp_wc (c1, c2, forcecoll)
s1[0] = c1;
s2[0] = c2;
#if 0 /* TAG: bash-5.1 */
/* We impose a total ordering here by returning c1-c2 if wcscoll returns 0,
as we do above in the single-byte case. */
if ((r = wcscoll (s1, s2)) != 0)
return r;
return ((int)(c1 - c2)); /* impose total ordering */
#else
return (wcscoll (s1, s2));
#endif
}
static int
collequiv_wc (c, equiv)
wint_t c, equiv;
{
return (c == equiv);
return (rangecmp_wc (c, equiv, 1) == 0);
}
/* Helper function for collating symbol. */
+11 -6
View File
@@ -720,19 +720,22 @@ Return the name matching @var{keymap}. @var{name} is one which would
be supplied in a @code{set keymap} inputrc line (@pxref{Readline Init File}).
@end deftypefun
@deftypefun void rl_set_keymap (const char *name, Keymap keymap)
@deftypefun int rl_set_keymap_name (const char *name, Keymap keymap)
Set the name of @var{keymap}. This name will then be "registered" and
available for use in a @code{set keymap} inputrc directive
@pxref{Readline Init File}).
The @var{name} may not be one of Readline's builtin names;
The @var{name} may not be one of Readline's builtin keymap names;
you may not add a different name for one of Readline's builtin keymaps.
Readline will make a copy of @var{name}.
You may replace the name associated with a given keymap by calling this
function two or more times with the same @var{keymap} argument.
You can associate a registered name with a new keymap by calling this
function two or more times with the same @var{name} argument.
function more than once with the same @var{keymap} argument.
You may associate a registered @var{name} with a new keymap by calling this
function more than once with the same @var{name} argument.
There is no way to remove a named keymap once the name has been
registered.
Readline will make a copy of @var{name}.
The return value is greater than zero unless @var{name} is one of
Readline's builtin keymap names or @var{keymap} is one of Readline's
builtin keymaps.
@end deftypefun
@node Binding Keys
@@ -2143,6 +2146,8 @@ character (@samp{\0}) prevents anything being appended automatically.
This can be changed in application-specific completion functions to
provide the ``most sensible word separator character'' according to
an application-specific command line syntax specification.
It is set to the default before any application-specific completion function
is called, and may only be changed within such a function.
@end deftypevar
@deftypevar int rl_completion_suppress_append
+3 -3
View File
@@ -4,7 +4,7 @@ Copyright (C) 1988-2018 Free Software Foundation, Inc.
@set EDITION 8.0
@set VERSION 8.0
@set UPDATED 18 September 2018
@set UPDATED-MONTH September 2018
@set UPDATED 30 November 2018
@set UPDATED-MONTH November 2018
@set LASTCHANGE Tue Sep 18 13:08:12 EDT 2018
@set LASTCHANGE Fri Nov 30 22:50:53 EST 2018
+375 -758
View File
File diff suppressed because it is too large Load Diff
+418 -507
View File
File diff suppressed because it is too large Load Diff
+298 -603
View File
File diff suppressed because it is too large Load Diff
+398 -780
View File
File diff suppressed because it is too large Load Diff
+191 -367
View File
File diff suppressed because it is too large Load Diff
+33 -7
View File
@@ -238,6 +238,8 @@ static WORD_LIST *expand_string_leave_quoted __P((char *, int));
static WORD_LIST *expand_string_for_rhs __P((char *, int, int, int, int *, int *));
static WORD_LIST *expand_string_for_pat __P((char *, int, int *, int *));
static char *quote_escapes_internal __P((const char *, int));
static WORD_LIST *list_quote_escapes __P((WORD_LIST *));
static WORD_LIST *list_dequote_escapes __P((WORD_LIST *));
@@ -4027,24 +4029,32 @@ expand_word_leave_quoted (word, quoted)
code exists in dequote_escapes. Even if we don't end up splitting on
spaces, quoting spaces is not a problem. This should never be called on
a string that is quoted with single or double quotes or part of a here
document (effectively double-quoted). */
char *
quote_escapes (string)
document (effectively double-quoted).
FLAGS says whether or not we are going to split the result. If we are not,
and there is a CTLESC or CTLNUL in IFS, we need to quote CTLESC and CTLNUL,
respectively, to prevent them from being removed as part of dequoting. */
static char *
quote_escapes_internal (string, flags)
const char *string;
int flags;
{
const char *s, *send;
char *t, *result;
size_t slen;
int quote_spaces, skip_ctlesc, skip_ctlnul;
int quote_spaces, skip_ctlesc, skip_ctlnul, nosplit;
DECLARE_MBSTATE;
slen = strlen (string);
send = string + slen;
quote_spaces = (ifs_value && *ifs_value == 0);
nosplit = (flags & PF_NOSPLIT2);
for (skip_ctlesc = skip_ctlnul = 0, s = ifs_value; s && *s; s++)
skip_ctlesc |= *s == CTLESC, skip_ctlnul |= *s == CTLNUL;
{
skip_ctlesc |= (nosplit == 0 && *s == CTLESC);
skip_ctlnul |= (nosplit == 0 && *s == CTLNUL);
}
t = result = (char *)xmalloc ((slen * 2) + 1);
s = string;
@@ -4060,6 +4070,20 @@ quote_escapes (string)
return (result);
}
char *
quote_escapes (string)
const char *string;
{
return (quote_escapes_internal (string, 0));
}
char *
quote_rhs (string)
const char *string;
{
return (quote_escapes_internal (string, PF_NOSPLIT2));
}
static WORD_LIST *
list_quote_escapes (list)
WORD_LIST *list;
@@ -6661,7 +6685,8 @@ expand_arrayref:
if (temp)
temp = (*temp && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
? quote_string (temp)
: quote_escapes (temp);
: ((pflags & PF_ASSIGNRHS) ? quote_rhs (temp)
: quote_escapes (temp));
}
else
temp = (char *)NULL;
@@ -9567,7 +9592,8 @@ comsub:
temp = (*temp && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
? quote_string (temp)
: quote_escapes (temp);
: ((pflags & PF_ASSIGNRHS) ? quote_rhs (temp)
: quote_escapes (temp));
}
free (temp1);
+1 -1
View File
@@ -1,4 +1,4 @@
BUILD_DIR=/usr/local/build/chet/bash/bash-current
BUILD_DIR=/usr/local/build/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR
+6 -2
View File
@@ -210,14 +210,18 @@ argv[1] = <correct>
argv[2] = <a>
argv[1] = <correct>
argv[2] = <a>
./exp7.sub: line 5: INFORM: dequote_string: string with bare CTLESC
argv[1] = <^A>
argv[1] = <3>
argv[2] = <^C>
argv[3] = <^C>
argv[4] = <^C>
./exp7.sub: line 10: INFORM: dequote_string: string with bare CTLESC
argv[1] = <^A>
argv[1] = <XY>
argv[2] = <YX>
argv[1] = <XY^AYX>
argv[1] = <XY>
argv[2] = <Y>
argv[1] = <XY^AY>
argv[1] = <x^Ay^?z>
argv[1] = <x^Ay^?z>
declare -- var="xyz"
+12
View File
@@ -9,3 +9,15 @@ recho $# "$1" "$2" "$3"
x=$c
recho "$x"
unset c c2 x
c=$'Y\1Y';
v=X${c}X;
recho X${c}X
recho "$v"
v=X$c
recho X$c
recho "$v"
+13 -13
View File
@@ -3,7 +3,7 @@ argv[1] = <foo>
argv[1] = </usr/homes/chet>
argv[1] = </usr/homes/chet>
argv[1] = </usr/homes/chet>
./new-exp.tests: line 24: HOME: }: syntax error: operand expected (error token is "}")
./new-exp.tests: line 28: HOME: }: syntax error: operand expected (error token is "}")
unset
argv[1] = </usr/homes/chet>
argv[1] = </usr/homes/chet>
@@ -66,8 +66,8 @@ argv[4] = <d>
argv[1] = <a>
argv[2] = <b c>
argv[3] = <d>
./new-exp.tests: line 180: ABX: unbound variable
./new-exp.tests: line 184: $6: cannot assign in this way
./new-exp.tests: line 184: ABX: unbound variable
./new-exp.tests: line 188: $6: cannot assign in this way
argv[1] = <xxcde>
argv[1] = <axxde>
argv[1] = <abxyz>
@@ -176,7 +176,7 @@ a
./new-exp2.sub: line 49: 1111111111111111111111: command not found
argv[1] = <6>
./new-exp.tests: line 285: ${#:}: bad substitution
./new-exp.tests: line 289: ${#:}: bad substitution
argv[1] = <'>
argv[1] = <">
argv[1] = <"hello">
@@ -411,13 +411,13 @@ argv[6] = <w>
argv[7] = <x>
argv[8] = <y>
argv[9] = <z>
./new-exp.tests: line 503: $9: unbound variable
./new-exp.tests: line 504: 9: unbound variable
./new-exp.tests: line 505: UNSET: unbound variable
./new-exp.tests: line 506: UNSET: unbound variable
./new-exp.tests: line 507: UNSET: unbound variable
./new-exp.tests: line 508: UNSET: unbound variable
./new-exp.tests: line 507: $9: unbound variable
./new-exp.tests: line 508: 9: unbound variable
./new-exp.tests: line 509: UNSET: unbound variable
./new-exp.tests: line 510: UNSET: unbound variable
./new-exp.tests: line 511: UNSET: unbound variable
./new-exp.tests: line 512: UNSET: unbound variable
./new-exp.tests: line 513: UNSET: unbound variable
argv[1] = <5>
argv[1] = <#>
argv[1] = <#>
@@ -464,7 +464,7 @@ Case05---3---A:B:C---
Case06---1---A B C::---
Case07---3---A:B:C---
Case08---3---A:B:C---
./new-exp.tests: line 529: ${$(($#-1))}: bad substitution
./new-exp.tests: line 533: ${$(($#-1))}: bad substitution
argv[1] = <a>
argv[2] = <b>
argv[3] = <c>
@@ -481,7 +481,7 @@ argv[1] = <a>
argv[1] = <a>
argv[2] = <b>
argv[1] = <>
./new-exp.tests: line 548: $(($# - 2)): substring expression < 0
./new-exp.tests: line 552: $(($# - 2)): substring expression < 0
argv[1] = <bin>
argv[2] = <bin>
argv[3] = <ucb>
@@ -669,4 +669,4 @@ prependå
ḅć
argv[1] = </>
argv[1] = </>
./new-exp.tests: line 611: ABXD: parameter unset
./new-exp.tests: line 615: ABXD: parameter unset
+4
View File
@@ -1,3 +1,7 @@
if (( $UID == 0 )); then
echo "new-exp.tests: the test suite should not be run as root" >&2
fi
# must do this because posix mode causes process substitution to be disabled
# and flagged as a syntax error, which causes the shell to exit
set +o posix
+5
View File
@@ -1,3 +1,8 @@
if (( $UID == 0 )); then
echo "${THIS_SH}: the test suite should not be run as root" >&2
echo
fi
echo Testing ${THIS_SH}
echo version: $BASH_VERSION
+5
View File
@@ -1,3 +1,8 @@
if (( $UID == 0 )); then
echo "${THIS_SH}: the test suite should not be run as root" >&2
echo
fi
echo Testing ${THIS_SH}
echo version: $BASH_VERSION
+3 -3
View File
@@ -1213,7 +1213,7 @@ free_trap_string (sig)
int sig;
{
change_signal (sig, (char *)DEFAULT_SIG);
sigmodes[sig] &= ~SIG_TRAPPED;
sigmodes[sig] &= ~SIG_TRAPPED; /* XXX - SIG_INPROGRESS? */
}
/* Reset the handler for SIG to the original value but leave the trap string
@@ -1223,7 +1223,7 @@ reset_signal (sig)
int sig;
{
set_signal_handler (sig, original_signals[sig]);
sigmodes[sig] &= ~SIG_TRAPPED;
sigmodes[sig] &= ~SIG_TRAPPED; /* XXX - SIG_INPROGRESS? */
}
/* Set the handler signal SIG to the original and free any trap
@@ -1246,7 +1246,7 @@ reset_or_restore_signal_handlers (reset)
/* Take care of the exit trap first */
if (sigmodes[EXIT_TRAP] & SIG_TRAPPED)
{
sigmodes[EXIT_TRAP] &= ~SIG_TRAPPED;
sigmodes[EXIT_TRAP] &= ~SIG_TRAPPED; /* XXX - SIG_INPROGRESS? */
if (reset != reset_signal)
{
free_trap_command (EXIT_TRAP);