commit bash-20200117 snapshot

This commit is contained in:
Chet Ramey
2020-01-21 09:46:21 -05:00
parent abfcfa4e6f
commit 9831556ed0
26 changed files with 503 additions and 430 deletions
+55 -56
View File
@@ -1,7 +1,7 @@
%!PS-Adobe-2.0
%%Creator: dvips(k) 5.999 Copyright 2019 Radical Eye Software
%%Title: bashref.dvi
%%CreationDate: Mon Jan 6 13:53:44 2020
%%CreationDate: Fri Jan 17 16:15:33 2020
%%Pages: 187
%%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 2020.01.06:0853
%DVIPSSource: TeX output 2020.01.17:1115
%%BeginProcSet: tex.pro 0 0
%!
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
@@ -15507,80 +15507,79 @@ b(A)31 b(non-in)m(teractiv)m(e)j(shell)d(exits)h(with)e(an)h(error)g
(assignmen)m(t)h(statemen)m(ts.)69 b(A)39 b(v)-5 b(ariable)40
b(assignmen)m(t)330 518 y(error)30 b(o)s(ccurs,)g(for)g(example,)i
(when)d(trying)i(to)g(assign)f(a)h(v)-5 b(alue)31 b(to)g(a)g(readonly)f
(v)-5 b(ariable.)154 650 y(24.)61 b(A)31 b(non-in)m(teractiv)m(e)j
(v)-5 b(ariable.)154 656 y(24.)61 b(A)31 b(non-in)m(teractiv)m(e)j
(shell)d(exits)h(with)e(an)h(error)g(status)g(if)g(a)g(v)-5
b(ariable)32 b(assignmen)m(t)g(error)e(o)s(ccurs)330
759 y(in)g(an)g(assignmen)m(t)i(statemen)m(t)g(preceding)e(a)h(sp)s
766 y(in)g(an)g(assignmen)m(t)i(statemen)m(t)g(preceding)e(a)h(sp)s
(ecial)g(builtin,)f(but)g(not)g(with)h(an)m(y)f(other)h(simple)330
869 y(command.)154 1000 y(25.)61 b(A)43 b(non-in)m(teractiv)m(e)i
876 y(command.)154 1014 y(25.)61 b(A)43 b(non-in)m(teractiv)m(e)i
(shell)e(exits)h(with)f(an)f(error)h(status)g(if)g(the)g(iteration)h(v)
-5 b(ariable)44 b(in)f(a)g Ft(for)330 1110 y Fu(statemen)m(t)32
-5 b(ariable)44 b(in)f(a)g Ft(for)330 1124 y Fu(statemen)m(t)32
b(or)f(the)f(selection)i(v)-5 b(ariable)32 b(in)e(a)g
Ft(select)f Fu(statemen)m(t)j(is)f(a)f(readonly)h(v)-5
b(ariable.)154 1241 y(26.)61 b(Non-in)m(teractiv)m(e)34
b(ariable.)154 1262 y(26.)61 b(Non-in)m(teractiv)m(e)34
b(shells)c(exit)h(if)g Fr(\014lename)k Fu(in)30 b Ft(.)g
Fr(\014lename)36 b Fu(is)31 b(not)f(found.)154 1373 y(27.)61
Fr(\014lename)36 b Fu(is)31 b(not)f(found.)154 1401 y(27.)61
b(Non-in)m(teractiv)m(e)41 b(shells)d(exit)h(if)f(a)g(syn)m(tax)g
(error)g(in)f(an)h(arithmetic)h(expansion)f(results)f(in)h(an)330
1482 y(in)m(v)-5 b(alid)31 b(expression.)154 1614 y(28.)61
1510 y(in)m(v)-5 b(alid)31 b(expression.)154 1649 y(28.)61
b(Non-in)m(teractiv)m(e)34 b(shells)c(exit)h(if)g(a)f(parameter)h
(expansion)g(error)f(o)s(ccurs.)154 1745 y(29.)61 b(Non-in)m(teractiv)m
(expansion)g(error)f(o)s(ccurs.)154 1787 y(29.)61 b(Non-in)m(teractiv)m
(e)27 b(shells)c(exit)i(if)e(there)h(is)f(a)h(syn)m(tax)g(error)f(in)g
(a)h(script)f(read)g(with)h(the)f Ft(.)g Fu(or)h Ft(source)330
1855 y Fu(builtins,)30 b(or)g(in)g(a)h(string)g(pro)s(cessed)e(b)m(y)i
(the)f Ft(eval)f Fu(builtin.)154 1987 y(30.)61 b(Pro)s(cess)30
b(substitution)g(is)h(not)f(a)m(v)-5 b(ailable.)154 2118
y(31.)61 b(While)32 b(v)-5 b(ariable)32 b(indirection)f(is)g(a)m(v)-5
b(ailable,)34 b(it)d(ma)m(y)h(not)f(b)s(e)g(applied)g(to)g(the)h(`)p
1897 y Fu(builtins,)30 b(or)g(in)g(a)h(string)g(pro)s(cessed)e(b)m(y)i
(the)f Ft(eval)f Fu(builtin.)154 2035 y(30.)61 b(While)32
b(v)-5 b(ariable)32 b(indirection)f(is)g(a)m(v)-5 b(ailable,)34
b(it)d(ma)m(y)h(not)f(b)s(e)g(applied)g(to)g(the)h(`)p
Ft(#)p Fu(')f(and)f(`)p Ft(?)p Fu(')h(sp)s(ecial)330
2228 y(parameters.)154 2359 y(32.)61 b(When)28 b(expanding)g(the)g(`)p
2145 y(parameters.)154 2283 y(31.)61 b(When)28 b(expanding)g(the)g(`)p
Ft(*)p Fu(')g(sp)s(ecial)h(parameter)f(in)g(a)h(pattern)f(con)m(text)i
(where)e(the)g(expansion)g(is)330 2469 y(double-quoted)i(do)s(es)g(not)
(where)e(the)g(expansion)g(is)330 2393 y(double-quoted)i(do)s(es)g(not)
h(treat)h(the)e Ft($*)g Fu(as)h(if)f(it)h(w)m(ere)g(double-quoted.)154
2600 y(33.)61 b(Assignmen)m(t)23 b(statemen)m(ts)h(preceding)e
2531 y(32.)61 b(Assignmen)m(t)23 b(statemen)m(ts)h(preceding)e
Fm(posix)f Fu(sp)s(ecial)i(builtins)f(p)s(ersist)g(in)f(the)i(shell)f
(en)m(vironmen)m(t)330 2710 y(after)31 b(the)f(builtin)g(completes.)154
2841 y(34.)61 b(Assignmen)m(t)35 b(statemen)m(ts)h(preceding)f(shell)f
(en)m(vironmen)m(t)330 2641 y(after)31 b(the)f(builtin)g(completes.)154
2779 y(33.)61 b(Assignmen)m(t)35 b(statemen)m(ts)h(preceding)f(shell)f
(function)g(calls)i(p)s(ersist)e(in)g(the)h(shell)f(en)m(vironmen)m(t)
330 2951 y(after)d(the)f(function)h(returns,)e(as)i(if)f(a)h
330 2889 y(after)d(the)f(function)h(returns,)e(as)i(if)f(a)h
Fm(posix)e Fu(sp)s(ecial)i(builtin)f(command)g(had)g(b)s(een)g
(executed.)154 3082 y(35.)61 b(The)31 b Ft(command)e
(executed.)154 3027 y(34.)61 b(The)31 b Ft(command)e
Fu(builtin)i(do)s(es)g(not)h(prev)m(en)m(t)f(builtins)g(that)h(tak)m(e)
h(assignmen)m(t)f(statemen)m(ts)h(as)f(ar-)330 3192 y(gumen)m(ts)40
h(assignmen)m(t)f(statemen)m(ts)h(as)f(ar-)330 3137 y(gumen)m(ts)40
b(from)e(expanding)h(them)g(as)h(assignmen)m(t)g(statemen)m(ts;)46
b(when)38 b(not)i(in)f Fm(posix)f Fu(mo)s(de,)330 3302
b(when)38 b(not)i(in)f Fm(posix)f Fu(mo)s(de,)330 3246
y(assignmen)m(t)k(builtins)e(lose)h(their)g(assignmen)m(t)h(statemen)m
(t)h(expansion)d(prop)s(erties)g(when)g(pre-)330 3411
y(ceded)31 b(b)m(y)f Ft(command)p Fu(.)154 3543 y(36.)61
(t)h(expansion)d(prop)s(erties)g(when)g(pre-)330 3356
y(ceded)31 b(b)m(y)f Ft(command)p Fu(.)154 3494 y(35.)61
b(The)27 b Ft(bg)g Fu(builtin)g(uses)g(the)h(required)f(format)h(to)g
(describ)s(e)f(eac)m(h)i(job)e(placed)h(in)f(the)h(bac)m(kground,)330
3652 y(whic)m(h)h(do)s(es)g(not)g(include)g(an)g(indication)h(of)f
3604 y(whic)m(h)h(do)s(es)g(not)g(include)g(an)g(indication)h(of)f
(whether)f(the)h(job)g(is)g(the)h(curren)m(t)e(or)h(previous)g(job.)154
3784 y(37.)61 b(The)23 b(output)f(of)i(`)p Ft(kill)29
3742 y(36.)61 b(The)23 b(output)f(of)i(`)p Ft(kill)29
b(-l)p Fu(')23 b(prin)m(ts)f(all)i(the)g(signal)f(names)g(on)g(a)h
(single)g(line,)h(separated)e(b)m(y)g(spaces,)330 3893
(single)g(line,)h(separated)e(b)m(y)g(spaces,)330 3852
y(without)30 b(the)h(`)p Ft(SIG)p Fu(')f(pre\014x.)154
4025 y(38.)61 b(The)30 b Ft(kill)f Fu(builtin)h(do)s(es)g(not)h(accept)
3990 y(37.)61 b(The)30 b Ft(kill)f Fu(builtin)h(do)s(es)g(not)h(accept)
h(signal)f(names)f(with)g(a)h(`)p Ft(SIG)p Fu(')f(pre\014x.)154
4156 y(39.)61 b(The)38 b Ft(export)f Fu(and)g Ft(readonly)f
4129 y(38.)61 b(The)38 b Ft(export)f Fu(and)g Ft(readonly)f
Fu(builtin)i(commands)g(displa)m(y)h(their)f(output)g(in)g(the)h
(format)g(re-)330 4266 y(quired)30 b(b)m(y)g Fm(posix)p
Fu(.)154 4398 y(40.)61 b(The)30 b Ft(trap)f Fu(builtin)h(displa)m(ys)g
(format)g(re-)330 4238 y(quired)30 b(b)m(y)g Fm(posix)p
Fu(.)154 4377 y(39.)61 b(The)30 b Ft(trap)f Fu(builtin)h(displa)m(ys)g
(signal)i(names)e(without)g(the)h(leading)g Ft(SIG)p
Fu(.)154 4529 y(41.)61 b(The)39 b Ft(trap)e Fu(builtin)i(do)s(esn't)g
Fu(.)154 4515 y(40.)61 b(The)39 b Ft(trap)e Fu(builtin)i(do)s(esn't)g
(c)m(hec)m(k)h(the)g(\014rst)e(argumen)m(t)i(for)e(a)i(p)s(ossible)e
(signal)i(sp)s(eci\014cation)330 4639 y(and)30 b(rev)m(ert)i(the)e
(signal)i(sp)s(eci\014cation)330 4625 y(and)30 b(rev)m(ert)i(the)e
(signal)i(handling)e(to)h(the)g(original)h(disp)s(osition)e(if)h(it)g
(is,)g(unless)f(that)h(argumen)m(t)330 4748 y(consists)e(solely)g(of)g
(is,)g(unless)f(that)h(argumen)m(t)330 4734 y(consists)e(solely)g(of)g
(digits)g(and)f(is)g(a)h(v)-5 b(alid)29 b(signal)g(n)m(um)m(b)s(er.)38
b(If)28 b(users)g(w)m(an)m(t)h(to)g(reset)g(the)g(handler)330
4858 y(for)h(a)g(giv)m(en)h(signal)g(to)f(the)h(original)g(disp)s
4844 y(for)h(a)g(giv)m(en)h(signal)g(to)f(the)h(original)g(disp)s
(osition,)f(they)g(should)f(use)h(`)p Ft(-)p Fu(')g(as)g(the)g(\014rst)
f(argumen)m(t.)154 4989 y(42.)61 b(The)21 b Ft(.)h Fu(and)f
f(argumen)m(t.)154 4982 y(41.)61 b(The)21 b Ft(.)h Fu(and)f
Ft(source)f Fu(builtins)h(do)g(not)h(searc)m(h)h(the)f(curren)m(t)f
(directory)h(for)g(the)g(\014lename)f(argumen)m(t)330
5099 y(if)30 b(it)h(is)g(not)f(found)f(b)m(y)i(searc)m(hing)g
Ft(PATH)p Fu(.)154 5230 y(43.)61 b(Enabling)21 b Fm(posix)g
5092 y(if)30 b(it)h(is)g(not)f(found)f(b)m(y)i(searc)m(hing)g
Ft(PATH)p Fu(.)154 5230 y(42.)61 b(Enabling)21 b Fm(posix)g
Fu(mo)s(de)g(has)g(the)g(e\013ect)i(of)e(setting)i(the)e
Ft(inherit_errexit)d Fu(option,)23 b(so)f(subshells)330
5340 y(spa)m(wned)27 b(to)i(execute)g(command)e(substitutions)h
@@ -15592,30 +15591,30 @@ b(Bash)30 b(F)-8 b(eatures)2439 b(103)330 299 y(paren)m(t)37
b(shell.)62 b(When)37 b(the)g Ft(inherit_errexit)c Fu(option)38
b(is)f(not)h(enabled,)h(Bash)e(clears)h(the)g Ft(-e)330
408 y Fu(option)31 b(in)f(suc)m(h)g(subshells.)154 542
y(44.)61 b(Enabling)32 b Fm(posix)f Fu(mo)s(de)h(has)g(the)h(e\013ect)g
y(43.)61 b(Enabling)32 b Fm(posix)f Fu(mo)s(de)h(has)g(the)h(e\013ect)g
(of)g(setting)g(the)g Ft(shift_verbose)28 b Fu(option,)34
b(so)e(n)m(umeric)330 652 y(argumen)m(ts)f(to)g Ft(shift)f
Fu(that)h(exceed)h(the)e(n)m(um)m(b)s(er)g(of)h(p)s(ositional)g
(parameters)g(will)g(result)g(in)f(an)330 762 y(error)g(message.)154
896 y(45.)61 b(When)43 b(the)g Ft(alias)f Fu(builtin)g(displa)m(ys)i
896 y(44.)61 b(When)43 b(the)g Ft(alias)f Fu(builtin)g(displa)m(ys)i
(alias)g(de\014nitions,)i(it)d(do)s(es)g(not)g(displa)m(y)h(them)f
(with)g(a)330 1005 y(leading)31 b(`)p Ft(alias)e Fu(')i(unless)f(the)g
Ft(-p)g Fu(option)h(is)f(supplied.)154 1139 y(46.)61
Ft(-p)g Fu(option)h(is)f(supplied.)154 1139 y(45.)61
b(When)40 b(the)g Ft(set)f Fu(builtin)h(is)g(in)m(v)m(ok)m(ed)h
(without)f(options,)j(it)e(do)s(es)f(not)g(displa)m(y)g(shell)g
(function)330 1249 y(names)30 b(and)g(de\014nitions.)154
1383 y(47.)61 b(When)36 b(the)g Ft(set)g Fu(builtin)g(is)g(in)m(v)m(ok)
1383 y(46.)61 b(When)36 b(the)g Ft(set)g Fu(builtin)g(is)g(in)m(v)m(ok)
m(ed)i(without)e(options,)i(it)f(displa)m(ys)f(v)-5 b(ariable)37
b(v)-5 b(alues)37 b(without)330 1492 y(quotes,)26 b(unless)d(they)i
(con)m(tain)g(shell)f(metac)m(haracters,)k(ev)m(en)d(if)f(the)g(result)
g(con)m(tains)i(nonprin)m(ting)330 1602 y(c)m(haracters.)154
1736 y(48.)61 b(When)35 b(the)g Ft(cd)f Fu(builtin)h(is)g(in)m(v)m(ok)m
1736 y(47.)61 b(When)35 b(the)g Ft(cd)f Fu(builtin)h(is)g(in)m(v)m(ok)m
(ed)i(in)d Fr(logical)41 b Fu(mo)s(de,)36 b(and)f(the)g(pathname)g
(constructed)g(from)330 1845 y Ft($PWD)i Fu(and)h(the)h(directory)f
(name)h(supplied)e(as)i(an)f(argumen)m(t)h(do)s(es)f(not)g(refer)h(to)g
(an)f(existing)330 1955 y(directory)-8 b(,)32 b Ft(cd)d
Fu(will)i(fail)g(instead)g(of)f(falling)h(bac)m(k)h(to)f
Fr(ph)m(ysical)j Fu(mo)s(de.)154 2089 y(49.)61 b(When)37
Fr(ph)m(ysical)j Fu(mo)s(de.)154 2089 y(48.)61 b(When)37
b(the)h Ft(cd)f Fu(builtin)g(cannot)h(c)m(hange)h(a)f(directory)g(b)s
(ecause)g(the)g(length)g(of)f(the)h(pathname)330 2198
y(constructed)52 b(from)f Ft($PWD)f Fu(and)g(the)i(directory)g(name)f
@@ -15623,46 +15622,46 @@ y(constructed)52 b(from)f Ft($PWD)f Fu(and)g(the)i(directory)g(name)f
y Fr(P)-8 b(A)g(TH)p 584 2308 28 4 v 41 w(MAX)42 b Fu(when)31
b(all)j(sym)m(b)s(olic)e(links)h(are)f(expanded,)h Ft(cd)f
Fu(will)g(fail)h(instead)g(of)g(attempting)330 2418 y(to)e(use)f(only)h
(the)f(supplied)f(directory)i(name.)154 2552 y(50.)61
(the)f(supplied)f(directory)i(name.)154 2552 y(49.)61
b(The)36 b Ft(pwd)f Fu(builtin)h(v)m(eri\014es)h(that)g(the)f(v)-5
b(alue)37 b(it)g(prin)m(ts)e(is)i(the)f(same)h(as)f(the)h(curren)m(t)f
(directory)-8 b(,)330 2661 y(ev)m(en)31 b(if)f(it)h(is)g(not)f(ask)m
(ed)h(to)g(c)m(hec)m(k)h(the)f(\014le)f(system)h(with)f(the)h
Ft(-P)e Fu(option.)154 2795 y(51.)61 b(When)35 b(listing)g(the)g
Ft(-P)e Fu(option.)154 2795 y(50.)61 b(When)35 b(listing)g(the)g
(history)-8 b(,)36 b(the)f Ft(fc)g Fu(builtin)f(do)s(es)g(not)h
(include)g(an)f(indication)i(of)f(whether)f(or)330 2905
y(not)d(a)f(history)h(en)m(try)f(has)g(b)s(een)g(mo)s(di\014ed.)154
3039 y(52.)61 b(The)30 b(default)g(editor)h(used)f(b)m(y)g
Ft(fc)g Fu(is)g Ft(ed)p Fu(.)154 3173 y(53.)61 b(The)37
3039 y(51.)61 b(The)30 b(default)g(editor)h(used)f(b)m(y)g
Ft(fc)g Fu(is)g Ft(ed)p Fu(.)154 3173 y(52.)61 b(The)37
b Ft(type)g Fu(and)g Ft(command)f Fu(builtins)i(will)g(not)g(rep)s(ort)
f(a)i(non-executable)g(\014le)f(as)g(ha)m(ving)h(b)s(een)330
3282 y(found,)26 b(though)h(the)g(shell)g(will)g(attempt)h(to)g
(execute)g(suc)m(h)f(a)g(\014le)g(if)g(it)g(is)g(the)g(only)g(so-named)
g(\014le)330 3392 y(found)i(in)h Ft($PATH)p Fu(.)154
3526 y(54.)61 b(The)33 b Ft(vi)f Fu(editing)i(mo)s(de)f(will)g(in)m(v)m
3526 y(53.)61 b(The)33 b Ft(vi)f Fu(editing)i(mo)s(de)f(will)g(in)m(v)m
(ok)m(e)i(the)e Ft(vi)g Fu(editor)h(directly)f(when)f(the)i(`)p
Ft(v)p Fu(')f(command)g(is)g(run,)330 3635 y(instead)e(of)f(c)m(hec)m
(king)i Ft($VISUAL)d Fu(and)g Ft($EDITOR)p Fu(.)154 3769
y(55.)61 b(When)41 b(the)g Ft(xpg_echo)e Fu(option)i(is)g(enabled,)j
y(54.)61 b(When)41 b(the)g Ft(xpg_echo)e Fu(option)i(is)g(enabled,)j
(Bash)d(do)s(es)g(not)g(attempt)h(to)g(in)m(terpret)f(an)m(y)h(ar-)330
3879 y(gumen)m(ts)35 b(to)g Ft(echo)e Fu(as)i(options.)54
b(Eac)m(h)35 b(argumen)m(t)g(is)f(displa)m(y)m(ed,)j(after)e(escap)s(e)
g(c)m(haracters)h(are)330 3988 y(con)m(v)m(erted.)154
4122 y(56.)61 b(The)30 b Ft(ulimit)f Fu(builtin)g(uses)h(a)h(blo)s(c)m
4122 y(55.)61 b(The)30 b Ft(ulimit)f Fu(builtin)g(uses)h(a)h(blo)s(c)m
(k)g(size)g(of)g(512)g(b)m(ytes)g(for)f(the)h Ft(-c)f
Fu(and)g Ft(-f)f Fu(options.)154 4256 y(57.)61 b(The)39
Fu(and)g Ft(-f)f Fu(options.)154 4256 y(56.)61 b(The)39
b(arriv)-5 b(al)41 b(of)f Ft(SIGCHLD)e Fu(when)h(a)h(trap)g(is)g(set)h
(on)f Ft(SIGCHLD)e Fu(do)s(es)h(not)h(in)m(terrupt)g(the)g
Ft(wait)330 4366 y Fu(builtin)c(and)h(cause)g(it)h(to)f(return)f
(immediately)-8 b(.)62 b(The)37 b(trap)f(command)h(is)g(run)e(once)j
(for)f(eac)m(h)330 4475 y(c)m(hild)31 b(that)g(exits.)154
4609 y(58.)61 b(The)27 b Ft(read)f Fu(builtin)g(ma)m(y)i(b)s(e)e(in)m
4609 y(57.)61 b(The)27 b Ft(read)f Fu(builtin)g(ma)m(y)i(b)s(e)e(in)m
(terrupted)h(b)m(y)g(a)h(signal)f(for)g(whic)m(h)g(a)h(trap)f(has)g(b)s
(een)f(set.)40 b(If)27 b(Bash)330 4719 y(receiv)m(es)41
b(a)f(trapp)s(ed)e(signal)i(while)f(executing)h Ft(read)p
Fu(,)h(the)e(trap)h(handler)e(executes)i(and)f Ft(read)330
4829 y Fu(returns)29 b(an)h(exit)i(status)e(greater)i(than)e(128.)154
4963 y(59.)61 b(Bash)27 b(remo)m(v)m(es)h(an)e(exited)i(bac)m(kground)e
4963 y(58.)61 b(Bash)27 b(remo)m(v)m(es)h(an)e(exited)i(bac)m(kground)e
(pro)s(cess's)h(status)g(from)f(the)h(list)g(of)g(suc)m(h)f(statuses)h
(after)330 5072 y(the)k Ft(wait)e Fu(builtin)h(is)g(used)g(to)h(obtain)
g(it.)275 5230 y(There)j(is)g(other)h Fm(posix)f Fu(b)s(eha)m(vior)h