summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2022-01-18 10:59:53 -0500
committerChet Ramey <chet.ramey@case.edu>2022-01-18 10:59:53 -0500
commit2a1c81bf634d372fde5141d7e616042ca960d9b4 (patch)
treeb32672902c33a634fe11b99637aaf55e21b3fd5a
parent5e6f45d9b16e4c95922e246491c2666a4c2c0399 (diff)
downloadbash-2a1c81bf634d372fde5141d7e616042ca960d9b4.tar.gz
change to behavior of '&' in pattern substitution replacement string; fix for blank lines in multiline commands saved in command history
-rw-r--r--CWRU/CWRU.chlog28
-rw-r--r--MANIFEST9
-rw-r--r--Makefile.in2
-rw-r--r--doc/bash.050
-rw-r--r--doc/bash.133
-rw-r--r--doc/bashref.info338
-rw-r--r--doc/bashref.texi65
-rw-r--r--doc/version.texi8
-rw-r--r--parse.y5
-rw-r--r--po/zh_CN.gmobin167024 -> 169521 bytes
-rw-r--r--po/zh_CN.po2114
-rw-r--r--subst.c109
-rwxr-xr-xsupport/mkdist1
-rwxr-xr-xtests/RUN-ONE-TEST2
-rw-r--r--tests/dynvar.tests13
-rw-r--r--tests/exportfunc.right2
-rw-r--r--tests/exportfunc.tests10
-rw-r--r--tests/func.tests6
-rw-r--r--tests/glob2.sub8
-rw-r--r--tests/glob5.sub2
-rw-r--r--tests/glob6.sub1
-rw-r--r--tests/herestr.tests6
-rw-r--r--tests/intl2.sub22
-rw-r--r--tests/jobs4.sub2
-rw-r--r--tests/jobs7.sub2
-rw-r--r--tests/new-exp.right33
-rw-r--r--tests/new-exp16.sub40
-rw-r--r--tests/read.right6
-rw-r--r--tests/read7.sub3
-rw-r--r--tests/run-intl3
-rw-r--r--tests/unicode1.sub9
31 files changed, 1608 insertions, 1324 deletions
diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog
index 596830c..730381d 100644
--- a/CWRU/CWRU.chlog
+++ b/CWRU/CWRU.chlog
@@ -2914,3 +2914,31 @@ examples/loadables/accept.c
----
configure.ac
- bumped version to 5.2-alpha.
+
+ 1/16
+ ----
+
+tests/{unicode1,glob2,intl2}.sub, tests/run-intl
+ - minor changes to add warnings for missing locales that cause test
+ failures
+
+ 1/17
+ ----
+parse.y
+ - history_delimiting_chars: if we have a blank line by the time we
+ hit the end of the tests, return a semicolon for the first blank
+ line to avoid running lines of a multi-line command together.
+ Fixes bug reported by Joakim Lindblad <joakim@cb.uu.se>
+
+subst.c
+ - expand_string_for_patsub: expand the replacement string for pattern
+ substitution assuming that it will eventually be passed to
+ strcreplace to replace `&' with the matched portion of the string.
+ This calls expand_string_for_pat(), which leaves the string quoted
+ and does not perform word splitting, then calls
+ quote_string_for_repl to post-process the expanded string.
+ - quote_string_for_repl: perform quote removal on passed string while
+ replacing CTLESC escaping a `&' or a backslash with a backslash. The
+ result must be passed to strcreplace
+ - parameter_brace_patsub: call expand_string_for_patsub if
+ patsub_replacement is set to quote
diff --git a/MANIFEST b/MANIFEST
index 1e326ee..75ad598 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -148,10 +148,11 @@ redir.h f
bashtypes.h f
mailcheck.h f
xmalloc.h f
-y.tab.c f
-y.tab.h f
-parser-built f
pathnames.h.in f
+# order is important here
+y.tab.c F
+y.tab.h F
+parser-built F
builtins/Makefile.in f
builtins/alias.def f
builtins/bind.def f
@@ -955,6 +956,7 @@ tests/assoc14.sub f
tests/assoc15.sub f
tests/assoc16.sub f
tests/assoc17.sub f
+tests/assoc18.sub f
tests/attr.tests f
tests/attr.right f
tests/attr1.sub f
@@ -1098,6 +1100,7 @@ tests/exp9.sub f
tests/exp10.sub f
tests/exp11.sub f
tests/exp12.sub f
+tests/exp13.sub f
tests/exportfunc.tests f
tests/exportfunc.right f
tests/exportfunc1.sub f
diff --git a/Makefile.in b/Makefile.in
index 0299b1d..818a51b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -588,7 +588,7 @@ LOADABLES_DIR = ${top_builddir}/examples/loadables
.made: $(Program) bashbug $(SDIR)/man2html$(EXEEXT)
@echo "$(Program) last made for a $(Machine) running $(OS)" >.made
-$(Program): .build $(OBJECTS) $(BUILTINS_DEP) $(LIBDEP)
+$(Program): $(OBJECTS) $(BUILTINS_DEP) $(LIBDEP) .build
$(RM) $@
$(PURIFY) $(CC) $(BUILTINS_LDFLAGS) $(LIBRARY_LDFLAGS) $(LDFLAGS) -o $(Program) $(OBJECTS) $(LIBS)
ls -l $(Program)
diff --git a/doc/bash.0 b/doc/bash.0
index 38829fc..be6122c 100644
--- a/doc/bash.0
+++ b/doc/bash.0
@@ -9,7 +9,7 @@ SSYYNNOOPPSSIISS
bbaasshh [options] [command_string | file]
CCOOPPYYRRIIGGHHTT
- Bash is Copyright (C) 1989-2021 by the Free Software Foundation, Inc.
+ Bash is Copyright (C) 1989-2022 by the Free Software Foundation, Inc.
DDEESSCCRRIIPPTTIIOONN
BBaasshh is an sshh-compatible command language interpreter that executes
@@ -1849,24 +1849,34 @@ EEXXPPAANNSSIIOONN
end of the expanded value of _p_a_r_a_m_e_t_e_r. If the expansion of
_s_t_r_i_n_g is null, matches of _p_a_t_t_e_r_n are deleted. If _s_t_r_i_n_g is
null, matches of _p_a_t_t_e_r_n are deleted and the // following _p_a_t_t_e_r_n
- may be omitted. If the ppaattssuubb__rreeppllaacceemmeenntt shell option is en-
- abled using sshhoopptt, any unquoted instances of && in _s_t_r_i_n_g are re-
- placed with the matching portion of _p_a_t_t_e_r_n. Backslash is used
- to quote && in _s_t_r_i_n_g; the backslash is removed in order to per-
- mit a literal && in the replacement string. Users should take
- care if _s_t_r_i_n_g is double-quoted to avoid unwanted interactions
- between the backslash and double-quoting. Pattern substitution
- performs the check for && after expanding _s_t_r_i_n_g; shell program-
- mers should quote backslashes intended to escape the && and in-
- hibit replacement so they survive any quote removal performed by
- the expansion of _s_t_r_i_n_g. If the nnooccaasseemmaattcchh shell option is en-
- abled, the match is performed without regard to the case of al-
- phabetic characters. If _p_a_r_a_m_e_t_e_r is @@ or **, the substitution
- operation is applied to each positional parameter in turn, and
- the expansion is the resultant list. If _p_a_r_a_m_e_t_e_r is an array
- variable subscripted with @@ or **, the substitution operation is
- applied to each member of the array in turn, and the expansion
- is the resultant list.
+ may be omitted.
+
+ If the ppaattssuubb__rreeppllaacceemmeenntt shell option is enabled using sshhoopptt,
+ any unquoted instances of && in _s_t_r_i_n_g are replaced with the
+ matching portion of _p_a_t_t_e_r_n.
+
+ Quoting any part of _s_t_r_i_n_g inhibits replacement in the expansion
+ of the quoted portion, including replacement strings stored in
+ shell variables. Backslash will escape && in _s_t_r_i_n_g; the back-
+ slash is removed in order to permit a literal && in the replace-
+ ment string. Backslash can also be used to escape a backslash;
+ \\\\ results in a literal backslash in the replacement. Users
+ should take care if _s_t_r_i_n_g is double-quoted to avoid unwanted
+ interactions between the backslash and double-quoting, since
+ backslash has special meaning within double quotes. Pattern
+ substitution performs the check for unquoted && after expanding
+ _s_t_r_i_n_g; shell programmers should quote any occurrences of && they
+ want to be taken literally in the replacement and ensure any in-
+ stances of && they want to be replaced are unquoted.
+
+ If the nnooccaasseemmaattcchh shell option is enabled, the match is per-
+ formed without regard to the case of alphabetic characters. If
+ _p_a_r_a_m_e_t_e_r is @@ or **, the substitution operation is applied to
+ each positional parameter in turn, and the expansion is the re-
+ sultant list. If _p_a_r_a_m_e_t_e_r is an array variable subscripted
+ with @@ or **, the substitution operation is applied to each mem-
+ ber of the array in turn, and the expansion is the resultant
+ list.
${_p_a_r_a_m_e_t_e_r^^_p_a_t_t_e_r_n}
${_p_a_r_a_m_e_t_e_r^^^^_p_a_t_t_e_r_n}
@@ -6597,4 +6607,4 @@ BBUUGGSS
-GNU Bash 5.2 2021 December 26 BASH(1)
+GNU Bash 5.2 2022 January 17 BASH(1)
diff --git a/doc/bash.1 b/doc/bash.1
index d35468d..c8fb297 100644
--- a/doc/bash.1
+++ b/doc/bash.1
@@ -5,12 +5,12 @@
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
-.\" Last Change: Sun Dec 26 16:02:07 EST 2021
+.\" Last Change: Mon Jan 17 17:27:05 EST 2022
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
-.TH BASH 1 "2021 December 26" "GNU Bash 5.2"
+.TH BASH 1 "2022 January 17" "GNU Bash 5.2"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -50,8 +50,8 @@ bash \- GNU Bourne-Again SHell
[options]
[command_string | file]
.SH COPYRIGHT
-.if n Bash is Copyright (C) 1989-2021 by the Free Software Foundation, Inc.
-.if t Bash is Copyright \(co 1989-2021 by the Free Software Foundation, Inc.
+.if n Bash is Copyright (C) 1989-2022 by the Free Software Foundation, Inc.
+.if t Bash is Copyright \(co 1989-2022 by the Free Software Foundation, Inc.
.SH DESCRIPTION
.B Bash
is an \fBsh\fR-compatible command language interpreter that
@@ -3373,18 +3373,27 @@ matches of \fIpattern\fP are deleted.
If \fIstring\fP is null,
matches of \fIpattern\fP are deleted
and the \fB/\fP following \fIpattern\fP may be omitted.
+.sp 1
If the \fBpatsub_replacement\fP shell option is enabled using \fBshopt\fP,
any unquoted instances of \fB&\fP in \fIstring\fP are replaced with the
matching portion of \fIpattern\fP.
-Backslash is used to quote \fB&\fP in \fIstring\fP; the backslash is removed
+.sp 1
+Quoting any part of \fIstring\fP inhibits replacement in the
+expansion of the quoted portion, including replacement strings stored
+in shell variables.
+Backslash will escape \fB&\fP in \fIstring\fP; the backslash is removed
in order to permit a literal \fB&\fP in the replacement string.
-Users should take care
-if \fIstring\fP is double-quoted to avoid unwanted interactions between
-the backslash and double-quoting.
-Pattern substitution performs the check for \fB&\fP after expanding
-\fIstring\fP; shell programmers should quote backslashes intended to escape
-the \fB&\fP and inhibit replacement so they survive any quote removal
-performed by the expansion of \fIstring\fP.
+Backslash can also be used to escape a backslash; \fB\e\e\fP results in
+a literal backslash in the replacement.
+Users should take care if \fIstring\fP is double-quoted to avoid
+unwanted interactions between the backslash and double-quoting, since
+backslash has special meaning within double quotes.
+Pattern substitution performs the check for unquoted \fB&\fP after
+expanding \fIstring\fP;
+shell programmers should quote any occurrences of \fB&\fP
+they want to be taken literally in the replacement
+and ensure any instances of \fB&\fP they want to be replaced are unquoted.
+.sp 1
If the
.B nocasematch
shell option is enabled, the match is performed without regard to the case
diff --git a/doc/bashref.info b/doc/bashref.info
index 4b5eb14..8c8986c 100644
--- a/doc/bashref.info
+++ b/doc/bashref.info
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 6.8 from
bashref.texi.
This text is a brief description of the features that are present in the
-Bash shell (version 5.2, 26 December 2021).
+Bash shell (version 5.2, 17 January 2022).
- This is Edition 5.2, last updated 26 December 2021, of 'The GNU Bash
+ This is Edition 5.2, last updated 17 January 2022, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.2.
Copyright (C) 1988-2021 Free Software Foundation, Inc.
@@ -27,10 +27,10 @@ Bash Features
*************
This text is a brief description of the features that are present in the
-Bash shell (version 5.2, 26 December 2021). The Bash home page is
+Bash shell (version 5.2, 17 January 2022). The Bash home page is
<http://www.gnu.org/software/bash/>.
- This is Edition 5.2, last updated 26 December 2021, of 'The GNU Bash
+ This is Edition 5.2, last updated 17 January 2022, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.2.
Bash contains features that appear in other popular shells, and some
@@ -2079,38 +2079,58 @@ omitted, the operator tests only for existence.
If the 'patsub_replacement' shell option is enabled using 'shopt',
any unquoted instances of '&' in STRING are replaced with the
matching portion of PATTERN. This is intended to duplicate a
- common 'sed' idiom. Backslash is used to quote '&' in STRING; the
- backslash is removed in order to permit a literal '&' in the
- replacement string. Pattern substitution performs the check for
- '&' after expanding STRING, so users should take care to quote
- backslashes intended to escape the '&' and inhibit replacement so
- they survive any quote removal performed by the expansion of
- STRING. For instance,
+ common 'sed' idiom.
+
+ Quoting any part of STRING inhibits replacement in the expansion of
+ the quoted portion, including replacement strings stored in shell
+ variables. Backslash will escape '&' in STRING; the backslash is
+ removed in order to permit a literal '&' in the replacement string.
+ Users should take care if STRING is double-quoted to avoid unwanted
+ interactions between the backslash and double-quoting, since
+ backslash has special meaning within double quotes. Pattern
+ substitution performs the check for unquoted '&' after expanding
+ STRING, so users should ensure to properly quote any occurrences of
+ '&' they want to be taken literally in the replacement and ensure
+ any instances of '&' they want to be replaced are unquoted.
+
+ For instance,
var=abcdef
+ rep='& '
echo ${var/abc/& }
echo "${var/abc/& }"
- echo ${var/abc/"& "}
+ echo ${var/abc/$rep}
+ echo "${var/abc/$rep}"
- will display three lines of "abc def", while
+ will display four lines of "abc def", while
var=abcdef
+ rep='& '
echo ${var/abc/\& }
echo "${var/abc/\& }"
- echo ${var/abc/"\& "}
-
- will display two lines of "abc def" and a third line of "& def".
- The first two are replaced because the backslash is removed by
- quote removal performed during the expansion of STRING (the
- expansion is performed in a context that doesn't take any enclosing
- double quotes into account, as with other word expansions). In the
- third case, the double quotes affect the expansion of '\&', and,
- because '&' is not one of the characters for which backslash is
- special in double quotes, the backslash survives the expansion,
- inhibits the replacement, but is removed because it is treated
- specially. One could use '\\&', unquoted, as the replacement
- string to achive the same effect. It should rarely be necessary to
- enclose only STRING in double quotes.
+ echo ${var/abc/"& "}
+ echo ${var/abc/"$rep"}
+
+ will display four lines of "& def". Like the pattern removal
+ operators, double quotes surrounding the replacement string quote
+ the expanded characters, while double quotes enclosing the entire
+ parameter substitution do not, since the expansion is performed in
+ a context that doesn't take any enclosing double quotes into
+ account.
+
+ Since backslash can escape '&', it can also escape a backslash in
+ the replacement string. This means that '\\' will insert a literal
+ backslash into the replacement, so these two 'echo' commands
+
+ var=abcdef
+ rep='\\&xyz'
+ echo ${var/abc/\\&xyz}
+ echo ${var/abc/$rep}
+
+ will both output '\abcxyzdef'.
+
+ It should rarely be necessary to enclose only STRING in double
+ quotes.
If the 'nocasematch' shell option (see the description of 'shopt'
in *note The Shopt Builtin::) is enabled, the match is performed
@@ -12423,138 +12443,138 @@ D.5 Concept Index

Tag Table:
-Node: Top897
-Node: Introduction2817
-Node: What is Bash?3033
-Node: What is a shell?4147
-Node: Definitions6685
-Node: Basic Shell Features9636
-Node: Shell Syntax10855
-Node: Shell Operation11881
-Node: Quoting13174
-Node: Escape Character14478
-Node: Single Quotes14963
-Node: Double Quotes15311
-Node: ANSI-C Quoting16589
-Node: Locale Translation17899
-Node: Creating Internationalized Scripts19210
-Node: Comments23327
-Node: Shell Commands23945
-Node: Reserved Words24883
-Node: Simple Commands25639
-Node: Pipelines26293
-Node: Lists29252
-Node: Compound Commands31047
-Node: Looping Constructs32059
-Node: Conditional Constructs34554
-Node: Command Grouping48898
-Node: Coprocesses50376
-Node: GNU Parallel53039
-Node: Shell Functions53956
-Node: Shell Parameters61247
-Node: Positional Parameters65635
-Node: Special Parameters66537
-Node: Shell Expansions69751
-Node: Brace Expansion71878
-Node: Tilde Expansion74612
-Node: Shell Parameter Expansion77233
-Node: Command Substitution95099
-Node: Arithmetic Expansion96454
-Node: Process Substitution97422
-Node: Word Splitting98542
-Node: Filename Expansion100486
-Node: Pattern Matching103235
-Node: Quote Removal107843
-Node: Redirections108138
-Node: Executing Commands117798
-Node: Simple Command Expansion118468
-Node: Command Search and Execution120578
-Node: Command Execution Environment122956
-Node: Environment125991
-Node: Exit Status127654
-Node: Signals129438
-Node: Shell Scripts132887
-Node: Shell Builtin Commands135914
-Node: Bourne Shell Builtins137952
-Node: Bash Builtins159413
-Node: Modifying Shell Behavior190269
-Node: The Set Builtin190614
-Node: The Shopt Builtin201215
-Node: Special Builtins217127
-Node: Shell Variables218106
-Node: Bourne Shell Variables218543
-Node: Bash Variables220647
-Node: Bash Features253463
-Node: Invoking Bash254476
-Node: Bash Startup Files260489
-Node: Interactive Shells265592
-Node: What is an Interactive Shell?266002
-Node: Is this Shell Interactive?266651
-Node: Interactive Shell Behavior267466
-Node: Bash Conditional Expressions271095
-Node: Shell Arithmetic275737
-Node: Aliases278681
-Node: Arrays281294
-Node: The Directory Stack287541
-Node: Directory Stack Builtins288325
-Node: Controlling the Prompt292585
-Node: The Restricted Shell295550
-Node: Bash POSIX Mode298160
-Node: Shell Compatibility Mode309433
-Node: Job Control317462
-Node: Job Control Basics317922
-Node: Job Control Builtins322924
-Node: Job Control Variables328324
-Node: Command Line Editing329480
-Node: Introduction and Notation331151
-Node: Readline Interaction332774
-Node: Readline Bare Essentials333965
-Node: Readline Movement Commands335748
-Node: Readline Killing Commands336708
-Node: Readline Arguments338626
-Node: Searching339670
-Node: Readline Init File341856
-Node: Readline Init File Syntax343117
-Node: Conditional Init Constructs364605
-Node: Sample Init File368801
-Node: Bindable Readline Commands371925
-Node: Commands For Moving373129
-Node: Commands For History375180
-Node: Commands For Text380174
-Node: Commands For Killing383823
-Node: Numeric Arguments386856
-Node: Commands For Completion387995
-Node: Keyboard Macros392186
-Node: Miscellaneous Commands392873
-Node: Readline vi Mode398812
-Node: Programmable Completion399719
-Node: Programmable Completion Builtins407499
-Node: A Programmable Completion Example418194
-Node: Using History Interactively423441
-Node: Bash History Facilities424125
-Node: Bash History Builtins427130
-Node: History Interaction432138
-Node: Event Designators435758
-Node: Word Designators437112
-Node: Modifiers438872
-Node: Installing Bash440683
-Node: Basic Installation441820
-Node: Compilers and Options445542
-Node: Compiling For Multiple Architectures446283
-Node: Installation Names447976
-Node: Specifying the System Type450085
-Node: Sharing Defaults450801
-Node: Operation Controls451474
-Node: Optional Features452432
-Node: Reporting Bugs463650
-Node: Major Differences From The Bourne Shell464925
-Node: GNU Free Documentation License481775
-Node: Indexes506952
-Node: Builtin Index507406
-Node: Reserved Word Index514233
-Node: Variable Index516681
-Node: Function Index533173
-Node: Concept Index546957
+Node: Top895
+Node: Introduction2813
+Node: What is Bash?3029
+Node: What is a shell?4143
+Node: Definitions6681
+Node: Basic Shell Features9632
+Node: Shell Syntax10851
+Node: Shell Operation11877
+Node: Quoting13170
+Node: Escape Character14474
+Node: Single Quotes14959
+Node: Double Quotes15307
+Node: ANSI-C Quoting16585
+Node: Locale Translation17895
+Node: Creating Internationalized Scripts19206
+Node: Comments23323
+Node: Shell Commands23941
+Node: Reserved Words24879
+Node: Simple Commands25635
+Node: Pipelines26289
+Node: Lists29248
+Node: Compound Commands31043
+Node: Looping Constructs32055
+Node: Conditional Constructs34550
+Node: Command Grouping48894
+Node: Coprocesses50372
+Node: GNU Parallel53035
+Node: Shell Functions53952
+Node: Shell Parameters61243
+Node: Positional Parameters65631
+Node: Special Parameters66533
+Node: Shell Expansions69747
+Node: Brace Expansion71874
+Node: Tilde Expansion74608
+Node: Shell Parameter Expansion77229
+Node: Command Substitution95566
+Node: Arithmetic Expansion96921
+Node: Process Substitution97889
+Node: Word Splitting99009
+Node: Filename Expansion100953
+Node: Pattern Matching103702
+Node: Quote Removal108310
+Node: Redirections108605
+Node: Executing Commands118265
+Node: Simple Command Expansion118935
+Node: Command Search and Execution121045
+Node: Command Execution Environment123423
+Node: Environment126458
+Node: Exit Status128121
+Node: Signals129905
+Node: Shell Scripts133354
+Node: Shell Builtin Commands136381
+Node: Bourne Shell Builtins138419
+Node: Bash Builtins159880
+Node: Modifying Shell Behavior190736
+Node: The Set Builtin191081
+Node: The Shopt Builtin201682
+Node: Special Builtins217594
+Node: Shell Variables218573
+Node: Bourne Shell Variables219010
+Node: Bash Variables221114
+Node: Bash Features253930
+Node: Invoking Bash254943
+Node: Bash Startup Files260956
+Node: Interactive Shells266059
+Node: What is an Interactive Shell?266469
+Node: Is this Shell Interactive?267118
+Node: Interactive Shell Behavior267933
+Node: Bash Conditional Expressions271562
+Node: Shell Arithmetic276204
+Node: Aliases279148
+Node: Arrays281761
+Node: The Directory Stack288008
+Node: Directory Stack Builtins288792
+Node: Controlling the Prompt293052
+Node: The Restricted Shell296017
+Node: Bash POSIX Mode298627
+Node: Shell Compatibility Mode309900
+Node: Job Control317929
+Node: Job Control Basics318389
+Node: Job Control Builtins323391
+Node: Job Control Variables328791
+Node: Command Line Editing329947
+Node: Introduction and Notation331618
+Node: Readline Interaction333241
+Node: Readline Bare Essentials334432
+Node: Readline Movement Commands336215
+Node: Readline Killing Commands337175
+Node: Readline Arguments339093
+Node: Searching340137
+Node: Readline Init File342323
+Node: Readline Init File Syntax343584
+Node: Conditional Init Constructs365072
+Node: Sample Init File369268
+Node: Bindable Readline Commands372392
+Node: Commands For Moving373596
+Node: Commands For History375647
+Node: Commands For Text380641
+Node: Commands For Killing384290
+Node: Numeric Arguments387323
+Node: Commands For Completion388462
+Node: Keyboard Macros392653
+Node: Miscellaneous Commands393340
+Node: Readline vi Mode399279
+Node: Programmable Completion400186
+Node: Programmable Completion Builtins407966
+Node: A Programmable Completion Example418661
+Node: Using History Interactively423908
+Node: Bash History Facilities424592
+Node: Bash History Builtins427597
+Node: History Interaction432605
+Node: Event Designators436225
+Node: Word Designators437579
+Node: Modifiers439339
+Node: Installing Bash441150
+Node: Basic Installation442287
+Node: Compilers and Options446009
+Node: Compiling For Multiple Architectures446750
+Node: Installation Names448443
+Node: Specifying the System Type450552
+Node: Sharing Defaults451268
+Node: Operation Controls451941
+Node: Optional Features452899
+Node: Reporting Bugs464117
+Node: Major Differences From The Bourne Shell465392
+Node: GNU Free Documentation License482242
+Node: Indexes507419
+Node: Builtin Index507873
+Node: Reserved Word Index514700
+Node: Variable Index517148
+Node: Function Index533640
+Node: Concept Index547424

End Tag Table
diff --git a/doc/bashref.texi b/doc/bashref.texi
index fdfc508..0610952 100644
--- a/doc/bashref.texi
+++ b/doc/bashref.texi
@@ -2444,46 +2444,67 @@ If the @code{patsub_replacement} shell option is enabled using @code{shopt},
any unquoted instances of @samp{&} in @var{string} are replaced with the
matching portion of @var{pattern}.
This is intended to duplicate a common @code{sed} idiom.
-Backslash is used to quote @samp{&} in @var{string}; the backslash is removed
+
+Quoting any part of @var{string} inhibits replacement in the
+expansion of the quoted portion, including replacement strings stored
+in shell variables.
+Backslash will escape @samp{&} in @var{string}; the backslash is removed
in order to permit a literal @samp{&} in the replacement string.
-Pattern substitution performs the check for @samp{&} after expanding
-@var{string},
-so users should take care to quote backslashes intended to escape
-the @samp{&} and inhibit replacement so they survive any quote removal
-performed by the expansion of @var{string}.
+Users should take care if @var{string} is double-quoted to avoid
+unwanted interactions between the backslash and double-quoting, since
+backslash has special meaning within double quotes.
+Pattern substitution performs the check for unquoted @samp{&} after
+expanding @var{string},
+so users should ensure to properly quote any occurrences of @samp{&}
+they want to be taken literally in the replacement
+and ensure any instances of @samp{&} they want to be replaced are unquoted.
+
For instance,
@example
var=abcdef
+rep='& '
echo $@{var/abc/& @}
echo "$@{var/abc/& @}"
-echo $@{var/abc/"& "@}
+echo $@{var/abc/$rep@}
+echo "$@{var/abc/$rep@}"
@end example
@noindent
-will display three lines of "abc def", while
+will display four lines of "abc def", while
@example
var=abcdef
+rep='& '
echo $@{var/abc/\& @}
echo "$@{var/abc/\& @}"
-echo $@{var/abc/"\& "@}
+echo $@{var/abc/"& "@}
+echo $@{var/abc/"$rep"@}
+@end example
+
+@noindent
+will display four lines of "& def".
+Like the pattern removal operators, double quotes surrounding the
+replacement string quote the expanded characters, while double quotes
+enclosing the entire parameter substitution do not, since
+the expansion is performed in a
+context that doesn't take any enclosing double quotes into account.
+
+Since backslash can escape @samp{&}, it can also escape a backslash in
+the replacement string.
+This means that @samp{\\} will insert a literal
+backslash into the replacement, so these two @code{echo} commands
+
+@example
+var=abcdef
+rep='\\&xyz'
+echo $@{var/abc/\\&xyz@}
+echo $@{var/abc/$rep@}
@end example
@noindent
-will display two lines of "abc def" and a third line of "& def".
-The first two are replaced because the backslash is removed by quote
-removal performed during the expansion of @var{string}
-(the expansion is performed in a
-context that doesn't take any enclosing double quotes into account, as
-with other word expansions).
-In the third case, the double quotes affect the expansion
-of @samp{\&}, and, because @samp{&} is not one of the characters for
-which backslash is special in double quotes,
-the backslash survives the expansion, inhibits the replacement,
-but is removed because it is treated specially.
-One could use @samp{\\&}, unquoted, as the replacement string to achive
-the same effect.
+will both output @samp{\abcxyzdef}.
+
It should rarely be necessary to enclose only @var{string} in double
quotes.
diff --git a/doc/version.texi b/doc/version.texi
index 7fca473..5f05614 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,11 +1,11 @@
@ignore
-Copyright (C) 1988-2021 Free Software Foundation, Inc.
+Copyright (C) 1988-2022 Free Software Foundation, Inc.
@end ignore
-@set LASTCHANGE Sun Dec 26 16:02:48 EST 2021
+@set LASTCHANGE Mon Jan 17 17:03:25 EST 2022
@set EDITION 5.2
@set VERSION 5.2
-@set UPDATED 26 December 2021
-@set UPDATED-MONTH December 2021
+@set UPDATED 17 January 2022
+@set UPDATED-MONTH January 2022
diff --git a/parse.y b/parse.y
index 9419587..4e5b046 100644
--- a/parse.y
+++ b/parse.y
@@ -5433,8 +5433,11 @@ history_delimiting_chars (line)
return (" ");
}
+ /* Assume that by this point we are reading lines in a multi-line command.
+ If we have multiple consecutive blank lines we want to return only one
+ semicolon. */
if (line_isblank (line))
- return ("");
+ return (current_command_line_count > 1 && last_read_token == '\n' && token_before_that != '\n') ? "; " : "";
return ("; ");
}
diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo
index e08b766..a13f7af 100644
--- a/po/zh_CN.gmo
+++ b/po/zh_CN.gmo
Binary files differ
diff --git a/po/zh_CN.po b/po/zh_CN.po
index ad8d484..8cbe65d 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -9,39 +9,24 @@
# liushuyu <liushuyu011@gmail.com>, 2016.
# Mingye Wang <arthur200126@gmail.com>, 2015, 2016.
# Boyuan Yang <073plan@gmail.com>, 2018, 2019, 2020.
-# Wenbin Lv <wenbin816@gmail.com>, 2021.
+# Wenbin Lv <wenbin816@gmail.com>, 2021, 2022.
#
-# KNOWN DEFECTS (easy fixes, tedious work; sorted by priority):
-# 0. Translation coverage when upstream sends new strings.
+# 本翻译目前采用的格式约定,和其他注意事项:
#
-# 1. Argument lists in `help` are translated, but the `help blah` text still
-# refers to the original name like WORDS.
-#
-# These long helps should be changed to follow their `help` synopsis. Use
-# <参数> to refer to `参数' in the one-line synopsis.
-#
-# 2. Passive voice. When used inappropriately, they sound even worse in
-# Chinese than in English. In fact huge amounts of `被' is what you use to
-# spot translated text. (You don't always need `被' for passive voice
-# either.)
-#
-# 3. Typography.
-# a. Capitalization. English convensions mangle command names in help text
-# if it's the first word of the sentense (e.g. `Getopts blah blah...').
-# Do yourself a favor and change the names back into lowercase.
-# b. Quotes. Chinese has no `typewriter quote' convension, and standard
-# “curly quotes” should be used.
-# c. Colons. We don't use `: ` in Chinese; use `:`. Sometimes `:` is seen
-# w/o a space (worse).
-# d. Other stuff like parentheses and whitespace. Alignment can be quite
-# important for Feeling Good(TM).
+# 1. 冒号:冒号左边最近的分句含有中文字符时,使用中文冒号,否则使用英文冒号。
+# 2. 引号:永远使用 " ",除非被引用的字符是 " 或 ',此时保留原文(一般是 ` ')。
+# 3. 括号:括号内含有中文字符时,使用中文括号,否则使用英文括号。
+# 4. 命令帮助中,单行用法里的可替换词语(如“名称”)在完整帮助中应写成 <名称>,
+# 尖括号两边按照英文括号的原则加空格。
+# 5. 注意统一术语,不确定的术语先搜索此文件看看。新术语强烈推荐“术语在线”网站。
+# 6. 经常查看上下文(源代码)对翻译的正确率很有帮助。
#
msgid ""
msgstr ""
"Project-Id-Version: bash 5.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-11-28 12:51-0500\n"
-"PO-Revision-Date: 2021-12-21 21:36+0800\n"
+"PO-Revision-Date: 2022-01-12 18:01+0800\n"
"Last-Translator: Wenbin Lv <wenbin816@gmail.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
"Language: zh_CN\n"
@@ -60,56 +45,58 @@ msgstr "数组下标不正确"
#: variables.c:3133
#, c-format
msgid "%s: removing nameref attribute"
-msgstr "%s:正在移除名称引用属性"
+msgstr "%s: 正在移除名称引用属性"
#: arrayfunc.c:446 builtins/declare.def:851
#, c-format
msgid "%s: cannot convert indexed to associative array"
-msgstr "%s:无法将索引数组转化为关联数组"
+msgstr "%s: 无法将索引数组转换为关联数组"
#: arrayfunc.c:700
#, c-format
msgid "%s: invalid associative array key"
-msgstr "%s:无效的关联数组键"
+msgstr "%s: 无效的关联数组键"
#: arrayfunc.c:702
#, c-format
msgid "%s: cannot assign to non-numeric index"
-msgstr "%s:无法为非数字的索引赋值"
+msgstr "%s: 无法为非数值的索引赋值"
#: arrayfunc.c:747
#, c-format
msgid "%s: %s: must use subscript when assigning associative array"
-msgstr "%s:%s:为关联数组赋值时必须使用下标"
+msgstr "%s: %s: 为关联数组赋值时必须使用下标"
#: bashhist.c:452
#, c-format
msgid "%s: cannot create: %s"
-msgstr "%s:无法创建: %s"
+msgstr "%s: 无法创建:%s"
#: bashline.c:4310
msgid "bash_execute_unix_command: cannot find keymap for command"
-msgstr "bash_execute_unix_command: 无法为命令找到键映射"
+msgstr "bash_execute_unix_command: 无法找到命令的键映射"
+# 为了可读性,不改动外层引号
#: bashline.c:4459
#, c-format
msgid "%s: first non-whitespace character is not `\"'"
-msgstr "%s:第一个非空字符不是“\"”"
+msgstr "%s: 第一个非空白字符不是 `\"'"
+# %c == ' 或 ",为了可读性,不改动外层引号
#: bashline.c:4488
#, c-format
msgid "no closing `%c' in %s"
-msgstr "%2$s 中没有闭合的“%1$c”"
+msgstr "%2$s 中没有右 `%1$c'"
#: bashline.c:4519
#, c-format
msgid "%s: missing colon separator"
-msgstr "%s:缺少冒号分隔符"
+msgstr "%s: 缺少冒号分隔符"
#: bashline.c:4555
#, c-format
msgid "`%s': cannot unbind in command keymap"
-msgstr "“%s”: 无法解除绑定命令键映射"
+msgstr "\"%s\": 无法解除绑定命令键映射"
#: braces.c:327
#, c-format
@@ -124,12 +111,12 @@ msgstr "大括号展开:为 %u 个元素分配内存失败"
#: braces.c:451
#, c-format
msgid "brace expansion: failed to allocate memory for `%s'"
-msgstr "大括号展开:为“%s”分配内存失败"
+msgstr "大括号展开:为 \"%s\"分配内存失败"
#: builtins/alias.def:131 variables.c:1844
#, c-format
msgid "`%s': invalid alias name"
-msgstr "“%s”: 无效的别名"
+msgstr "\"%s\": 无效的别名"
#: builtins/bind.def:122 builtins/bind.def:125
msgid "line editing not enabled"
@@ -138,17 +125,17 @@ msgstr "未启用行编辑"
#: builtins/bind.def:212
#, c-format
msgid "`%s': invalid keymap name"
-msgstr "“%s”: 无效的键映射名"
+msgstr "\"%s\": 无效的键映射名"
#: builtins/bind.def:252
#, c-format
msgid "%s: cannot read: %s"
-msgstr "%s:无法读取: %s"
+msgstr "%s: 无法读取:%s"
#: builtins/bind.def:328 builtins/bind.def:358
#, c-format
msgid "`%s': unknown function name"
-msgstr "“%s”: 未知函数名"
+msgstr "\"%s\": 未知的函数名"
#: builtins/bind.def:336
#, c-format
@@ -159,12 +146,12 @@ msgstr "%s 未与任何键绑定。\n"
#: builtins/bind.def:340
#, c-format
msgid "%s can be invoked via "
-msgstr "%s 可以被调用,通过 "
+msgstr "%s 已被绑定到 "
#: builtins/bind.def:378 builtins/bind.def:395
#, c-format
msgid "`%s': cannot unbind"
-msgstr "“%s”: 无法解除绑定"
+msgstr "\"%s\": 无法解除绑定"
#: builtins/break.def:77 builtins/break.def:119
msgid "loop count"
@@ -172,7 +159,7 @@ msgstr "循环计数"
#: builtins/break.def:139
msgid "only meaningful in a `for', `while', or `until' loop"
-msgstr "仅在 `for', `while', 或者`until' 循环中有意义"
+msgstr "仅在 \"for\"、\"while\" 或者 \"until\" 循环中有意义"
#: builtins/caller.def:136
msgid ""
@@ -187,12 +174,11 @@ msgid ""
msgstr ""
"返回当前子例程调用的上下文。\n"
" \n"
-" 不带有 <表达式> 时,返回 \"$line $filename\"。带有 <表达式> 时,返回\n"
-" \"$line $subroutine $filename\";这个额外的信息可以被用于提供\n"
-" 栈追踪。\n"
+" 不带有 <表达式> 时,返回 \"$line $filename\"。带有 <表达式> 时,\n"
+" 返回 \"$line $subroutine $filename\";这个额外的信息可以用来提供\n"
+" 栈跟踪 (stack trace)。\n"
" \n"
-" <表达式> 表示从当前调用帧需要回去多少个调用帧;顶部帧\n"
-" 是第 0 帧。"
+" <表达式> 的值表示从当前调用帧需要回去多少个调用帧;栈顶帧是第 0 帧。"
#: builtins/cd.def:327
msgid "HOME not set"
@@ -204,7 +190,7 @@ msgstr "参数太多"
#: builtins/cd.def:342
msgid "null directory"
-msgstr "空目录"
+msgstr "空值目录"
#: builtins/cd.def:353
msgid "OLDPWD not set"
@@ -223,37 +209,37 @@ msgstr "警告:"
#: builtins/common.c:148
#, c-format
msgid "%s: usage: "
-msgstr "%s:用法:"
+msgstr "%s: 用法:"
#: builtins/common.c:193 shell.c:516 shell.c:844
#, c-format
msgid "%s: option requires an argument"
-msgstr "%s:选项需要一个参数"
+msgstr "%s: 选项需要一个参数"
#: builtins/common.c:200
#, c-format
msgid "%s: numeric argument required"
-msgstr "%s:需要数字参数"
+msgstr "%s: 需要数值参数"
#: builtins/common.c:207
#, c-format
msgid "%s: not found"
-msgstr "%s:未找到"
+msgstr "%s: 未找到"
#: builtins/common.c:216 shell.c:857
#, c-format
msgid "%s: invalid option"
-msgstr "%s:无效选项"
+msgstr "%s: 无效的选项"
#: builtins/common.c:223
#, c-format
msgid "%s: invalid option name"
-msgstr "%s:无效的选项名"
+msgstr "%s: 无效的选项名"
#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373
#, c-format
msgid "`%s': not a valid identifier"
-msgstr "“%s”: 不是有效的标识符"
+msgstr "\"%s\": 不是有效的标识符"
#: builtins/common.c:240
msgid "invalid octal number"
@@ -265,27 +251,27 @@ msgstr "无效的十六进制数"
#: builtins/common.c:244 expr.c:1569
msgid "invalid number"
-msgstr "无效数字"
+msgstr "无效的数字"
#: builtins/common.c:252
#, c-format
msgid "%s: invalid signal specification"
-msgstr "%s:无效的信号声明"
+msgstr "%s: 无效的信号说明符"
#: builtins/common.c:259
#, c-format
msgid "`%s': not a pid or valid job spec"
-msgstr "“%s”: 不是有效的进程号或者任务声明"
+msgstr "\"%s\": 不是一个 pid 或有效的任务说明符"
#: builtins/common.c:266 error.c:510
#, c-format
msgid "%s: readonly variable"
-msgstr "%s:只读变量"
+msgstr "%s: 只读变量"
#: builtins/common.c:274
#, c-format
msgid "%s: %s out of range"
-msgstr "%s:%s 越界"
+msgstr "%s: %s超出范围"
#: builtins/common.c:274 builtins/common.c:276
msgid "argument"
@@ -294,17 +280,17 @@ msgstr "参数"
#: builtins/common.c:276
#, c-format
msgid "%s out of range"
-msgstr "%s 越界"
+msgstr "%s超出范围"
#: builtins/common.c:284
#, c-format
msgid "%s: no such job"
-msgstr "%s:无此任务"
+msgstr "%s: 无此任务"
#: builtins/common.c:292
#, c-format
msgid "%s: no job control"
-msgstr "%s:无任务控制"
+msgstr "%s: 无任务控制"
#: builtins/common.c:294
msgid "no job control"
@@ -313,78 +299,78 @@ msgstr "无任务控制"
#: builtins/common.c:304
#, c-format
msgid "%s: restricted"
-msgstr "%s:受限的"
+msgstr "%s: 受限"
#: builtins/common.c:306
msgid "restricted"
-msgstr "受限的"
+msgstr "受限"
#: builtins/common.c:314
#, c-format
msgid "%s: not a shell builtin"
-msgstr "%s:不是 shell 内建"
+msgstr "%s: 不是 shell 内建"
#: builtins/common.c:323
#, c-format
msgid "write error: %s"
-msgstr "写错误: %s"
+msgstr "写入错误:%s"
#: builtins/common.c:331
#, c-format
msgid "error setting terminal attributes: %s"
-msgstr "设定终端属性时出错: %s"
+msgstr "设定终端属性时出错:%s"
#: builtins/common.c:333
#, c-format
msgid "error getting terminal attributes: %s"
-msgstr "获取终端属性时出错: %s"
+msgstr "获取终端属性时出错:%s"
#: builtins/common.c:635
#, c-format
msgid "%s: error retrieving current directory: %s: %s\n"
-msgstr "%s:获取当前目录时出错: %s:%s\n"
+msgstr "%s: 获取当前目录时出错:%s:%s\n"
#: builtins/common.c:701 builtins/common.c:703
#, c-format
msgid "%s: ambiguous job spec"
-msgstr "%s:模糊的任务声明"
+msgstr "%s: 有歧义的任务说明符"
#: builtins/common.c:964
msgid "help not available in this version"
-msgstr "此版本内帮助不可用"
+msgstr "帮助在当前版本中不可用"
#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839
#, c-format
msgid "%s: cannot unset: readonly %s"
-msgstr "%s:无法取消设定: 只读 %s"
+msgstr "%s: 无法取消设定:只读%s"
#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844
#, c-format
msgid "%s: cannot unset"
-msgstr "%s:无法取消设定"
+msgstr "%s: 无法取消设定"
#: builtins/complete.def:287
#, c-format
msgid "%s: invalid action name"
-msgstr "%s:无效的动作名"
+msgstr "%s: 无效的动作名"
#: builtins/complete.def:486 builtins/complete.def:634
#: builtins/complete.def:865
#, c-format
msgid "%s: no completion specification"
-msgstr "%s:没有补全声明"
+msgstr "%s: 没有补全规约"
#: builtins/complete.def:688
msgid "warning: -F option may not work as you expect"
-msgstr "警告: -F 选项可能不像您预期的那样工作"
+msgstr "警告:-F 选项可能不像您预期的那样工作"
#: builtins/complete.def:690
msgid "warning: -C option may not work as you expect"
-msgstr "警告: -C 选项可能不像您预期的那样工作"
+msgstr "警告:-C 选项可能不像您预期的那样工作"
#: builtins/complete.def:838
msgid "not currently executing completion function"
-msgstr "当前未执行补全功能"
+msgstr "当前未在执行补全函数"
#: builtins/declare.def:134
msgid "can only be used in a function"
@@ -393,47 +379,47 @@ msgstr "只能在函数中使用"
#: builtins/declare.def:363 builtins/declare.def:756
#, c-format
msgid "%s: reference variable cannot be an array"
-msgstr "%s:引用变量不能为数组"
+msgstr "%s: 引用变量不能为数组"
#: builtins/declare.def:374 variables.c:3385
#, c-format
msgid "%s: nameref variable self references not allowed"
-msgstr "%s:不允许名称引用变量引用自身"
+msgstr "%s: 不允许名称引用变量引用自身"
#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312
#: variables.c:3382
#, c-format
msgid "%s: circular name reference"
-msgstr "%s:循环变量名引用"
+msgstr "%s: 循环的名称引用"
#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773
#, c-format
msgid "`%s': invalid variable name for name reference"
-msgstr "“%s”: 无效的名称引用变量名"
+msgstr "\"%s\": 名称引用变量引用的变量名无效"
#: builtins/declare.def:514
msgid "cannot use `-f' to make functions"
-msgstr "无法用 `-f' 生成函数"
+msgstr "无法用 \"-f\" 生成函数"
#: builtins/declare.def:526 execute_cmd.c:5986
#, c-format
msgid "%s: readonly function"
-msgstr "%s:只读函数"
+msgstr "%s: 只读函数"
#: builtins/declare.def:824
#, c-format
msgid "%s: quoted compound array assignment deprecated"
-msgstr "%s:引号内的复合数组赋值已被弃用"
+msgstr "%s: 带引号的复合数组赋值已被弃用"
#: builtins/declare.def:838
#, c-format
msgid "%s: cannot destroy array variables in this way"
-msgstr "%s:无法以这种方式销毁数组变量"
+msgstr "%s: 无法以这种方式销毁数组变量"
#: builtins/declare.def:845 builtins/read.def:815
#, c-format
msgid "%s: cannot convert associative to indexed array"
-msgstr "%s:无法将关联数组转化为索引数组"
+msgstr "%s: 无法将关联数组转换为索引数组"
#: builtins/enable.def:143 builtins/enable.def:151
msgid "dynamic loading not available"
@@ -442,57 +428,57 @@ msgstr "动态加载不可用"
#: builtins/enable.def:343
#, c-format
msgid "cannot open shared object %s: %s"
-msgstr "无法打开共享对象 %s:%s"
+msgstr "无法打开共享目标 %s:%s"
#: builtins/enable.def:371
#, c-format
msgid "cannot find %s in shared object %s: %s"
-msgstr "无法在共享对象 %2$s 中找到 %1$s: %3$s"
+msgstr "无法在共享目标 %2$s 中找到 %1$s:%3$s"
#: builtins/enable.def:388
#, c-format
msgid "%s: dynamic builtin already loaded"
-msgstr "%s:动态内建已经加载"
+msgstr "%s: 动态内建已经加载"
#: builtins/enable.def:392
#, c-format
msgid "load function for %s returns failure (%d): not loaded"
-msgstr "为 %s 载入函数失败 (%d): 未载入"
+msgstr "%s 的加载函数返回失败 (%d):未加载"
#: builtins/enable.def:517
#, c-format
msgid "%s: not dynamically loaded"
-msgstr "%s:未以动态方式加载"
+msgstr "%s: 未动态加载"
#: builtins/enable.def:543
#, c-format
msgid "%s: cannot delete: %s"
-msgstr "%s:无法删除: %s"
+msgstr "%s: 无法删除:%s"
#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818
#, c-format
msgid "%s: is a directory"
-msgstr "%s:是一个目录"
+msgstr "%s: 是一个目录"
#: builtins/evalfile.c:144
#, c-format
msgid "%s: not a regular file"
-msgstr "%s:不是常规文件"
+msgstr "%s: 不是普通文件"
#: builtins/evalfile.c:153
#, c-format
msgid "%s: file is too large"
-msgstr "%s:文件太大"
+msgstr "%s: 文件太大"
#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647
#, c-format
msgid "%s: cannot execute binary file"
-msgstr "%s:无法执行二进制文件"
+msgstr "%s: 无法执行二进制文件"
#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246
#, c-format
msgid "%s: cannot execute: %s"
-msgstr "%s:无法执行: %s"
+msgstr "%s: 无法执行:%s"
#: builtins/exit.def:64
#, c-format
@@ -501,12 +487,12 @@ msgstr "注销\n"
#: builtins/exit.def:89
msgid "not login shell: use `exit'"
-msgstr "不是登录 shell: 使用 `exit'"
+msgstr "不是登录 shell:使用 \"exit\""
#: builtins/exit.def:121
#, c-format
msgid "There are stopped jobs.\n"
-msgstr "有停止的任务。\n"
+msgstr "有已停止的任务。\n"
#: builtins/exit.def:123
#, c-format
@@ -520,12 +506,12 @@ msgstr "未找到命令"
#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407
#: builtins/fc.def:412
msgid "history specification"
-msgstr "历史声明"
+msgstr "历史说明符"
#: builtins/fc.def:444
#, c-format
msgid "%s: cannot open temp file: %s"
-msgstr "%s:无法打开临时文件: %s"
+msgstr "%s: 无法打开临时文件:%s"
#: builtins/fg_bg.def:152 builtins/jobs.def:284
msgid "current"
@@ -539,12 +525,12 @@ msgstr "在不带任务控制的情况下启动了任务 %d"
#: builtins/getopt.c:110
#, c-format
msgid "%s: illegal option -- %c\n"
-msgstr "%s:非法选项 -- %c\n"
+msgstr "%s: 非法的选项 -- %c\n"
#: builtins/getopt.c:111
#, c-format
msgid "%s: option requires an argument -- %c\n"
-msgstr "%s:选项需要一个参数 -- %c\n"
+msgstr "%s: 选项需要一个参数 -- %c\n"
#: builtins/hash.def:91
msgid "hashing disabled"
@@ -553,7 +539,7 @@ msgstr "已禁用哈希"
#: builtins/hash.def:139
#, c-format
msgid "%s: hash table empty\n"
-msgstr "%s:哈希表为空\n"
+msgstr "%s: 哈希表为空\n"
#: builtins/hash.def:267
#, c-format
@@ -563,25 +549,25 @@ msgstr "命中\t命令\n"
#: builtins/help.def:133
msgid "Shell commands matching keyword `"
msgid_plural "Shell commands matching keywords `"
-msgstr[0] "Shell 命令匹配关键字“"
+msgstr[0] "匹配关键字 \""
#: builtins/help.def:135
msgid ""
"'\n"
"\n"
msgstr ""
-"”\n"
+"\" 的 shell 命令\n"
"\n"
#: builtins/help.def:185
#, c-format
msgid "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
-msgstr "没有与“%s”匹配的帮助主题。尝试使用“help help”、“man -k %s”或“info %s”。"
+msgstr "没有与 \"%s\" 匹配的帮助主题。尝试使用 \"help help\" 或 \"man -k %s\" 或 \"info %s\"。"
#: builtins/help.def:224
#, c-format
msgid "%s: cannot open: %s"
-msgstr "%s:无法打开: %s"
+msgstr "%s: 无法打开:%s"
#: builtins/help.def:524
#, c-format
@@ -594,12 +580,12 @@ msgid ""
"A star (*) next to a name means that the command is disabled.\n"
"\n"
msgstr ""
-"这些 shell 命令是内部定义的。请输入 `help' 以获取一个列表。\n"
-"输入 `help 名称' 以得到有关函数`名称'的更多信息。\n"
-"使用 `info bash' 来获得关于 shell 的更多一般性信息。\n"
-"使用 `man -k' 或 `info' 来获取不在列表中的命令的更多信息。\n"
+"这些 shell 命令是内部定义的。输入 \"help\" 以获取本列表。\n"
+"输入 \"help 名称\" 以得到有关函数 \"名称\" 的更多信息。\n"
+"使用 \"info bash\" 来获得关于 shell 的更多一般性信息。\n"
+"使用 \"man -k\" 或 \"info\" 来获取不在本列表中的命令的更多信息。\n"
"\n"
-"名称旁边的星号(*)表示该命令被禁用。\n"
+"名称旁边的星号 (*) 表示该命令被禁用。\n"
"\n"
#: builtins/history.def:155
@@ -614,26 +600,26 @@ msgstr "历史位置"
#: builtins/history.def:340
#, c-format
msgid "%s: invalid timestamp"
-msgstr "%s:无效时间戳"
+msgstr "%s: 无效的时间戳"
#: builtins/history.def:451
#, c-format
msgid "%s: history expansion failed"
-msgstr "%s:历史扩展失败"
+msgstr "%s: 历史展开失败"
#: builtins/inlib.def:71
#, c-format
msgid "%s: inlib failed"
-msgstr "%s:inlib 失败"
+msgstr "%s: inlib 失败"
#: builtins/jobs.def:109
msgid "no other options allowed with `-x'"
-msgstr "其他选项不能与 `-x' 同时使用"
+msgstr "其他选项不能与 \"-x\" 同时使用"
#: builtins/kill.def:211
#, c-format
msgid "%s: arguments must be process or job IDs"
-msgstr "%s:参数必须是进程或任务 ID"
+msgstr "%s: 参数必须是进程或任务 ID"
#: builtins/kill.def:274
msgid "Unknown error"
@@ -646,36 +632,36 @@ msgstr "需要表达式"
#: builtins/mapfile.def:178
#, c-format
msgid "%s: not an indexed array"
-msgstr "%s:不是一个索引数组"
+msgstr "%s: 不是一个索引数组"
#: builtins/mapfile.def:271 builtins/read.def:308
#, c-format
msgid "%s: invalid file descriptor specification"
-msgstr "%s:无效的文件描述符声明"
+msgstr "%s: 指定的文件描述符无效"
#: builtins/mapfile.def:279 builtins/read.def:315
#, c-format
msgid "%d: invalid file descriptor: %s"
-msgstr "%d: 无效的文件描述符: %s"
+msgstr "%d: 无效的文件描述符:%s"
#: builtins/mapfile.def:288 builtins/mapfile.def:326
#, c-format
msgid "%s: invalid line count"
-msgstr "%s:无效的行数"
+msgstr "%s: 无效的行数"
#: builtins/mapfile.def:299
#, c-format
msgid "%s: invalid array origin"
-msgstr "%s:无效的数组基数"
+msgstr "%s: 无效的数组起始"
#: builtins/mapfile.def:316
#, c-format
msgid "%s: invalid callback quantum"
-msgstr "%s:无效的回调量子"
+msgstr "%s: 无效的回调间隔"
#: builtins/mapfile.def:349
msgid "empty array variable name"
-msgstr "空数组变量名"
+msgstr "空的数组变量名"
#: builtins/mapfile.def:370
msgid "array variable support required"
@@ -684,31 +670,31 @@ msgstr "需要数组变量支持"
#: builtins/printf.def:419
#, c-format
msgid "`%s': missing format character"
-msgstr "“%s”: 缺少格式字符"
+msgstr "\"%s\": 缺少格式字符"
#: builtins/printf.def:474
#, c-format
msgid "`%c': invalid time format specification"
-msgstr "“%c”:无效的时间格式声明"
+msgstr "\"%c\": 指定的时间格式无效"
#: builtins/printf.def:676
#, c-format
msgid "`%c': invalid format character"
-msgstr "“%c”:无效格式字符"
+msgstr "\"%c\": 无效的格式字符"
#: builtins/printf.def:702
#, c-format
msgid "warning: %s: %s"
-msgstr "警告: %s:%s"
+msgstr "警告:%s: %s"
#: builtins/printf.def:788
#, c-format
msgid "format parsing problem: %s"
-msgstr "格式解析问题: %s"
+msgstr "格式解析出现问题:%s"
#: builtins/printf.def:885
msgid "missing hex digit for \\x"
-msgstr "使用了 \\x 但缺少十六进制位"
+msgstr "使用了 \\x 但缺少十六进制数"
#: builtins/printf.def:900
#, c-format
@@ -722,7 +708,7 @@ msgstr "无其他目录"
#: builtins/pushd.def:360
#, c-format
msgid "%s: invalid argument"
-msgstr "%s:无效参数"
+msgstr "%s: 无效的参数"
#: builtins/pushd.def:480
msgid "<no current directory>"
@@ -757,24 +743,22 @@ msgid ""
" -N\tDisplays the Nth entry counting from the right of the list shown by\n"
"\tdirs when invoked without options, starting with zero."
msgstr ""
-"显示当前记住的目录列表。 目录\n"
-" 通过 `pushd' 命令加入这个列表;您可以\n"
-" 使用 `popd' 命令对列表进行遍历。\n"
-" \n"
-" 选项:\n"
-" -c\t删除所有元素以清除目录栈\n"
-" -l\t不打印与家目录相关的以波浪号\n"
-" \t为前缀的目录\n"
+"显示当前记住的目录列表。 使用 \"pushd\" 命令将目录加入这个列表;\n"
+" 使用 \"popd\" 命令逐个回到之前加入列表的目录。\n"
+" \n"
+" 选项:\n"
+" -c\t删除所有元素以清空目录栈\n"
+" -l\t打印目录时,不表示为以波浪号 (~) 为前缀的,\n"
+" \t相对于您的主目录的路径\n"
" -p\t每行一个条目打印目录栈\n"
-" -v\t以栈位置为前缀,每行一个条目\n"
-" \t打印目录栈\n"
+" -v\t每行一个条目打印目录栈,前面加上在栈中的位置\n"
" \n"
-" 参数:\n"
-" +N\t以 dirs 不带选项输出的顺序显示列表从左起第N个条目,\n"
-" \t从 0 开始。\n"
+" 参数:\n"
+" +N\t显示 dirs 不带选项启动时显示的目录列表中左起第 N 个目录,\n"
+" \t从零开始。\n"
" \n"
-" -N\t以 dirs 不带选项输出的顺序显示列表从右起第N个项目,\n"
-"\t从 0 开始。"
+" -N\t显示 dirs 不带选项启动时显示的目录列表中右起第 N 个目录,\n"
+" \t从零开始。"
#: builtins/pushd.def:723
msgid ""
@@ -800,27 +784,23 @@ msgid ""
" \n"
" The `dirs' builtin displays the directory stack."
msgstr ""
-"在目录栈顶部加入一个目录,或者论询\n"
-" 目录栈,是当前工作目录成为新的栈顶\n"
-" 不带参数时,交换栈顶的两个目录。\n"
+"将目录添加到目录栈顶,或着旋转栈直到当前工作目录成为\n"
+" 新的栈顶。不带参数时,交换栈顶的两个目录。\n"
" \n"
" 选项:\n"
-" -n\t抑制增加栈中目录时通常的改变目录的操作,\n"
-" \t从而只进行栈操作。\n"
+" -n\t阻止添加目录至栈时通常的改变目录操作,从而仅对栈\n"
+" \t进行操作。\n"
" \n"
" 参数:\n"
-" +N\t轮转栈使得第N个目录(`dirs' 的\n"
-" \t输出列表中左起,从0开始)\n"
-" \t升至栈顶。\n"
+" +N\t旋转栈,使得第 N 个目录(\"dirs\" 显示的列表中左起,\n"
+" \t从零开始)移动到栈顶。\n"
" \n"
-" -N\t轮转栈使得第N个目录(`dirs' 的\n"
-" \t输出列表中右起,从0开始)\n"
-" \t升至栈顶\n"
+" -N\t旋转栈,使得第 N 个目录(\"dirs\" 显示的列表中右起,\n"
+" \t从零开始)移动到栈顶。\n"
" \n"
-" dir\t添加目录至栈顶,并\n"
-" \t使其成为新的当前工作目录。\n"
+" 目录\t将 <目录> 添加到栈顶,使其成为当前工作目录。\n"
" \n"
-" `dirs' 内建命令显示目录栈."
+" \"dirs\" 内建可以显示目录栈。"
#: builtins/pushd.def:748
msgid ""
@@ -842,37 +822,33 @@ msgid ""
" \n"
" The `dirs' builtin displays the directory stack."
msgstr ""
-"从目录栈中删除条目。不带参数时,删除\n"
-" 栈顶目录并改变至新的栈顶目录。\n"
+"从目录栈中删除条目。不带参数时,删除栈顶目录,并改变目录至新的栈顶目录。\n"
" \n"
" 选项:\n"
-" -n\t抑制从栈中删除目录时通常的改变目录操作,\n"
-" \t从而只进行栈操作。\n"
+" -n\t阻止从栈中删除目录时通常的改变目录操作,从而仅对栈进行操作。\n"
" \n"
" 参数:\n"
-" +N\t从 `dirs' 输出的列表中,\n"
-" \t删除左起第N个条目,计数从0开始。例如:`popd +0'\n"
-" \t删除第一个目录,`popd +1' 删除第二个。\n"
+" +N\t删除第 N 个目录(\"dirs\" 显示的列表中左起,从零开始)。\n"
+" \t例如:\"popd +0\" 删除第一个目录,\"popd +1\" 删除第二个。\n"
" \n"
-" -N\t从 `dirs' 输出的列表中,\n"
-" \t删除右起第N个条目,计数从0开始,例如:`popd -0'\n"
-" \t删除最后一个条目,`popd -1' 删除倒数第二个。\n"
+" -N\t删除第 N 个目录(\"dirs\" 显示的列表中右起,从零开始)。\n"
+" \t例如:\"popd -0\" 删除最后一个目录,\"popd -1\" 删除倒数第二个。\n"
" \n"
-" `dirs' 内建变量显示目录栈。"
+" \"dirs\" 内建可以显示目录栈。"
#: builtins/read.def:280
#, c-format
msgid "%s: invalid timeout specification"
-msgstr "%s:无效的超时声明"
+msgstr "%s: 指定的超时时间无效"
#: builtins/read.def:755
#, c-format
msgid "read error: %d: %s"
-msgstr "读错误: %d: %s"
+msgstr "读取错误:%d: %s"
#: builtins/return.def:68
msgid "can only `return' from a function or sourced script"
-msgstr "只能从函数或者源脚本返回(`return')"
+msgstr "只能在函数或者被 source 的脚本中使用 \"return\""
#: builtins/set.def:869
msgid "cannot simultaneously unset a function and a variable"
@@ -881,21 +857,21 @@ msgstr "无法同时取消设定一个函数和一个变量"
#: builtins/set.def:966
#, c-format
msgid "%s: not an array variable"
-msgstr "%s:不是数组变量"
+msgstr "%s: 不是数组变量"
#: builtins/setattr.def:189
#, c-format
msgid "%s: not a function"
-msgstr "%s:不是函数"
+msgstr "%s: 不是函数"
#: builtins/setattr.def:194
#, c-format
msgid "%s: cannot export"
-msgstr "%s:无法导出"
+msgstr "%s: 无法导出"
#: builtins/shift.def:72 builtins/shift.def:79
msgid "shift count"
-msgstr "位移计数"
+msgstr "移位次数"
#: builtins/shopt.def:310
msgid "cannot set and unset shell options simultaneously"
@@ -904,7 +880,7 @@ msgstr "无法同时设定和取消设定 shell 选项"
#: builtins/shopt.def:428
#, c-format
msgid "%s: invalid shell option name"
-msgstr "%s:无效的 shell 选项名"
+msgstr "%s: 无效的 shell 选项名"
#: builtins/source.def:128
msgid "filename argument required"
@@ -913,7 +889,7 @@ msgstr "需要文件名参数"
#: builtins/source.def:154
#, c-format
msgid "%s: file not found"
-msgstr "%s:文件未找到"
+msgstr "%s: 未找到文件"
#: builtins/suspend.def:102
msgid "cannot suspend"
@@ -926,7 +902,7 @@ msgstr "无法挂起一个登录 shell"
#: builtins/type.def:235
#, c-format
msgid "%s is aliased to `%s'\n"
-msgstr "%s 是“%s”的别名\n"
+msgstr "%s 是 \"%s\" 的别名\n"
#: builtins/type.def:256
#, c-format
@@ -961,26 +937,26 @@ msgstr "%s 已被录入哈希表 (%s)\n"
#: builtins/ulimit.def:400
#, c-format
msgid "%s: invalid limit argument"
-msgstr "%s:无效的 limit 参数"
+msgstr "%s: 无效的限制参数"
#: builtins/ulimit.def:426
#, c-format
msgid "`%c': bad command"
-msgstr "“%c”:命令错误"
+msgstr "\"%c\": 错误的命令"
#: builtins/ulimit.def:455
#, c-format
msgid "%s: cannot get limit: %s"
-msgstr "%s:无法获取 limit 值: %s"
+msgstr "%s: 无法获取限制:%s"
#: builtins/ulimit.def:481
msgid "limit"
-msgstr "limit"
+msgstr "限制"
#: builtins/ulimit.def:493 builtins/ulimit.def:793
#, c-format
msgid "%s: cannot modify limit: %s"
-msgstr "%s:无法修改 limit 值: %s"
+msgstr "%s: 无法修改限制:%s"
#: builtins/umask.def:115
msgid "octal number"
@@ -989,32 +965,32 @@ msgstr "八进制数"
#: builtins/umask.def:232
#, c-format
msgid "`%c': invalid symbolic mode operator"
-msgstr "“%c”:无效的符号状态运算符"
+msgstr "\"%c\": 无效的符号模式运算符"
#: builtins/umask.def:287
#, c-format
msgid "`%c': invalid symbolic mode character"
-msgstr "“%c”:无效的符号状态字符"
+msgstr "\"%c\": 无效的符号模式字符"
#: error.c:89 error.c:347 error.c:349 error.c:351
msgid " line "
-msgstr "行"
+msgstr " 行 "
#: error.c:164
#, c-format
msgid "last command: %s\n"
-msgstr "上一个命令: %s\n"
+msgstr "上一个命令:%s\n"
#: error.c:172
#, c-format
msgid "Aborting..."
-msgstr "中止..."
+msgstr "正在中止..."
#. TRANSLATORS: this is a prefix for informational messages.
#: error.c:287
#, c-format
msgid "INFORM: "
-msgstr "报告:"
+msgstr "信息:"
#: error.c:462
msgid "unknown command error"
@@ -1035,21 +1011,21 @@ msgstr "错误的跳转"
#: error.c:503
#, c-format
msgid "%s: unbound variable"
-msgstr "%s:未绑定的变量"
+msgstr "%s: 未绑定的变量"
#: eval.c:242
msgid "\atimed out waiting for input: auto-logout\n"
-msgstr "\a 等待输入超时:自动注销\n"
+msgstr "\a等待输入超时:自动注销\n"
#: execute_cmd.c:537
#, c-format
msgid "cannot redirect standard input from /dev/null: %s"
-msgstr "无法从 /dev/null 重定向标准输入: %s"
+msgstr "无法从 /dev/null 重定向标准输入:%s"
#: execute_cmd.c:1297
#, c-format
msgid "TIMEFORMAT: `%c': invalid format character"
-msgstr "时间格式: `%c': 无效的格式字符"
+msgstr "时间格式:\"%c\": 无效的格式字符"
#: execute_cmd.c:2362
#, c-format
@@ -1068,42 +1044,42 @@ msgstr "eval: 超出最大 eval 嵌套层数 (%d)"
#: execute_cmd.c:4805
#, c-format
msgid "%s: maximum source nesting level exceeded (%d)"
-msgstr "%s:超出最大 source 嵌套层数 (%d)"
+msgstr "%s: 超出最大 source 嵌套层数 (%d)"
#: execute_cmd.c:4913
#, c-format
msgid "%s: maximum function nesting level exceeded (%d)"
-msgstr "%s:超出最大函数嵌套层数 (%d)"
+msgstr "%s: 超出最大函数嵌套层数 (%d)"
#: execute_cmd.c:5467
#, c-format
msgid "%s: restricted: cannot specify `/' in command names"
-msgstr "%s:受限的: 无法在命令名中使用 `/'"
+msgstr "%s: 受限:无法在命令名中使用 \"/\""
#: execute_cmd.c:5574
#, c-format
msgid "%s: command not found"
-msgstr "%s:未找到命令"
+msgstr "%s: 未找到命令"
#: execute_cmd.c:5816
#, c-format
msgid "%s: %s"
-msgstr "%s:%s"
+msgstr "%s: %s"
#: execute_cmd.c:5854
#, c-format
msgid "%s: %s: bad interpreter"
-msgstr "%s:%s:解释器错误"
+msgstr "%s: %s: 错误的解释器"
#: execute_cmd.c:5891
#, c-format
msgid "%s: cannot execute binary file: %s"
-msgstr "%s:无法执行二进制文件: %s"
+msgstr "%s: 无法执行二进制文件:%s"
#: execute_cmd.c:5977
#, c-format
msgid "`%s': is a special builtin"
-msgstr "“%s”: 特殊内建"
+msgstr "\"%s\": 是特殊内建"
#: execute_cmd.c:6029
#, c-format
@@ -1112,7 +1088,7 @@ msgstr "无法复制文件描述符 %d 到文件描述符 %d"
#: expr.c:263
msgid "expression recursion level exceeded"
-msgstr "表达式递归层次越界"
+msgstr "超出表达式递归层数上限"
#: expr.c:291
msgid "recursion stack underflow"
@@ -1136,11 +1112,11 @@ msgstr "除以 0"
#: expr.c:592
msgid "bug: bad expassign token"
-msgstr "错误:表达式赋值符号错误"
+msgstr "bug: 错误的表达式赋值记号"
#: expr.c:646
msgid "`:' expected for conditional expression"
-msgstr "条件表达式需要 `:'"
+msgstr "条件表达式需要 \":\""
#: expr.c:972
msgid "exponent less than 0"
@@ -1148,28 +1124,28 @@ msgstr "指数小于 0"
#: expr.c:1029
msgid "identifier expected after pre-increment or pre-decrement"
-msgstr "预增符或预减符后应跟有标识符"
+msgstr "前缀自增或前缀自减运算符之后需要标识符"
#: expr.c:1056
msgid "missing `)'"
-msgstr "缺少“)”"
+msgstr "缺少 \")\""
#: expr.c:1107 expr.c:1487
msgid "syntax error: operand expected"
-msgstr "语法错误: 需要操作数"
+msgstr "语法错误:需要操作数"
#: expr.c:1489
msgid "syntax error: invalid arithmetic operator"
-msgstr "语法错误: 无效的算术运算符"
+msgstr "语法错误:无效的算术运算符"
#: expr.c:1513
#, c-format
msgid "%s%s%s: %s (error token is \"%s\")"
-msgstr "%s%s%s:%s (错误符号是 \"%s\")"
+msgstr "%s%s%s: %s(错误记号是 \"%s\")"
#: expr.c:1573
msgid "invalid arithmetic base"
-msgstr "无效的算术进制"
+msgstr "无效的算术底数"
#: expr.c:1582
msgid "invalid integer constant"
@@ -1177,12 +1153,12 @@ msgstr "无效的整数常数"
#: expr.c:1598
msgid "value too great for base"
-msgstr "数值太大不可为算术进制的基"
+msgstr "值对于底数而言过大"
#: expr.c:1647
#, c-format
msgid "%s: expression error\n"
-msgstr "%s:表达式错误\n"
+msgstr "%s: 表达式错误\n"
#: general.c:70
msgid "getcwd: cannot access parent directories"
@@ -1191,17 +1167,17 @@ msgstr "getcwd: 无法访问父目录"
#: input.c:99 subst.c:6069
#, c-format
msgid "cannot reset nodelay mode for fd %d"
-msgstr "无法为文件描述符 %d 重置nodelay模式"
+msgstr "无法为文件描述符 %d 重置 nodelay 模式"
#: input.c:266
#, c-format
msgid "cannot allocate new file descriptor for bash input from fd %d"
-msgstr "无法从文件描述符 %d 为 bash 的输入获取一个新的文件描述符"
+msgstr "无法从文件描述符 %d 为 bash 的输入分配一个新的文件描述符"
#: input.c:274
#, c-format
msgid "save_bash_input: buffer already exists for new fd %d"
-msgstr "save_bash_input: 已经存在新的文件描述符 %d 的缓冲区"
+msgstr "save_bash_input: 新的文件描述符 %d 的缓冲区已存在"
#: jobs.c:543
msgid "start_pipeline: pgrp pipe"
@@ -1220,7 +1196,7 @@ msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next"
#: jobs.c:1283
#, c-format
msgid "forked pid %d appears in running job %d"
-msgstr "叉分 (fork) 出的的进程号 %d 出现在运行中的任务 %d 中"
+msgstr "进程复制 (fork) 产生的 pid %d 出现在运行中的任务 %d 中"
#: jobs.c:1402
#, c-format
@@ -1230,12 +1206,12 @@ msgstr "删除进程组 %2$ld 中已停止的任务 %1$d"
#: jobs.c:1511
#, c-format
msgid "add_process: pid %5ld (%s) marked as still alive"
-msgstr "add_process: 进程号 %5ld(%s) 标注为仍活着"
+msgstr "add_process: pid %5ld (%s) 标记为仍存活"
#: jobs.c:1850
#, c-format
msgid "describe_pid: %ld: no such pid"
-msgstr "describe_pid: %ld: 无此进程号"
+msgstr "describe_pid: %ld: 无此 pid"
#: jobs.c:1865
#, c-format
@@ -1281,22 +1257,22 @@ msgstr "(核心已转储)"
#: jobs.c:2020
#, c-format
msgid " (wd: %s)"
-msgstr " (工作目录: %s)"
+msgstr " (工作目录:%s)"
#: jobs.c:2259
#, c-format
msgid "child setpgid (%ld to %ld)"
-msgstr "子进程 setpgid (%ld 到 %ld)"
+msgstr "子进程 setpgid(%ld 到 %ld)"
#: jobs.c:2617 nojobs.c:664
#, c-format
msgid "wait: pid %ld is not a child of this shell"
-msgstr "wait: 进程号 %ld 不是当前 shell 的子进程"
+msgstr "wait: pid %ld 不是当前 shell 的子进程"
#: jobs.c:2893
#, c-format
msgid "wait_for: No record of process %ld"
-msgstr "wiat_for: 没有进程 %ld 的记录"
+msgstr "wait_for: 没有进程 %ld 的记录"
#: jobs.c:3236
#, c-format
@@ -1306,17 +1282,17 @@ msgstr "wait_for_job: 任务 %d 已停止"
#: jobs.c:3564
#, c-format
msgid "%s: no current jobs"
-msgstr "%s:无当前任务"
+msgstr "%s: 无当前任务"
#: jobs.c:3571
#, c-format
msgid "%s: job has terminated"
-msgstr "%s:任务已经终止"
+msgstr "%s: 任务已经终止"
#: jobs.c:3580
#, c-format
msgid "%s: job %d already in background"
-msgstr "%s:任务 %d 已在后台"
+msgstr "%s: 任务 %d 已在后台"
#: jobs.c:3806
msgid "waitchld: turning on WNOHANG to avoid indefinite block"
@@ -1325,7 +1301,7 @@ msgstr "waitchld: 打开 WNOHANG 以避免无限阻塞"
#: jobs.c:4320
#, c-format
msgid "%s: line %d: "
-msgstr "%s:行 %d: "
+msgstr "%s: 第 %d 行:"
#: jobs.c:4334 nojobs.c:919
#, c-format
@@ -1335,7 +1311,7 @@ msgstr "(核心已转储)"
#: jobs.c:4346 jobs.c:4359
#, c-format
msgid "(wd now: %s)\n"
-msgstr "(当前工作目录:%s)\n"
+msgstr "(当前工作目录:%s)\n"
#: jobs.c:4391
msgid "initialize_job_control: getpgrp failed"
@@ -1356,7 +1332,7 @@ msgstr "initialize_job_control: setpgid"
#: jobs.c:4494 jobs.c:4503
#, c-format
msgid "cannot set terminal process group (%d)"
-msgstr "无法设定终端进程组(%d)"
+msgstr "无法设定终端进程组 (%d)"
#: jobs.c:4508
msgid "no job control in this shell"
@@ -1365,7 +1341,7 @@ msgstr "此 shell 中无任务控制"
#: lib/malloc/malloc.c:353
#, c-format
msgid "malloc: failed assertion: %s\n"
-msgstr "malloc: 断言失败: %s\n"
+msgstr "malloc: 断言失败:%s\n"
#: lib/malloc/malloc.c:369
#, c-format
@@ -1374,7 +1350,7 @@ msgid ""
"malloc: %s:%d: assertion botched\r\n"
msgstr ""
"\r\n"
-"malloc: %s:%d:断言已修补\r\n"
+"malloc: %s:%d: 断言已搞砸\r\n"
#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933
msgid "unknown"
@@ -1382,11 +1358,11 @@ msgstr "未知"
#: lib/malloc/malloc.c:882
msgid "malloc: block on free list clobbered"
-msgstr "malloc: 空闲链表中的块损坏"
+msgstr "malloc: 空闲列表中的块损坏"
#: lib/malloc/malloc.c:972
msgid "free: called with already freed block argument"
-msgstr "free:调用时用了已经释放的块作为参数"
+msgstr "free: 调用时用了已经释放的块作为参数"
#: lib/malloc/malloc.c:975
msgid "free: called with unallocated block argument"
@@ -1394,7 +1370,7 @@ msgstr "free: 调用时用了未分配的块作为参数"
#: lib/malloc/malloc.c:994
msgid "free: underflow detected; mh_nbytes out of range"
-msgstr "free: 检测到下溢;mh_nbytes 越界"
+msgstr "free: 检测到下溢;mh_nbytes 超出范围"
#: lib/malloc/malloc.c:1001
msgid "free: underflow detected; magic8 corrupted"
@@ -1402,15 +1378,15 @@ msgstr "free: 检测到下溢;magic8 损坏"
#: lib/malloc/malloc.c:1009
msgid "free: start and end chunk sizes differ"
-msgstr "free: 其实和末尾块大小不一致"
+msgstr "free: 起始和末尾组块大小不一致"
#: lib/malloc/malloc.c:1119
msgid "realloc: called with unallocated block argument"
-msgstr "realloc:调用时用了未分配的块作为参数"
+msgstr "realloc: 调用时用了未分配的块作为参数"
#: lib/malloc/malloc.c:1134
msgid "realloc: underflow detected; mh_nbytes out of range"
-msgstr "realloc: 检测到下溢;mh_nbytes 越界"
+msgstr "realloc: 检测到下溢;mh_nbytes 超出范围"
#: lib/malloc/malloc.c:1141
msgid "realloc: underflow detected; magic8 corrupted"
@@ -1418,41 +1394,41 @@ msgstr "realloc: 检测到下溢;magic8 损坏"
#: lib/malloc/malloc.c:1150
msgid "realloc: start and end chunk sizes differ"
-msgstr "realloc: 其实和末尾块大小不一致"
+msgstr "realloc: 起始和末尾组块大小不一致"
#: lib/malloc/table.c:191
#, c-format
msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
-msgstr "register_alloc: 分配表已经充满了 FIND_ALLOC?\n"
+msgstr "register_alloc: 使用 FIND_ALLOC 时分配表已满?\n"
#: lib/malloc/table.c:200
#, c-format
msgid "register_alloc: %p already in table as allocated?\n"
-msgstr "register_alloc: %p 在表中显示为已分配?\n"
+msgstr "register_alloc: %p 已在表中显示为已分配?\n"
#: lib/malloc/table.c:253
#, c-format
msgid "register_free: %p already in table as free?\n"
-msgstr "register_free: %p 在表中显示为已释放?\n"
+msgstr "register_free: %p 已在表中显示为未分配?\n"
#: lib/sh/fmtulong.c:102
msgid "invalid base"
-msgstr "无效的基"
+msgstr "无效的底数"
#: lib/sh/netopen.c:168
#, c-format
msgid "%s: host unknown"
-msgstr "%s:未知主机"
+msgstr "%s: 未知的主机"
#: lib/sh/netopen.c:175
#, c-format
msgid "%s: invalid service"
-msgstr "%s:无效的服务"
+msgstr "%s: 无效的服务"
#: lib/sh/netopen.c:306
#, c-format
msgid "%s: bad network path specification"
-msgstr "%s:错误的网络路径声明"
+msgstr "%s: 指定的网络路径无效"
#: lib/sh/netopen.c:347
msgid "network operations not supported"
@@ -1461,22 +1437,22 @@ msgstr "不支持网络操作"
#: locale.c:217
#, c-format
msgid "setlocale: LC_ALL: cannot change locale (%s)"
-msgstr "setlocale:LC_ALL:无法改变区域选项 (%s)"
+msgstr "setlocale: LC_ALL: 无法改变区域选项 (%s)"
#: locale.c:219
#, c-format
msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
-msgstr "setlocale:LC_ALL:无法改变区域选项 (%s):%s"
+msgstr "setlocale: LC_ALL: 无法改变区域选项 (%s):%s"
#: locale.c:292
#, c-format
msgid "setlocale: %s: cannot change locale (%s)"
-msgstr "setlocale:%s:无法改变区域选项 (%s)"
+msgstr "setlocale: %s: 无法改变区域选项 (%s)"
#: locale.c:294
#, c-format
msgid "setlocale: %s: cannot change locale (%s): %s"
-msgstr "setlocale:%s:无法改变区域选项 (%s):%s"
+msgstr "setlocale: %s: 无法改变区域选项 (%s):%s"
#: mailcheck.c:439
msgid "You have mail in $_"
@@ -1497,50 +1473,51 @@ msgstr "语法错误:需要算术表达式"
#: make_cmd.c:319
msgid "syntax error: `;' unexpected"
-msgstr "语法错误:需要 `;'"
+msgstr "语法错误:未预期的 \";\""
#: make_cmd.c:320
#, c-format
msgid "syntax error: `((%s))'"
-msgstr "语法错误:`((%s))'"
+msgstr "语法错误:\"((%s))\""
#: make_cmd.c:572
#, c-format
msgid "make_here_document: bad instruction type %d"
-msgstr "make_here_document:错误的指令类型 %d"
+msgstr "make_here_document: 错误的指令类型 %d"
#: make_cmd.c:657
#, c-format
msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
-msgstr "立即文档在第 %d 行被文件结束符分隔 (需要“%s”)"
+msgstr "立即文档在第 %d 行被文件结束符分隔(需要 \"%s\")"
#: make_cmd.c:756
#, c-format
msgid "make_redirection: redirection instruction `%d' out of range"
-msgstr "make_redirection:重定向指令“%d”越界"
+msgstr "make_redirection: 重定向指令 \"%d\" 超出范围"
#: parse.y:2393
#, c-format
msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated"
-msgstr "shell_getc:shell_input_line_size (%zu) 超过 SIZE_MAX (%lu):行被截断"
+msgstr "shell_getc: shell_input_line_size (%zu) 超过 SIZE_MAX (%lu):行已被截断"
#: parse.y:2826
msgid "maximum here-document count exceeded"
-msgstr "超出最大立即文档数量"
+msgstr "超出最大立即文档计数"
+# %c 可能为引号
#: parse.y:3581 parse.y:3957 parse.y:4556
#, c-format
msgid "unexpected EOF while looking for matching `%c'"
-msgstr "寻找匹配的“%c”时遇到了未预期的文件结束符"
+msgstr "寻找匹配的 `%c' 时遇到了未预期的 EOF"
#: parse.y:4696
msgid "unexpected EOF while looking for `]]'"
-msgstr "寻找“]]”时遇到了未预期的文件结束符"
+msgstr "寻找 \"]]\" 时遇到了未预期的 EOF"
#: parse.y:4701
#, c-format
msgid "syntax error in conditional expression: unexpected token `%s'"
-msgstr "条件表达式中有语法错误:未预期的符号“%s”"
+msgstr "条件表达式中有语法错误:未预期的记号 \"%s\""
#: parse.y:4705
msgid "syntax error in conditional expression"
@@ -1549,16 +1526,16 @@ msgstr "条件表达式中有语法错误"
#: parse.y:4783
#, c-format
msgid "unexpected token `%s', expected `)'"
-msgstr "未预期的符号“%s” ,需要“)”"
+msgstr "未预期的记号 \"%s\",需要 \")\""
#: parse.y:4787
msgid "expected `)'"
-msgstr "需要“)”"
+msgstr "需要 \")\""
#: parse.y:4815
#, c-format
msgid "unexpected argument `%s' to conditional unary operator"
-msgstr "一元条件运算符使用了未预期的参数“%s”"
+msgstr "一元条件运算符使用了未预期的参数 \"%s\""
#: parse.y:4819
msgid "unexpected argument to conditional unary operator"
@@ -1567,7 +1544,7 @@ msgstr "一元条件运算符使用了未预期的参数"
#: parse.y:4865
#, c-format
msgid "unexpected token `%s', conditional binary operator expected"
-msgstr "未预期的符号“%s”,需要二元条件运算符"
+msgstr "未预期的记号 \"%s\",需要二元条件运算符"
#: parse.y:4869
msgid "conditional binary operator expected"
@@ -1576,7 +1553,7 @@ msgstr "需要二元条件运算符"
#: parse.y:4891
#, c-format
msgid "unexpected argument `%s' to conditional binary operator"
-msgstr "二元条件运算符使用了未预期的参数“%s”"
+msgstr "二元条件运算符使用了未预期的参数 \"%s\""
#: parse.y:4895
msgid "unexpected argument to conditional binary operator"
@@ -1585,31 +1562,31 @@ msgstr "二元条件运算符使用了未预期的参数"
#: parse.y:4906
#, c-format
msgid "unexpected token `%c' in conditional command"
-msgstr "条件命令中有未预期的符号“%c”"
+msgstr "条件命令中有未预期的记号 \"%c\""
#: parse.y:4909
#, c-format
msgid "unexpected token `%s' in conditional command"
-msgstr "条件命令中有未预期的符号“%s”"
+msgstr "条件命令中有未预期的记号 \"%s\""
#: parse.y:4913
#, c-format
msgid "unexpected token %d in conditional command"
-msgstr "条件命令中有未预期的符号 %d"
+msgstr "条件命令中有未预期的记号 %d"
#: parse.y:6336
#, c-format
msgid "syntax error near unexpected token `%s'"
-msgstr "未预期的符号“%s”附近有语法错误"
+msgstr "未预期的记号 \"%s\" 附近有语法错误"
#: parse.y:6355
#, c-format
msgid "syntax error near `%s'"
-msgstr "“%s”附近有语法错误"
+msgstr "\"%s\" 附近有语法错误"
#: parse.y:6365
msgid "syntax error: unexpected end of file"
-msgstr "语法错误: 未预期的文件结尾"
+msgstr "语法错误:未预期的文件结束符"
#: parse.y:6365
msgid "syntax error"
@@ -1622,27 +1599,27 @@ msgstr "使用 \"%s\" 退出 shell 。\n"
#: parse.y:6602
msgid "unexpected EOF while looking for matching `)'"
-msgstr "寻找匹配的“)”时遇到了未预期的文件结束符"
+msgstr "寻找匹配的 \")\" 时遇到了未预期的 EOF"
#: pcomplete.c:1132
#, c-format
msgid "completion: function `%s' not found"
-msgstr "补全:未找到函数 “%s”"
+msgstr "补全:未找到函数 \"%s\""
#: pcomplete.c:1722
#, c-format
msgid "programmable_completion: %s: possible retry loop"
-msgstr "programmable_completion: %s:疑似重试循环"
+msgstr "programmable_completion: %s: 可能的重试循环"
#: pcomplib.c:182
#, c-format
msgid "progcomp_insert: %s: NULL COMPSPEC"
-msgstr "progcomp_insert: %s:空的补全声明"
+msgstr "progcomp_insert: %s: COMPSPEC 为 NULL"
#: print_cmd.c:302
#, c-format
msgid "print_command: bad connector `%d'"
-msgstr "print_command: 错误的条件连接符 `%d'"
+msgstr "print_command: 错误的条件连接符 \"%d\""
#: print_cmd.c:375
#, c-format
@@ -1651,7 +1628,7 @@ msgstr "xtrace_set: %d: 无效的文件描述符"
#: print_cmd.c:380
msgid "xtrace_set: NULL file pointer"
-msgstr "xtrace_set: 空的文件指针"
+msgstr "xtrace_set: 文件指针为 NULL"
#: print_cmd.c:384
#, c-format
@@ -1661,7 +1638,7 @@ msgstr "xtrace fd (%d) != fileno xtrace fp (%d)"
#: print_cmd.c:1540
#, c-format
msgid "cprintf: `%c': invalid format character"
-msgstr "cprintf: `%c': 无效的格式字符"
+msgstr "cprintf: \"%c\": 无效的格式字符"
#: redir.c:149 redir.c:197
msgid "file descriptor out of range"
@@ -1670,27 +1647,27 @@ msgstr "文件描述符超出范围"
#: redir.c:204
#, c-format
msgid "%s: ambiguous redirect"
-msgstr "%s:模糊的重定向"
+msgstr "%s: 有歧义的重定向"
#: redir.c:208
#, c-format
msgid "%s: cannot overwrite existing file"
-msgstr "%s:无法覆盖已存在的文件"
+msgstr "%s: 无法覆盖已存在的文件"
#: redir.c:213
#, c-format
msgid "%s: restricted: cannot redirect output"
-msgstr "%s:受限的: 无法重定向输出"
+msgstr "%s: 受限:无法重定向输出"
#: redir.c:218
#, c-format
msgid "cannot create temp file for here-document: %s"
-msgstr "无法为立即文档创建临时文件: %s"
+msgstr "无法为立即文档创建临时文件:%s"
#: redir.c:222
#, c-format
msgid "%s: cannot assign fd to variable"
-msgstr "%s:无法将文件描述符赋值给变量"
+msgstr "%s: 无法将文件描述符赋值给变量"
#: redir.c:649
msgid "/dev/(tcp|udp)/host/port not supported without networking"
@@ -1698,11 +1675,11 @@ msgstr "没有网络时不支持 /dev/(tcp|udp)/host/port"
#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284
msgid "redirection error: cannot duplicate fd"
-msgstr "重定向错误: 无法复制文件描述符"
+msgstr "重定向错误:无法复制文件描述符"
#: shell.c:347
msgid "could not find /tmp, please create!"
-msgstr "无法找到 /tmp ,请创建!"
+msgstr "无法找到 /tmp,请创建!"
#: shell.c:351
msgid "/tmp must be a valid directory name"
@@ -1720,12 +1697,12 @@ msgstr "%c%c: 无效的选项"
#: shell.c:1319
#, c-format
msgid "cannot set uid to %d: effective uid %d"
-msgstr "无法将 uid 设为 %d: 有效 uid %d"
+msgstr "无法将 uid 设为 %d:有效 uid %d"
#: shell.c:1330
#, c-format
msgid "cannot set gid to %d: effective gid %d"
-msgstr "无法将 gid 设为 %d: 有效 gid %d"
+msgstr "无法将 gid 设为 %d:有效 gid %d"
#: shell.c:1518
msgid "cannot start debugger; debugging mode disabled"
@@ -1734,7 +1711,7 @@ msgstr "无法启动调试器;调试模式已禁用"
#: shell.c:1632
#, c-format
msgid "%s: Is a directory"
-msgstr "%s:是一个目录"
+msgstr "%s: 是一个目录"
# 这个是查看用户的 /etc/passwd 信息得到的名字。既然是用户的名字,就叫做无名氏吧。(有点想写“红领巾”来着。)
#: shell.c:1881
@@ -1757,15 +1734,15 @@ msgstr ""
#: shell.c:2038
msgid "GNU long options:\n"
-msgstr "GNU 长选项:\n"
+msgstr "GNU 长选项:\n"
#: shell.c:2042
msgid "Shell options:\n"
-msgstr "Shell 选项:\n"
+msgstr "Shell 选项:\n"
#: shell.c:2043
msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n"
-msgstr "\t-irsD 或 -c <命令> 或 -O <shopt 选项>\t\t(仅适合调用)\n"
+msgstr "\t-ilrsD 或 -c <命令> 或 -O <shopt 选项>\t\t(仅适合调用)\n"
#: shell.c:2062
#, c-format
@@ -1775,25 +1752,25 @@ msgstr "\t-%s 或 -o <选项>\n"
#: shell.c:2068
#, c-format
msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
-msgstr "请输入`%s -c \"help set\"' 以获得关于 shell 选项的更多信息\n"
+msgstr "请输入 `%s -c \"help set\"' 以获得关于 shell 选项的更多信息。\n"
#: shell.c:2069
#, c-format
msgid "Type `%s -c help' for more information about shell builtin commands.\n"
-msgstr "请输入 `%s -c help' 以获得关于 shell 内建命令的更多信息.\n"
+msgstr "请输入 `%s -c help' 以获得关于 shell 内建命令的更多信息。\n"
# 写如何报告程序错误的地方应该提到如何报告翻译问题。
#: shell.c:2070
#, c-format
msgid "Use the `bashbug' command to report bugs.\n"
msgstr ""
-"请使用“bashbug”命令来报告程序错误。\n"
+"请使用 \"bashbug\" 命令来报告程序错误。\n"
"请将翻译错误报告到 <i18n-zh@googlegroups.com>。\n"
#: shell.c:2072
#, c-format
msgid "bash home page: <http://www.gnu.org/software/bash>\n"
-msgstr "bash 首页:<http://www.gnu.org/software/bash>\n"
+msgstr "bash 主页:<http://www.gnu.org/software/bash>\n"
#: shell.c:2073
#, c-format
@@ -1823,23 +1800,23 @@ msgstr "退出"
#: siglist.c:62
msgid "Illegal instruction"
-msgstr "非法的指令"
+msgstr "非法指令"
#: siglist.c:66
msgid "BPT trace/trap"
-msgstr "断点追踪/陷阱"
+msgstr "断点跟踪或陷阱"
#: siglist.c:74
msgid "ABORT instruction"
-msgstr "放弃指令"
+msgstr "中止指令"
#: siglist.c:78
msgid "EMT instruction"
-msgstr "模拟器陷阱指令"
+msgstr "EMT 指令"
#: siglist.c:82
msgid "Floating point exception"
-msgstr "浮点数异常"
+msgstr "浮点异常"
#: siglist.c:86
msgid "Killed"
@@ -1859,7 +1836,7 @@ msgstr "错误的系统调用"
#: siglist.c:102
msgid "Broken pipe"
-msgstr "管道破裂"
+msgstr "断开的管道"
#: siglist.c:106
msgid "Alarm clock"
@@ -1875,7 +1852,7 @@ msgstr "紧急 I/O 状况"
#: siglist.c:118
msgid "Stopped (signal)"
-msgstr "已停止(信号)"
+msgstr "已停止(信号)"
#: siglist.c:126
msgid "Continue"
@@ -1883,15 +1860,15 @@ msgstr "继续"
#: siglist.c:134
msgid "Child death or stop"
-msgstr "子进程已死或者停止"
+msgstr "子进程已死或已停止"
#: siglist.c:138
msgid "Stopped (tty input)"
-msgstr "已停止(tty 输入)"
+msgstr "已停止(tty 输入)"
#: siglist.c:142
msgid "Stopped (tty output)"
-msgstr "已停止(tty 输出)"
+msgstr "已停止(tty 输出)"
#: siglist.c:146
msgid "I/O ready"
@@ -1907,12 +1884,12 @@ msgstr "文件限制"
#: siglist.c:158
msgid "Alarm (virtual)"
-msgstr "报警(虚拟)"
+msgstr "闹钟(虚拟)"
# Personally I treat this as something coming from alarm() by a profiler.
#: siglist.c:162
msgid "Alarm (profile)"
-msgstr "报警(分析)"
+msgstr "闹钟(性能分析)"
#: siglist.c:166
msgid "Window changed"
@@ -1924,15 +1901,15 @@ msgstr "记录锁"
#: siglist.c:174
msgid "User signal 1"
-msgstr "用户信号1"
+msgstr "用户信号 1"
#: siglist.c:178
msgid "User signal 2"
-msgstr "用户信号2"
+msgstr "用户信号 2"
#: siglist.c:182
msgid "HFT input data pending"
-msgstr "HFT 待输入数据"
+msgstr "HFT 输入数据待处理"
#: siglist.c:186
msgid "power failure imminent"
@@ -1974,12 +1951,12 @@ msgstr "未知信号 #%d"
#: subst.c:1476 subst.c:1666
#, c-format
msgid "bad substitution: no closing `%s' in %s"
-msgstr "错误的替换: 在 %2$s 中没有闭合的 `%1$s'"
+msgstr "错误的替换:在 %2$s 中没有右 `%1$s'"
#: subst.c:3281
#, c-format
msgid "%s: cannot assign list to array member"
-msgstr "%s:无法将链表赋值给数组成员"
+msgstr "%s: 无法将列表赋值给数组成员"
#: subst.c:5910 subst.c:5926
msgid "cannot make pipe for process substitution"
@@ -1992,7 +1969,7 @@ msgstr "无法为进程替换创建子进程"
#: subst.c:6059
#, c-format
msgid "cannot open named pipe %s for reading"
-msgstr "无法打开命名管道 %s 以读取"
+msgstr "无法打开命名管道 %s 进行读取"
#: subst.c:6061
#, c-format
@@ -2023,56 +2000,56 @@ msgstr "command_substitute: 无法将管道复制为文件描述符 1"
#: subst.c:6883 subst.c:9952
#, c-format
msgid "%s: invalid variable name for name reference"
-msgstr "%s:无效的引用变量名"
+msgstr "%s: 名称引用变量引用的变量名无效"
#: subst.c:6979 subst.c:6997 subst.c:7169
#, c-format
msgid "%s: invalid indirect expansion"
-msgstr "%s:无效的间接展开"
+msgstr "%s: 无效的间接展开"
#: subst.c:7013 subst.c:7177
#, c-format
msgid "%s: invalid variable name"
-msgstr "%s:无效的变量名"
+msgstr "%s: 无效的变量名"
#: subst.c:7256
#, c-format
msgid "%s: parameter not set"
-msgstr "%s:参数未设置"
+msgstr "%s: 参数未设置"
#: subst.c:7258
#, c-format
msgid "%s: parameter null or not set"
-msgstr "%s:参数为空或未设置"
+msgstr "%s: 参数为空或未设置"
#: subst.c:7503 subst.c:7518
#, c-format
msgid "%s: substring expression < 0"
-msgstr "%s:子串表达式 < 0"
+msgstr "%s: 子串表达式 < 0"
#: subst.c:9281 subst.c:9302
#, c-format
msgid "%s: bad substitution"
-msgstr "%s:错误的替换"
+msgstr "%s: 错误的替换"
#: subst.c:9390
#, c-format
msgid "$%s: cannot assign in this way"
-msgstr "$%s:无法这样赋值"
+msgstr "$%s: 无法这样赋值"
#: subst.c:9814
msgid "future versions of the shell will force evaluation as an arithmetic substitution"
-msgstr "未来版本的 shell 会强制估值为算术替换"
+msgstr "未来版本的 shell 会强制求值为算术替换"
#: subst.c:10367
#, c-format
msgid "bad substitution: no closing \"`\" in %s"
-msgstr "错误的替换: 在 %s 中没有闭合的 \"`\""
+msgstr "错误的替换:在 %s 中没有右 \"`\""
#: subst.c:11434
#, c-format
msgid "no match: %s"
-msgstr "无匹配: %s"
+msgstr "无匹配:%s"
#: test.c:147
msgid "argument expected"
@@ -2081,54 +2058,54 @@ msgstr "需要参数"
#: test.c:156
#, c-format
msgid "%s: integer expression expected"
-msgstr "%s:需要整数表达式"
+msgstr "%s: 需要整数表达式"
#: test.c:265
msgid "`)' expected"
-msgstr "需要“)”"
+msgstr "需要 \")\""
#: test.c:267
#, c-format
msgid "`)' expected, found %s"
-msgstr "需要“)”,却找到 %s"
+msgstr "需要 \")\",却找到 %s"
#: test.c:466 test.c:799
#, c-format
msgid "%s: binary operator expected"
-msgstr "%s:需要二元表达式"
+msgstr "%s: 需要二元运算符"
#: test.c:756 test.c:759
#, c-format
msgid "%s: unary operator expected"
-msgstr "%s:需要一元表达式"
+msgstr "%s: 需要一元运算符"
#: test.c:881
msgid "missing `]'"
-msgstr "缺少 `]'"
+msgstr "缺少 \"]\""
#: test.c:899
#, c-format
msgid "syntax error: `%s' unexpected"
-msgstr "语法错误:需要 `%s'"
+msgstr "语法错误:未预期的 \"%s\""
#: trap.c:220
msgid "invalid signal number"
-msgstr "无效的信号数"
+msgstr "无效的信号编号"
#: trap.c:325
#, c-format
msgid "trap handler: maximum trap handler level exceeded (%d)"
-msgstr "trap handler: 超出最大的 trap handler 层次 (%d)"
+msgstr "trap handler: 超出最大的 trap handler 层数 (%d)"
#: trap.c:414
#, c-format
msgid "run_pending_traps: bad value in trap_list[%d]: %p"
-msgstr "run_pending_traps: trap_list[%d] 中的错误值: %p"
+msgstr "run_pending_traps: 错误的 trap_list[%d] 值:%p"
#: trap.c:418
#, c-format
msgid "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
-msgstr "run_pending_traps: 信号处理器是 SIG_DFL,重新发送 %d (%s) 给自己"
+msgstr "run_pending_traps: 信号处理程序是 SIG_DFL,重新发送 %d (%s) 给自己"
#: trap.c:487
#, c-format
@@ -2138,12 +2115,12 @@ msgstr "trap_handler: 错误的信号 %d"
#: variables.c:421
#, c-format
msgid "error importing function definition for `%s'"
-msgstr "“%s”函数定义导入错误"
+msgstr "导入 \"%s\" 的函数定义时出错"
#: variables.c:833
#, c-format
msgid "shell level (%d) too high, resetting to 1"
-msgstr "shell 层次 (%d) 太高,重置为 1"
+msgstr "shell 层数 (%d) 太高,重置为 1"
#: variables.c:2674
msgid "make_local_variable: no function context at current scope"
@@ -2152,12 +2129,12 @@ msgstr "make_local_variable: 当前作用域中没有函数上下文"
#: variables.c:2693
#, c-format
msgid "%s: variable may not be assigned value"
-msgstr "%s:变量不可赋值"
+msgstr "%s: 变量不可赋值"
#: variables.c:3475
#, c-format
msgid "%s: assigning integer to name reference"
-msgstr "%s:将整数赋值给名称引用"
+msgstr "%s: 将整数赋值给名称引用"
#: variables.c:4404
msgid "all_local_variables: no function context at current scope"
@@ -2176,7 +2153,7 @@ msgstr "%2$s 的 exportstr 中有无效的字符 %1$d"
#: variables.c:4791
#, c-format
msgid "no `=' in exportstr for %s"
-msgstr "%s 的 exportstr 中没有“=”"
+msgstr "%s 的 exportstr 中没有 \"=\""
#: variables.c:5331
msgid "pop_var_context: head of shell_variables not a function context"
@@ -2193,25 +2170,25 @@ msgstr "pop_scope: shell_variables 的头部不是临时环境作用域"
#: variables.c:6387
#, c-format
msgid "%s: %s: cannot open as FILE"
-msgstr "%s:%s:无法作为文件打开"
+msgstr "%s: %s: 无法作为 FILE 打开"
#: variables.c:6392
#, c-format
msgid "%s: %s: invalid value for trace file descriptor"
-msgstr "%s:%s:追踪文件描述符的值无效"
+msgstr "%s: %s: 跟踪文件描述符的值无效"
#: variables.c:6437
#, c-format
msgid "%s: %s: compatibility value out of range"
-msgstr "%s:%s:兼容版本数值越界"
+msgstr "%s: %s: 兼容性的值超出范围"
#: version.c:46 version2.c:46
msgid "Copyright (C) 2020 Free Software Foundation, Inc."
-msgstr "版权所有 (C) 2020 自由软件基金会"
+msgstr "Copyright (C) 2020 自由软件基金会"
#: version.c:47 version2.c:47
msgid "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n"
-msgstr "许可证 GPLv3+: GNU GPL 许可证第三版或者更新版本 <http://gnu.org/licenses/gpl.html>\n"
+msgstr "许可证 GPLv3+:GNU GPL 许可证第三版或者更新版本 <http://gnu.org/licenses/gpl.html>\n"
#: version.c:86 version2.c:86
#, c-format
@@ -2229,22 +2206,22 @@ msgstr "在法律许可的情况下特此明示,本软件不提供任何担保
#: xmalloc.c:93
#, c-format
msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
-msgstr "%s:无法分配 %lu 字节 (已分配 %lu 字节)"
+msgstr "%s: 无法分配 %lu 字节(已分配 %lu 字节)"
#: xmalloc.c:95
#, c-format
msgid "%s: cannot allocate %lu bytes"
-msgstr "%s:无法分配 %lu 字节"
+msgstr "%s: 无法分配 %lu 字节"
#: xmalloc.c:165
#, c-format
msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
-msgstr "%s:%s:%d:无法分配 %lu 字节 (已分配 %lu 字节)"
+msgstr "%s: %s:%d: 无法分配 %lu 字节(已分配 %lu 字节)"
#: xmalloc.c:167
#, c-format
msgid "%s: %s:%d: cannot allocate %lu bytes"
-msgstr "%s:%s:%d:无法分配 %lu 字节"
+msgstr "%s: %s:%d: 无法分配 %lu 字节"
#: builtins.c:45
msgid "alias [-p] [name[=value] ... ]"
@@ -2268,7 +2245,7 @@ msgstr "continue [n]"
#: builtins.c:60
msgid "builtin [shell-builtin [arg ...]]"
-msgstr "builtin [shell 内建 [参数 ...]]"
+msgstr "builtin [shell-内建 [参数 ...]]"
#: builtins.c:63
msgid "caller [expr]"
@@ -2296,7 +2273,7 @@ msgstr "typeset [-aAfFgiIlnrtux] [-p] 名称[=值] ..."
#: builtins.c:82
msgid "local [option] name[=value] ..."
-msgstr "local [option] 名称[=值] ..."
+msgstr "local [选项] 名称[=值] ..."
#: builtins.c:85
msgid "echo [-neE] [arg ...]"
@@ -2332,15 +2309,15 @@ msgstr "logout [n]"
#: builtins.c:105
msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
-msgstr "fc [-e 编辑器名] [-lnr] [起始] [终结] 或 fc -s [模式=替换串] [命令]"
+msgstr "fc [-e 编辑器名] [-lnr] [起始] [终止] 或 fc -s [模式=替换串] [命令]"
#: builtins.c:109
msgid "fg [job_spec]"
-msgstr "fg [任务声明]"
+msgstr "fg [任务说明符]"
#: builtins.c:113
msgid "bg [job_spec ...]"
-msgstr "bg [任务声明 ...]"
+msgstr "bg [任务说明符 ...]"
#: builtins.c:116
msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
@@ -2356,15 +2333,15 @@ msgstr "history [-c] [-d 偏移量] [n] 或 history -anrw [文件名] 或 histor
#: builtins.c:127
msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
-msgstr "jobs [-lnprs] [任务声明 ...] 或 jobs -x 命令 [参数]"
+msgstr "jobs [-lnprs] [任务说明符 ...] 或 jobs -x 命令 [参数]"
#: builtins.c:131
msgid "disown [-h] [-ar] [jobspec ... | pid ...]"
-msgstr "disown [-h] [-ar] [任务声明 ... | pid ...]"
+msgstr "disown [-h] [-ar] [任务说明符 ... | pid ...]"
#: builtins.c:134
msgid "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]"
-msgstr "kill [-s 信号声明 | -n 信号编号 | -信号声明] 进程号 | 任务声明 ... 或 kill -l [信号声明]"
+msgstr "kill [-s 信号说明符 | -n 信号编号 | -信号说明符] pid | 任务说明符 ... 或 kill -l [信号说明符]"
#: builtins.c:136
msgid "let arg [arg ...]"
@@ -2372,7 +2349,7 @@ msgstr "let 参数 [参数 ...]"
#: builtins.c:138
msgid "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]"
-msgstr "read [-ers] [-a 数组] [-d 分隔符] [-i 缓冲区文字] [-n 读取字符数] [-N 读取字符数] [-p 提示符] [-t 超时] [-u 文件描述符] [名称 ...]"
+msgstr "read [-ers] [-a 数组] [-d 分隔符] [-i 文本] [-n 字符数] [-N 字符数] [-p 提示符] [-t 超时] [-u fd] [名称 ...]"
#: builtins.c:140
msgid "return [n]"
@@ -2420,7 +2397,7 @@ msgstr "[ 参数... ]"
#: builtins.c:166
msgid "trap [-lp] [[arg] signal_spec ...]"
-msgstr "trap [-lp] [[参数] 信号声明 ...]"
+msgstr "trap [-lp] [[参数] 信号说明符 ...]"
#: builtins.c:168
msgid "type [-afptP] name [name ...]"
@@ -2436,11 +2413,11 @@ msgstr "umask [-p] [-S] [模式]"
#: builtins.c:177
msgid "wait [-fn] [-p var] [id ...]"
-msgstr "wait [-fn] [-p 变量] [ID ...]"
+msgstr "wait [-fn] [-p 变量] [id ...]"
#: builtins.c:181
msgid "wait [pid ...]"
-msgstr "wait [进程号 ...]"
+msgstr "wait [pid ...]"
#: builtins.c:184
msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
@@ -2452,15 +2429,15 @@ msgstr "for (( 表达式1; 表达式2; 表达式3 )); do 命令; done"
#: builtins.c:188
msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
-msgstr "select NAME [in 词语 ... ;] do 命令; done"
+msgstr "select 名称 [in 词语 ... ;] do 命令; done"
#: builtins.c:190
msgid "time [-p] pipeline"
-msgstr "time [-p] 管道"
+msgstr "time [-p] 流水线"
#: builtins.c:192
msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
-msgstr "case 词 in [模式 [| 模式]...) 命令 ;;]... esac"
+msgstr "case 词语 in [模式 [| 模式]...) 命令 ;;]... esac"
#: builtins.c:194
msgid "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi"
@@ -2488,7 +2465,7 @@ msgstr "{ 命令 ; }"
#: builtins.c:206
msgid "job_spec [&]"
-msgstr "job_spec [&]"
+msgstr "任务说明符 [&]"
#: builtins.c:208
msgid "(( expression ))"
@@ -2536,11 +2513,11 @@ msgstr "compopt [-o|+o 选项] [-DEI] [名称 ...]"
#: builtins.c:242
msgid "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]"
-msgstr "mapfile [-d 分隔符] [-n 计数] [-O 起始序号] [-s 计数] [-t] [-u fd] [-C 回调] [-c 量子] [数组]"
+msgstr "mapfile [-d 分隔符] [-n 计数] [-O 起始] [-s 计数] [-t] [-u fd] [-C 回调] [-c 间隔] [数组]"
#: builtins.c:244
msgid "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]"
-msgstr "readarray [-d 定界符] [-n 计数] [-O 起始序号] [-s 计数] [-t] [-u fd] [-C 回调] [-c 量子] [数组]"
+msgstr "readarray [-d 分隔符] [-n 计数] [-O 起始] [-s 计数] [-t] [-u fd] [-C 回调] [-c 间隔] [数组]"
#: builtins.c:256
msgid ""
@@ -2562,18 +2539,18 @@ msgid ""
msgstr ""
"定义或显示别名。\n"
" \n"
-" 不带参数时,`alias' 以可重用的格式\n"
-" `alias 名称=值'在标准输出设备上打印别名列表。\n"
+" 不带参数时,\"alias\" 以可重用的格式 \"alias 名称=值\" 将别名列表\n"
+" 打印到标准输出。\n"
" \n"
-" 否则,对于每个给定值的名称定义一个别名。\n"
-" 值末尾的空格会使下一个词被检测作为别名替换展开。\n"
+" 否则,对于每一个给出了 <值> 的 <名称> 定义一个别名。如果 <值> 的\n"
+" 末尾是空格,那么在展开该别名后,还会继续检查下一个词是否可以\n"
+" 进行别名替换。\n"
" \n"
" 选项:\n"
-" -p\t以可重用的格式打印所有的已定义的别名\n"
+" -p\t以可重用的格式打印所有已定义的别名\n"
" \n"
" 退出状态:\n"
-" 除非一个没有定义的名字被作为参数提供,否则 alias \n"
-" 返回值为真。"
+" alias 返回真,除非提供了一个尚未定义别名的 <名称>。"
#: builtins.c:278
msgid ""
@@ -2584,12 +2561,12 @@ msgid ""
" \n"
" Return success unless a NAME is not an existing alias."
msgstr ""
-"从别名定义列表中删除每一个“名字”。\n"
+"从已定义的别名列表中删除每一个 <名称>。\n"
" \n"
" 选项:\n"
" -a\t删除所有的别名定义\n"
" \n"
-" 返回成功,除非“名字”不是一个已存在的别名。"
+" 返回成功,除非 <名称> 不是一个已存在的别名。"
#: builtins.c:291
msgid ""
@@ -2630,30 +2607,31 @@ msgstr ""
"设定 Readline 键绑定和变量。\n"
" \n"
" 绑定一个键序列到一个 Readline 函数或者宏,或者设定一个\n"
-" Readline 变量。非选项参数的语法和 ~/.inputrc 文件中的等\n"
-" 同,但是必须作为一个参数被传递,\n"
-" 例如,bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" Readline 变量。非选项参数的语法和 ~/.inputrc 文件的语法相同,\n"
+" 但是必须以单一参数的形式传递给 bind,\n"
+" 例如,bind '\"\\C-x\\C-r\": re-read-init-file'。\n"
" \n"
" 选项:\n"
-" -m 键映射 在此命令执行过程中使用指定的键映射。\n"
-" 可被接受的键映射名字有 emacs、emacs-standard、emacs-meta、\n"
-" emacs-ctlx、vi、vi-move、vi-command、和 vi-insert。\n"
-" -l 列出函数名称。\n"
-" -P 列出函数名称和绑定。\n"
-" -p 以可以重新用作输入的格式列出函数名称和绑定。\n"
-" -S 列出可以启动宏的键序列以及它们的值\n"
-" -s 以可以重新用作输入的格式列出可以启动宏的键以及它们的值。\n"
-" -V 列出变量名成和它们的值\n"
-" -v 以可以重新用作输入的格式列出变量的名称和它们的值\n"
-" -q 函数名 查询指定的函数可以由哪些键启动。\n"
-" -u 函数名 反绑定所有绑定至指定函数的键。\n"
-" -r 键序列 取消指定键序列的绑定。\n"
-" -f 文件名 从指定文件中读取键绑定。\n"
-" -x 键序列:shell命令\t当指定的键序列被输入时,执行指定的 shell 命令。\n"
-" -X 以可被重用的形式列出用 -x 绑定的键序列和命令。\n"
+" -m 键映射 在此命令执行过程中使用指定的 <键映射>。可被接受的\n"
+" 键映射名称有 emacs、emacs-standard、emacs-meta、\n"
+" emacs-ctlx、vi、vi-move、vi-command 和 vi-insert。\n"
+" -l 列出函数名称。\n"
+" -P 列出函数名称和绑定。\n"
+" -p 以可以重新用作输入的格式列出函数名称和绑定。\n"
+" -S 列出可以启动宏的键序列以及它们的值。\n"
+" -s 以可以重新用作输入的格式列出可以启动宏的键序列\n"
+" 以及它们的值。\n"
+" -V 列出变量名称以及它们的值。\n"
+" -v 以可以重新用作输入的格式列出变量名称以及它们的值。\n"
+" -q 函数名 查询指定的函数可以由哪些键启动。\n"
+" -u 函数名 解除绑定所有绑定至指定函数的键。\n"
+" -r 键序列 取消 <键序列> 的绑定。\n"
+" -f 文件名 从 <文件名> 中读取键绑定。\n"
+" -x 键序列:shell-命令\t当 <键序列> 被输入时,执行 <shell-命令>。\n"
+" -X 以可以重新用作输入的格式列出用 -x 绑定的键序列和命令。\n"
" \n"
" 退出状态:\n"
-" 除非使用了无法辨认的选项或者错误发生,否则返回0."
+" bind 返回 0,除非使用了无法识别的选项,或者有错误发生。"
#: builtins.c:330
msgid ""
@@ -2665,13 +2643,13 @@ msgid ""
" Exit Status:\n"
" The exit status is 0 unless N is not greater than or equal to 1."
msgstr ""
-"退出 for、while 或 until 循环\n"
+"退出 for、while 或 until 循环。\n"
" \n"
-" 退出一个 FOR、WHILE 或 UNTIL 循环。如果指定了N,则跳出N重\n"
-" 循环\n"
+" 退出一个 FOR、WHILE 或 UNTIL 循环。如果指定了 N,则跳出\n"
+" 从里往外数共 N 重循环。\n"
" \n"
" 退出状态:\n"
-" 退出状态为0除非 N 不大于或等于 1。"
+" 退出状态为 0,除非 N 不大于等于 1。"
#: builtins.c:342
msgid ""
@@ -2685,11 +2663,11 @@ msgid ""
msgstr ""
"继续 for、while 或 until 循环。\n"
" \n"
-" 继续当前 FOR、WHILE 或 UNTIL 循环的下一步。\n"
-" 如果指定了 N, 则继续当前的第 N 重循环。\n"
+" 继续进行当前 FOR、WHILE 或 UNTIL 循环的下一次迭代。\n"
+" 如果指定了 N, 则继续进行从里往外数第 N 重循环的下一次迭代。\n"
" \n"
" 退出状态:\n"
-" 退出状态为 0 除非 N 不大于或等于1。"
+" 退出状态为 0,除非 N 不大于等于 1。"
#: builtins.c:354
msgid ""
@@ -2705,13 +2683,13 @@ msgid ""
msgstr ""
"执行 shell 内建。\n"
" \n"
-" 带参数 ARGs 执行 SHELL-BUILTIN 内建,并且不做命令查询\n"
-" 在希望以 shell 函数的形式来重新实现 shell 内建,\n"
-" 并且希望在函数之内执行该 shell 内建的情况下有用处。\n"
+" 带 <参数> 执行 <shell-内建>,并且跳过命令查找流程。在希望以 shell 函数\n"
+" 的形式重新实现 shell 内建,并且希望在该函数中执行该 shell 内建的情况下\n"
+" 很有用。\n"
" \n"
" 退出状态:\n"
-" 以 SHELL-BUILTIN 内建的退出状态为准,或者如果 SHELL-BUILTIN 不是一个\n"
-" shell 内建时为假。"
+" 返回 <shell-内建> 的退出状态,或者如果 <shell-内建> 不是一个 shell 内建\n"
+" 时返回假。"
#: builtins.c:369
msgid ""
@@ -2730,16 +2708,14 @@ msgid ""
msgstr ""
"返回当前子例程调用的上下文。\n"
" \n"
-" 不带有 <表达式> 时,返回 \"$line $filename\"。带有 <表达式> 时,返回\n"
-" \"$line $subroutine $filename\";这个额外的信息可以被用于提供\n"
-" 栈追踪。\n"
+" 不带有 <表达式> 时,返回 \"$line $filename\"。带有 <表达式> 时,\n"
+" 返回 \"$line $subroutine $filename\";这个额外的信息可以用来提供\n"
+" 栈跟踪 (stack trace)。\n"
" \n"
-" <表达式> 表示从当前调用帧需要回去多少个调用帧;顶部帧\n"
-" 是第 0 帧。\n"
+" <表达式> 的值表示从当前调用帧需要回去多少个调用帧;栈顶帧是第 0 帧。\n"
" \n"
" 退出状态:\n"
-" 除非 shell 不在执行一个 shell 函数或者 <表达式> 无效,否则返回结\n"
-" 果为 0。"
+" 返回 0,除非 shell 不在执行一个 shell 函数,或者 <表达式> 无效。"
#: builtins.c:387
msgid ""
@@ -2779,27 +2755,29 @@ msgid ""
msgstr ""
"改变 shell 工作目录。\n"
" \n"
-" 改变当前目录至 DIR 目录。默认的 DIR 目录是 shell 变量 HOME\n"
-" 的值。\n"
+" 改变当前目录至 <目录>。默认的 <目录> 是 shell 变量 HOME 的值。\n"
" \n"
-" 变量 CDPATH 定义了含有 DIR 的目录的搜索路径,其中不同的目录名称由冒号 (:)分隔。\n"
-" 一个空的目录名称表示当前目录。如果要切换到的 DIR 由斜杠 (/) 开头,则 CDPATH\n"
-" 不会用上变量。\n"
+" 变量 CDPATH 定义了搜索含有 <目录> 的目录的搜索路径。CDPATH 中额外的\n"
+" 目录名称以冒号 (:) 隔开。空的 CDPATH 表示当前目录。如果 <目录> 以\n"
+" 斜杠 (/) 开头,则不会使用 CDPATH。\n"
" \n"
-" 如果路径找不到,并且 shell 选项 `cdable_vars' 被设定,则参数词被假定为一个\n"
-" 变量名。如果该变量有值,则它的值被当作 DIR 目录。\n"
+" 如果找不到目录,并且 shell 选项 \"cdable_vars\" 被设定,则假定参数是一个\n"
+" 变量名。如果该变量有值,则它的值被当作 <目录>。\n"
" \n"
" 选项:\n"
-" -L\t强制跟随符号链接: 在处理 `..' 之后解析 DIR 中的符号链接。\n"
-" -P\t使用物理目录结构而不跟随符号链接: 在处理 `..' 之前解析 DIR 中的符号链接。\n"
-" -e\t如果使用了 -P 参数,但不能成功确定当前工作目录时,返回非零的返回值。\n"
-" -@\t在支持拓展属性的系统上,将一个有这些属性的文件当作有文件属性的目录。\n"
+" -L\t强制跟随符号链接: 在处理 \"..\" 之后解析 <目录> 中的符号链接\n"
+" -P\t使用物理目录结构而不跟随符号链接: 在处理 \"..\" 之前\n"
+" \t\t解析 <目录> 中的符号链接\n"
+" -e\t如果使用了 -P 选项,但无法成功确定当前工作目录时,以非零状态退出\n"
+" -@\t在支持扩展属性的系统上,将一个具有扩展属性的文件当作\n"
+" \t\t含有文件属性的目录。\n"
" \n"
-" 默认情况下跟随符号链接,如同指定 `-L'。\n"
-" `..' 使用移除向前相邻目录名成员直到 DIR 开始或一个斜杠的方式处理。\n"
+" 默认情况下,跟随符号链接,正如指定了 \"-L\" 一样。\n"
+" \"..\" 的处理方式是,移除路径名中的上一个组成部分,以 <目录> 的开头\n"
+" 或者斜杠为界限。\n"
" \n"
" 退出状态:\n"
-" 如果目录改变,或在使用 -P 选项时 $PWD 修改成功时返回 0,否则非零。"
+" 如果目录改变,或在使用 -P 选项时 $PWD 修改成功,则返回 0;否则返回非零。"
#: builtins.c:425
msgid ""
@@ -2820,12 +2798,12 @@ msgstr ""
" \n"
" 选项:\n"
" -L\t打印 $PWD 变量的值,如果它包含了当前的工作目录\n"
-" -P\t打印当前的物理路径,不带有任何的符号链接\n"
+" -P\t打印当前的物理目录,而不包含任何的符号链接\n"
" \n"
-" 默认情况下,`pwd' 的行为和带 `-L' 选项一致\n"
+" 默认情况下,\"pwd\" 的行为和给定了 \"-L\" 时一致。\n"
" \n"
" 退出状态:\n"
-" 除非使用了无效选项或者当前目录不可读,否则返回状态为0。"
+" 返回 0,除非使用了无效的选项,或者无法读取当前目录。"
#: builtins.c:442
msgid ""
@@ -2850,7 +2828,7 @@ msgid ""
" Exit Status:\n"
" Always succeeds."
msgstr ""
-"返回一个成功结果。\n"
+"返回一个成功的结果。\n"
" \n"
" 退出状态:\n"
" 总是成功。"
@@ -2886,17 +2864,16 @@ msgid ""
msgstr ""
"执行一个简单命令或者显示命令的相关信息。\n"
" \n"
-" 带 ARGS 参数运行 COMMAND 命令且抑制 shell 函数查询,或显示\n"
-" 指定的 COMMAND 命令的信息。可以在存在相同名称的函数定义的\n"
-" 情况下用于启动磁盘上的命令。\n"
+" 带 <参数> 运行 <命令> 且阻止 shell 函数查找流程,或显示指定的 <命令>\n"
+" 的信息。可以在已存在同名函数的情况下用于启动磁盘上的命令。\n"
" \n"
" 选项:\n"
-" -p\t使用 PATH 变量的一个默认值以确保所有的标准工具都能被找到。\n"
-" -v\t打印 COMMAND 命令的描述,和 `type' 内建相似\n"
-" -V\t打印每个 COMMAND 命令的详细描述\n"
+" -p 使用 PATH 变量的一个默认值,以确保所有的标准工具都能被找到\n"
+" -v 打印 <命令> 的描述,和 \"type\" 内建相似\n"
+" -V 打印每个 <命令> 的更详细的描述\n"
" \n"
-" 退出状态\n"
-" 返回 COMMAND 命令的返回状态,或者当找不到 COMMAND 命令时失败。"
+" 退出状态:\n"
+" 返回 <命令> 的退出状态,或者当找不到 <命令> 时则返回失败。"
#: builtins.c:490
msgid ""
@@ -2938,39 +2915,38 @@ msgid ""
" Returns success unless an invalid option is supplied or a variable\n"
" assignment error occurs."
msgstr ""
-"设定变量值和属性。\n"
+"设定变量的值和属性。\n"
" \n"
-" 声明变量并且赋予它们属性。如果没有给定名称,\n"
+" 声明变量并且赋予它们属性。如果没有给定 <名称>,\n"
" 则显示所有变量的属性和值。\n"
" \n"
" 选项:\n"
-" -f\t限制动作或显示为仅函数名称和定义\n"
-" -F\t限制仅显示函数名称 (以及调试时显示行号和源文件名)\n"
-" -g\t当用于 shell 函数内时创建全局变量; 否则忽略\n"
+" -f\t限制仅操作或显示函数的名称和定义\n"
+" -F\t限制仅显示函数名称(以及调试时显示行号和源文件名)\n"
+" -g\t在 shell 函数内部使用时创建全局变量;否则忽略\n"
" -I\t当创建局部变量时,继承上一个作用域的同名变量的属性和值\n"
-" -p\t显示每个 NAME 变量的属性和值\n"
+" -p\t显示每个 <名称> 的属性和值\n"
" \n"
" 设定属性的选项:\n"
-" -a\t使 NAME 成为下标数组 (如果支持)\n"
-" -A\t使 NAME 成为关联数组 (如果支持)\n"
-" -i\t使 NAME 带有 `integer' (整数)属性\n"
-" -l\t将 NAME 在赋值时转为小写\n"
-" -n\t使 NAME 成为指向一个以其值为名称的变量的引用\n"
-" -r\t将 NAME 变为只读\n"
-" -t\t使 NAME 带有 `trace' (追踪)属性\n"
-" -u\t将每个 NAME 在赋值时转为大写\n"
-" -x\t将 NAME 导出\n"
+" -a\t使 <名称> 成为索引数组(如果支持)\n"
+" -A\t使 <名称> 成为关联数组(如果支持)\n"
+" -i\t使 <名称> 带有 \"整数\" (integer) 属性\n"
+" -l\t将 <名称> 的值在赋值时转换为小写\n"
+" -n\t使 <名称> 成为一个对以它的值为名称的变量的引用\n"
+" -r\t将 <名称> 变为只读\n"
+" -t\t使 <名称> 带有 \"跟踪\" (trace) 属性\n"
+" -u\t使 <名称> 的值在赋值时转换为大写\n"
+" -x\t将 <名称> 导出\n"
" \n"
-" 用 `+' 代替 `-' 会关闭指定选项。\n"
+" 用 \"+\" 代替 \"-\" 会关闭指定的属性。\n"
" \n"
-" 带有整数属性的变量在赋值时将使用算术估值(见\n"
-" `let' 命令)\n"
+" 带有 \"整数\" 属性的变量被赋值时将使用算术求值(见 \"let\" 命令)。\n"
" \n"
-" 在函数中使用时,`declare' 使 NAME 成为本地变量,和 `local'\n"
-" 命令一致。`-g' 选项抑制此行为。\n"
+" 在函数中使用时,\"declare\" 使 <名称> 成为局部变量,和 \"local\"\n"
+" 命令一致。\"-g\" 选项阻止此行为。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非提供了无效选项或者发生变量赋值错误。"
+" 返回成功,除非使用了无效的选项,或者发生变量赋值错误。"
#: builtins.c:532
msgid ""
@@ -2978,9 +2954,9 @@ msgid ""
" \n"
" A synonym for `declare'. See `help declare'."
msgstr ""
-"设置变量的值和属性。\n"
+"设定变量的值和属性。\n"
" \n"
-" `declare' 的等价形式。参见 `help declare'。"
+" 同 \"declare\"。参见 \"help declare\"。"
#: builtins.c:540
msgid ""
@@ -2996,17 +2972,18 @@ msgid ""
" Returns success unless an invalid option is supplied, a variable\n"
" assignment error occurs, or the shell is not executing a function."
msgstr ""
-"定义本地变量。\n"
+"定义局部变量。\n"
" \n"
-" 创建一个以 NAME 为名称的变量,并且将 VALUE 赋值给它。\n"
-" OPTION 选项可以是任何能被 `declare' 接受的选项。\n"
+" 创建一个名为 <名称> 的变量,并且将 <值> 赋给它。<选项> 可以是任何\n"
+" 能被 \"declare\" 接受的选项。\n"
" \n"
-" 本地变量只能在函数内部被使用,它们只能在定义它们的函数内\n"
-" 部以及子函数中可见。\n"
+" 局部变量只能在函数内部使用,它们只对定义它们的函数及其子函数可见。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非使用了无效的选项、发生了赋值错误或者 shell 不在执行一个函数。"
+" 返回成功,除非使用了无效的选项、发生了赋值错误,或者 shell 不在\n"
+" 执行一个函数。"
+# 此字符串可以很好地测试各个 po 编辑器对转义字符的支持是否有 bug(手动斜眼)。poedit(至少在 <=3.0.1 版本中)对 \a 的处理存在 bug,如果你修改了这条翻译,请用纯文本编辑器检查一下 msgstr 里的 \a 前面是否是两个反斜杠。就算你用的不是 poedit,也最好检查一下所有的转义字符,看看是不是和 msgid 里的一致,如不一致请修改。
#: builtins.c:557
msgid ""
"Write arguments to the standard output.\n"
@@ -3045,33 +3022,34 @@ msgid ""
msgstr ""
"将参数写到标准输出。\n"
" \n"
-" 在标准输出上,显示用空格分割的 ARG 参数后跟一个换行。\n"
+" 在标准输出上显示 <参数>,以空格隔开,后面跟一个换行。\n"
" \n"
" 选项:\n"
" -n\t不要追加换行\n"
-" -e\t启用下列反斜杠转义的解释\n"
-" -E\t显式地抑制对于反斜杠转义的解释\n"
+" -e\t启用对下列反斜杠转义字符的解释\n"
+" -E\t显式地阻止对反斜杠转义字符的解释\n"
" \n"
-" `echo' 对下列反斜杠字符进行转义:\n"
-" \a\t警告(响铃)\n"
+" \"echo\" 对下列反斜杠转义字符进行解释:\n"
+" \\a\t警报(响铃)\n"
" \\b\t退格\n"
-" \\c\t抑制更多的输出\n"
+" \\c\t阻止后续的输出\n"
" \\e\t转义字符\n"
-" \\f\t换页字符\n"
+" \\E\t转义字符\n"
+" \\f\t换页\n"
" \\n\t换行\n"
" \\r\t回车\n"
-" \\t\t横向制表符\n"
-" \\v\t纵向制表符\n"
+" \\t\t水平制表符\n"
+" \\v\t垂直制表符\n"
" \\\\\t反斜杠\n"
-" \\0nnn\t以 NNN(八进制)为 ASCII 码的字符。NNN 可以是 0 到 3 个八进制位\n"
-" \\xHH\t以 HH(十六进制)为值的八比特字符。HH 可以是一个或两个十六进制位\n"
-" \\uHHHH\t以 HHHH(十六进制)为值的 Unicode 字符。HHHH 可以是一个到\n"
-" \t\t四个十六进制位。\n"
-" \\UHHHHHHHH 以 HHHHHHHH(十六进制)为值的 Unicode 字符。\n"
-" \t\tHHHHHHHH 可以是一到八个十六进制位。\n"
+" \\0nnn\tASCII 码为 NNN(八进制)的字符。NNN 可以是 0 至 3 位的八进制数。\n"
+" \\xHH\t值为 HH(十六进制)的 8 位字符。HH 可以是一至两位的十六进制数。\n"
+" \\uHHHH\t值为 HHHH(十六进制)的 Unicode 字符。HHHH 可以是一至四位的\n"
+" \t\t十六进制数。\n"
+" \\UHHHHHHHH 值为 HHHHHHHH(十六进制)的 Unicode 字符。\n"
+" \t\tHHHHHHHH 可以是一至八位的十六进制数。\n"
" \n"
" 退出状态:\n"
-" 返回成功除非有写错误发生。"
+" 返回成功,除非有写入错误发生。"
#: builtins.c:597
msgid ""
@@ -3085,15 +3063,15 @@ msgid ""
" Exit Status:\n"
" Returns success unless a write error occurs."
msgstr ""
-"写参数至标准输出设备。\n"
+"将参数写到标准输出。\n"
" \n"
-" 在标准输出设备上显示 ARGs 参数和一个换行。\n"
+" 在标准输出上显示 <参数>,后面跟一个换行。\n"
" \n"
" 选项:\n"
-" -n\t不附加换行\n"
+" -n\t不要追加换行\n"
" \n"
" 退出状态:\n"
-" 除非写错误发生,否则返回成功。"
+" 返回成功,除非有写入错误发生。"
#: builtins.c:612
msgid ""
@@ -3123,27 +3101,26 @@ msgid ""
msgstr ""
"启用和禁用 shell 内建。\n"
" \n"
-" 启用和禁用 shell 的内建命令。禁用使您能够执行一个和内建\n"
+" 启用和禁用 shell 的内建命令。禁用命令使您能够执行和内建\n"
" 命令同名的磁盘上的命令,而无须使用完整的路径名。\n"
" \n"
-" \n"
" 选项:\n"
-" -a\t打印一个内建的列表,并显示其中每一个是否启用\n"
-" -n\t禁用每一个 NAME 内建或者显示一个被禁用的内建的列表\n"
-" -p\t以可重用的格式打印一个内建的列表\n"
-" -s\t仅打印Posix `special' 内建的名称\n"
+" -a\t打印内建列表,并显示其中每一个是否启用\n"
+" -n\t禁用每一个 <名称> 或者显示被禁用的内建的列表\n"
+" -p\t以可重用的格式打印内建列表\n"
+" -s\t仅打印 Posix \"特殊\" 内建的名称\n"
" \n"
" 控制动态加载的选项:\n"
-" -f\t从共享对象 FILENAME 文件中加载 NAME 内建\n"
+" -f\t从共享对象 <文件名> 中加载 <名称> 内建\n"
" -d\t删除以 -f 选项加载的内建\n"
" \n"
-" 不带选项时,每一个 NAME 内建都被启用。\n"
+" 不带选项时,启用每一个 <名称>。\n"
" \n"
-" 如果要使用 $PATH 中找到的 `test' 而不是 shell 内建的版本,\n"
-" 输入 `enable -n test'。\n"
+" 要使用 $PATH 中找到的 \"test\" 而不是 shell 内建的版本,\n"
+" 请输入 \"enable -n test\"。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非 NAME 不是一个 shell 内建或者有错误发生。"
+" 返回成功,除非 <名称> 不是一个 shell 内建,或者有错误发生。"
#: builtins.c:640
msgid ""
@@ -3157,11 +3134,10 @@ msgid ""
msgstr ""
"将参数作为 shell 命令执行。\n"
" \n"
-" 将 ARGs 合成一个字符串,用结果作为 shell 的输入,\n"
-" 并且执行得到的命令。\n"
+" 将 <参数> 组合成一个字符串,用结果作为 shell 的输入,并执行得到的命令。\n"
" \n"
" 退出状态:\n"
-" 以命令的状态退出,或者在命令为空的情况下返回成功。"
+" 返回命令的退出状态,或者在命令为空的情况下返回成功。"
#: builtins.c:652
msgid ""
@@ -3205,40 +3181,37 @@ msgid ""
msgstr ""
"解析选项参数。\n"
" \n"
-" getopts 可在 shell 过程中使用,用于解析位置参数作为选项。\n"
+" getopts 可在 shell 过程中使用,将位置参数解析为选项。\n"
" \n"
" \n"
-" <选项字符串> 包含待识别的选项字母;如果一个字母后面跟\n"
-" 着冒号,则该选项需要一个参数,参数与选项之间应当用空格隔开。\n"
+" <选项字符串> 包含待识别的选项字母;如果一个字母后面跟着一个冒号,\n"
+" 则该选项需要一个参数,参数与选项之间应当用空格隔开。\n"
" \n"
" \n"
-" 每次被调用时,getopts 会将下一个选项放到 shell 变量 $name\n"
-" 中,如果 <名称> 变量不存在则先将其初始化,并将下一个待处\n"
-" 理的参数的序号放入 shell 变量 OPTIND 中。OPTIND 变量在每\n"
-" 次 shell 或者 shell 脚本启动时都被初始化为 1。当一个选项要\n"
-" 求有一个参数时,getopts 将该参数放入 shell 变量 OPTARG 中。\n"
+" 每次被调用时,getopts 会将下一个选项放到 shell 变量 $<名称> 中,\n"
+" 如果 <名称> 变量不存在则先将其初始化,并将下一个待处理的参数的序号\n"
+" 放入 shell 变量 OPTIND 中。OPTIND 变量在每次 shell 或者 shell 脚本\n"
+" 启动时都被初始化为 1。当一个选项要求有一个参数时,getopts 将该参数\n"
+" 放入 shell 变量 OPTARG 中。\n"
" \n"
-" getopts 有两种报告错误的方法。如果 OPTSTRING 变量的第\n"
-" 一个字符是冒号,getopts 使用沉默错误报告。在这种模式\n"
-" 下,不会打印错误消息。如果遇到了一个无效的选项,\n"
-" getopts 将找到的选项字符放至 OPTARG 变量中。如果没有找到\n"
-" 必需的参数,getopts 放一个 ':' 到 <名称> 变量中并且设\n"
-" 置 OPTARG 变量为找到的选项字符。如果 getopts 不在沉默模\n"
-" 式中,并且遇到了一个无效的选项,getopts 放置一个 '?' 到 <名称> \n"
-" 变量中并且取消设定 OPTARG 变量。如果没有找到必需的参数,\n"
-" 一个 '?' 会被放入 <名称> 变量中,OPTARG 将被取消设定,并且会\n"
-" 打印一个诊断信息。\n"
+" getopts 有两种报告错误的方法。如果 <选项字符串> 的第一个字符是\n"
+" 冒号,getopts 使用沉默错误报告。在此模式下,不会打印错误消息。\n"
+" 如果遇到了一个无效的选项,getopts 将找到的选项字符放入 OPTARG\n"
+" 变量中。如果没有找到必需的参数,getopts 放置一个 \":\" 到 <名称>\n"
+" 变量中,并且将 OPTARG 变量设置为找到的选项字符。如果 getopts 不处于\n"
+" 沉默模式,并且遇到了一个无效的选项,getopts 放置 \"?\" 到 <名称> 变量\n"
+" 中并且取消设定 OPTARG 变量。如果没有找到必需的参数,一个 \"?\" 会被\n"
+" 放入 <名称> 变量中,OPTARG 将被取消设定,并且会打印一个诊断信息。\n"
" \n"
-" 如果 shell 变量 OPTERR 的值为 0,getopts 将会禁用\n"
-" 错误信息的打印,即使 OPTSTRING 变量的第一个字符不是\n"
-" 一个冒号。OPTERR 的默认值为 1。\n"
+" 如果 shell 变量 OPTERR 的值为 0,getopts 会禁用错误信息的打印,\n"
+" 即使 <选项字符串> 的第一个字符不是冒号。OPTERR 的默认值为 1。\n"
" \n"
-" getopts 通常解析位置参数($0 - $9),不过如果在 <参数> 中\n"
-" 提供了参数,则转而解析它们。\n"
+" getopts 通常解析位置参数,不过如果在 <参数> 中提供了参数,则转而\n"
+" 解析它们。\n"
" \n"
" 退出状态:\n"
-" 如果一个选项被找到则返回成功;如果遇到了选项的结尾或者\n"
-" 有错误发生则返回失败。"
+" 如果找到了一个选项,则返回成功;如果遇到了选项的末尾或者有错误发生,\n"
+" 则返回失败。"
#: builtins.c:694
msgid ""
@@ -3261,20 +3234,19 @@ msgid ""
msgstr ""
"使用指定命令替换 shell。\n"
" \n"
-" 执行 COMMAND 命令,以指定的程序替换这个 shell。\n"
-" ARGUMENTS 参数成为 COMMAND命令的参数。如果\n"
-" 没有指定COMMAND 命令,则任何的重定向在当前 shell 中生效。\n"
+" 执行 <命令>,以指定的程序替换这个 shell。以 <参数> 作为 <命令> 的参数。\n"
+" 如果没有指定 <命令>,则任何的 <重定向> 都在当前 shell 中生效。\n"
" \n"
" 选项:\n"
-" -a 名称\t作为第0个参数传递给 COMMAND 命令\n"
-" -c\t\t在一个空环境中执行 COMMAND 命令\n"
-" -l\t\t在COMMAND 命令的第0个参数中加一个短线\n"
+" -a 名称\t将 <名称> 作为第 0 个参数传递给 <命令>\n"
+" -c\t在一个空的环境中执行 <命令>\n"
+" -l\t在 <命令> 的第 0 个参数中放置一个短横线 (-)\n"
" \n"
-" 如果命令不能被执行,则退出一个非交互式的 shell,除非\n"
-" shell 选项`execfail' 已经设定。\n"
+" 如果无法执行命令,则退出一个非交互式的 shell,除非设定了 shell 选项\n"
+" \"execfail\"。\n"
" \n"
" 退出状态:\n"
-" 返回成功除非 COMMAND 命令没有找到或者出现一个重定向错误。"
+" 返回成功,除非未找到 <命令>,或者出现一个 <重定向> 错误。"
#: builtins.c:715
msgid ""
@@ -3283,10 +3255,10 @@ msgid ""
" Exits the shell with a status of N. If N is omitted, the exit status\n"
" is that of the last command executed."
msgstr ""
-"退出shell。\n"
+"退出 shell。\n"
" \n"
-" 以状态 N 退出 shell。 如果 N 被省略,则退出状态\n"
-" 为最后一个执行的命令的退出状态。"
+" 退出 shell,退出状态为 N。如果 N 被省略,则退出状态为最后一个执行的\n"
+" 命令的退出状态。"
#: builtins.c:724
msgid ""
@@ -3295,10 +3267,10 @@ msgid ""
" Exits a login shell with exit status N. Returns an error if not executed\n"
" in a login shell."
msgstr ""
-"退出一个登录 shell.\n"
+"退出一个登录 shell。\n"
" \n"
-" 以状态 N 退出一个登录 shell。如果不在登录 shell 中执行,则\n"
-" 返回一个错误。"
+" 退出一个登录 shell,退出状态为 N。如果不在登录 shell 中执行,\n"
+" 则返回一个错误。"
#: builtins.c:734
msgid ""
@@ -3328,27 +3300,25 @@ msgid ""
msgstr ""
"从历史列表中显示或者执行命令。\n"
" \n"
-" fc 被用于从历史列表中列出或者重新编辑并执行命令。\n"
-" FIRST 和 LAST 变量可以是数字用于指定范围,或者 FIRST 可以是\n"
-" 字符串,意味着以这个字符串打头的最近的一个命令。\n"
-" \n"
+" fc 可用于从历史列表中列出命令,或者编辑并重新执行命令。\n"
+" <起始> 和 <终止> 可以是用来指定范围的数字,或者 <起始> 可以是\n"
+" 字符串,表示以这个字符串打头的最近的一个命令。\n"
" \n"
" 选项:\n"
-" -e ENAME\t选择使用哪个编辑器。默认的是 FCEDIT, 然后是 EDITOR,\n"
-" \t\t然后是 vi\n"
-" -l \t列出行而不编辑\n"
-" -n\t列举时省略行号\n"
-" -r\t反转行的顺序(最新行在前)\n"
-" \n"
-" 用 `fc -s [模式=替换 ...] [命令]' 的格式,COMMAND 命令会在 OLD=NEW\n"
-" 替换之后被重新执行。\n"
+" -e 编辑器名\t选择使用哪个编辑器。默认使用 FCEDIT,然后\n"
+" \t\t\t是 EDITOR,然后是 vi\n"
+" -l\t\t列出行而不编辑\n"
+" -n\t\t列举时省略行号\n"
+" -r\t\t反转行的顺序(新的在前)\n"
" \n"
-" r='fc -s' 是一个有用的别名,这样的话输入 `r cc'会执行最后一个以 `cc'\n"
-" 开头的命令,输入 `r'会重新执行最后一个命令。\n"
+" 使用 \"fc -s [模式=替换串 ...] [命令]\" 的格式,<命令> 会在完成\n"
+" <模式>=<替换串> 的替换之后被重新执行。\n"
" \n"
+" r='fc -s' 是一个有用的别名,这样的话输入 \"r cc\" 会执行最后一个以 \"cc\"\n"
+" 开头的命令,输入 \"r\" 会重新执行最后一个命令。\n"
" \n"
" 退出状态:\n"
-" 返回成功,或者执行的命令的状态;如果错误发生则返回非零。"
+" 返回成功,或者执行的命令的状态;如果有错误发生,则返回非零。"
#: builtins.c:764
msgid ""
@@ -3363,12 +3333,11 @@ msgid ""
msgstr ""
"将任务移至前台。\n"
" \n"
-" 将以 JOB_SPEC 标识的任务放至前台,使其成为\n"
-" 当前任务。如果 JOB_SPEC 不存在,shell 观念中的当前任务 \n"
-" 将被使用。\n"
+" 将以 <任务说明符> 指定的任务放至前台,使其成为当前任务。\n"
+" 如果没有给出 <任务说明符>,shell 观念中的当前任务将会被使用。\n"
" \n"
" 退出状态:\n"
-" 放至前台的命令状态,或者当错误发生时为失败。"
+" 放至前台的命令的状态,或者当错误发生时则返回失败。"
#: builtins.c:779
msgid ""
@@ -3381,14 +3350,13 @@ msgid ""
" Exit Status:\n"
" Returns success unless job control is not enabled or an error occurs."
msgstr ""
-"移动任务至后台。\n"
+"将任务移至后台。\n"
" \n"
-" 将 JOB_SPEC 标识的任务放至后台,就像它们\n"
-" 是带 `&' 启动的一样。如果 JOB_SPEC 不存在,shell 观念中的\n"
-" 当前任务将会被使用。\n"
+" 将以 <任务说明符> 指定的任务放至后台,就像它们是带 \"&\" 启动的一样。\n"
+" 如果没有给出 <任务说明符>,shell 观念中的当前任务将会被使用。\n"
" \n"
" 退出状态:\n"
-" 返回成功除非任务管理没有启用或者错误发生。"
+" 返回成功,除非任务控制没有启用,或者有错误发生。"
#: builtins.c:793
msgid ""
@@ -3414,23 +3382,23 @@ msgid ""
msgstr ""
"记住或显示程序位置。\n"
" \n"
-" 确定并记住每一个给定 NAME 名称的命令的完整路径。\n"
+" 确定并记住每个命令 <名称> 的完整路径名。\n"
" 如果不提供参数,则显示已经记住的命令的信息。\n"
" \n"
" 选项:\n"
-" -d\t\t忘记每一个已经记住的 NAME 的位置\n"
-" -l\t\t以可作为输入重用的格式显示\n"
-" -p pathname\t使用 pathname 路径作为 NAME 命令的全路径\n"
-" -r\t\t忘记所有记住的位置\n"
-" -t\t\t打印记住的每一个 NAME 名称的位置,如果指定了多个\n"
-" \t\tNAME 名称,则每个位置前面会加上相应的 NAME 名称\n"
-" \t\t\n"
+" -d\t忘记每一个 <名称> 的已经记住的位置\n"
+" -l\t以可重新用作输入的格式显示\n"
+" -p 路径名\t使用 <路径名> 作为 <命令> 的完整路径名\n"
+" -r\t忘记所有已经记住的位置\n"
+" -t\t打印每一个 <名称> 的已经记住的位置,如果指定了多个\n"
+" \t\t<名称>,则在每个位置前面加上对应的 <名称>\n"
+" \n"
" 参数:\n"
-" NAME\t\t每个 NAME 名称会在 $PATH 路径变量中被搜索,并且添加到记住的命令\n"
-" 列表中。\n"
+" 名称\t会在 $PATH 中搜索每个 <名称>,并且添加到已经记住的命令\n"
+" \t\t列表中。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非 NAME 命令没有找到或者使用了无效的选项。"
+" 返回成功,除非没有找到 <名称>,或者使用了无效的选项。"
#: builtins.c:818
msgid ""
@@ -3454,21 +3422,19 @@ msgid ""
msgstr ""
"显示内建命令的相关信息。\n"
" \n"
-" 显示内建命令的简略信息。如果指定了 PATTERN 模式,\n"
-" 给出所有匹配 PATTERN 模式的命令的详细帮助,否则打\n"
-" 印一个帮助主题列表\n"
+" 显示内建命令的简略信息。如果指定了 <模式>,给出所有匹配 <模式>\n"
+" 的命令的详细帮助,否则打印帮助主题列表。\n"
" \n"
" 选项:\n"
" -d\t输出每个主题的简短描述\n"
-" -m\t以伪 man 手册的格式显示使用方法\n"
-" -s\t为每一个匹配 PATTERN 模式的主题仅显示一个用法\n"
-" \t简介\n"
+" -m\t以伪 man 手册的格式显示用法\n"
+" -s\t仅对每一个匹配 <模式> 的主题输出简短的用法提要\n"
" \n"
" 参数:\n"
-" PATTERN\t指定帮助主题的模式\n"
+" 模式\t用来确定帮助主题的模式\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非未找到 PATTERN 模式没有找到或者使用了无效选项。"
+" 返回成功,除非没有找到 <模式>,或者使用了无效的选项。"
#: builtins.c:842
msgid ""
@@ -3505,32 +3471,30 @@ msgid ""
msgstr ""
"显示或操纵历史列表。\n"
" \n"
-" 带行号显示历史列表,将每个被修改的条目加上 `*' 前缀。\n"
+" 带行号显示历史列表,将每个被修改的条目加上 \"*\" 前缀。\n"
" 参数 N 会仅列出最后的 N 个条目。\n"
" \n"
" 选项:\n"
-" -c\t删除所有条目从而清空历史列表。\n"
-" -d 偏移量\t从指定位置删除历史列表。负偏移量将从历史条目末尾\n"
-" \t\t开始计数\n"
+" -c\t删除所有条目从而清空历史列表\n"
+" -d 偏移量\t删除位于 <偏移量> 的历史条目。负的 <偏移量> 表示从\n"
+" \t\t历史列表末尾开始倒数\n"
" \n"
-" -a\t将当前会话的历史行追加到历史文件中\n"
-" -n\t从历史文件中读取所有未被读取的行\n"
-" \t\t并且将它们附加到历史列表\n"
+" -a\t将当前会话的历史追加到历史文件中\n"
+" -n\t从历史文件中读取所有未被读取的行,并且将它们追加到历史列表\n"
" -r\t读取历史文件并将内容追加到历史列表中\n"
" -w\t将当前历史写入到历史文件中\n"
" \n"
-" -p\t对每一个 ARG 参数展开历史并显示结果,而不存储到历史列表中\n"
-" -s\t以单条记录追加 ARG 到历史列表中\n"
+" -p\t对每一个 <参数> 执行历史展开并显示结果,而不存储到历史列表中\n"
+" -s\t将 <参数> 作为单一条目追加到历史列表中\n"
" \n"
-" 如果给定了 FILENAME 文件名,则它将被作为历史文件。否则\n"
-" 如果 $HISTFILE 变量有值的话使用之,不然使用 ~/.bash_history 文件。\n"
+" 如果给定了 <文件名>,则将其用作历史文件。否则,如果 HISTFILE 变量\n"
+" 有值的话,则使用它,否则使用 ~/.bash_history 文件。\n"
" \n"
-" 如果 $HISTTIMEFORMAT 变量被设定并且不为空,它的值会被用于\n"
-" strftime(3) 的格式字符串来打印与每一个显示的历史条目想关联的\n"
-" 时间戳,否则不打印时间戳。\n"
+" 如果 HISTTIMEFORMAT 变量被设定并且不为空,它的值会被用作 strftime(3)\n"
+" 的格式字符串,以打印每个显示的历史条目的时间戳。否则,不打印时间戳。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非使用了无效的选项或者发生错误。"
+" 返回成功,除非使用了无效的选项,或者有错误发生。"
#: builtins.c:879
msgid ""
@@ -3557,22 +3521,22 @@ msgid ""
msgstr ""
"显示任务状态。\n"
" \n"
-" 列出活动的任务。JOBSPEC 限制仅输出指定的任务。\n"
-" 不带选项时,所有活动任务的状态都会显示。\n"
+" 列出活动的任务。<任务说明符> 限制仅输出指定的任务。\n"
+" 不带选项时,显示所有活动任务的状态。\n"
" \n"
" 选项:\n"
-" -l\t在正常信息基础上列出进程号\n"
-" -n\t仅列出上次通告之后改变了状态的进程\n"
-" -p\t仅列出进程号\n"
+" -l\t在正常信息的基础上列出进程 ID\n"
+" -n\t仅列出上次通知之后改变了状态的进程\n"
+" -p\t仅列出进程 ID\n"
" -r\t限制仅输出运行中的任务\n"
-" -s\t限制仅输出停止的任务\n"
+" -s\t限制仅输出已停止的任务\n"
" \n"
-" 如果使用了 -x 选项,ARG 参数中的所有任务声明会被替换为该任务\n"
-" 的进程组头领的进程号,然后执行 COMMAND 命令。\n"
+" 如果使用了 -x 选项,<参数> 中的所有任务说明符会被替换为该任务\n"
+" 的进程组头领的进程 ID,然后用替换后的参数执行 <命令>。\n"
" \n"
" 退出状态:\n"
" 返回成功,除非使用了无效的选项或者有错误发生。\n"
-" 如果使用 -x 选项,则返回 COMMAND 命令的退出状态。"
+" 如果使用了 -x 选项,则返回 <命令> 的退出状态。"
#: builtins.c:906
msgid ""
@@ -3592,17 +3556,17 @@ msgid ""
msgstr ""
"从当前 shell 中删除任务。\n"
" \n"
-" 从活动任务表中删除每一个 JOBSPEC 参数。不带任何\n"
-" JOBSPEC 参数时,shell 使用观念中的当前任务。\n"
+" 从活动任务列表中删除每一个 <任务说明符> 参数。不带任何 <任务说明符>\n"
+" 时,shell 使用它的观念中的当前任务。\n"
" \n"
" 选项:\n"
-" -a\t如果不提供 JOBSPEC 参数,则删除所有任务\n"
-" -h\t标识每个 JOBSPEC 任务,从而当 shell 接收到 SIGHUP\n"
+" -a\t如果不提供 <任务说明符>,则删除所有任务\n"
+" -h\t标记每个 <任务说明符> 对应的任务,从而当 shell 接收到 SIGHUP\n"
" \t\t信号时不发送 SIGHUP 给指定任务\n"
" -r\t仅删除运行中的任务\n"
" \n"
" 退出状态:\n"
-" 返回成功除非使用了无效的选项或者 JOBSPEC 声明。"
+" 返回成功,除非使用了无效的选项或者 <任务说明符>。"
#: builtins.c:925
msgid ""
@@ -3628,21 +3592,22 @@ msgid ""
msgstr ""
"向一个任务发送一个信号。\n"
" \n"
-" 向以 PID 进程号或者 JOBSPEC 任务声明指定的进程发送一个以\n"
-" SIGSPEC 信号声明或 SIGNUM 信号编号命名的信号。如果没有指定\n"
-" SIGSPEC 或 SIGNUM,那么假定发送 SIGTERM 信号。\n"
+" 向以 <PID> 或者 <任务说明符> 指定的进程发送一个以 <信号说明符> 或\n"
+" <信号编号> 指定的信号。如果没有指定 <信号说明符> 和 <信号编号>,\n"
+" 那么假定发送 SIGTERM 信号。\n"
" \n"
" 选项:\n"
-" -s sig\tSIG 是信号名称\n"
-" -n sig\tSIG 是信号编号\n"
-" -l\t列出信号名称;如果参数后跟 `-l'则被假设为信号编号,\n"
-" \t\t而相应的信号名称会被列出\n"
+" -s 信号\t<信号> 是信号名称\n"
+" -n 信号\t<信号> 是信号编号\n"
+" -l\t列出所有信号名称;如果 \"-l\" 后有参数,则假定它们是信号编号,\n"
+" \t\t并列出对应的信号名称\n"
+" -L\t同 -l\n"
" \n"
-" Kill 成为 shell 内建有两个理由:它允许使用任务编号而不是进程号,\n"
-" 并且在可以创建的进程数上限达到是允许进程被杀死。\n"
+" kill 成为 shell 内建有两个理由:它允许使用任务 ID 代替进程 ID,\n"
+" 并且在您可以创建的进程数达到上限时仍可以杀死进程。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非使用了无效的选项或者有错误发生。"
+" 返回成功,除非使用了无效的选项,或者有错误发生。"
#: builtins.c:949
msgid ""
@@ -3687,22 +3652,20 @@ msgid ""
" Exit Status:\n"
" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise."
msgstr ""
-"估值算术表达式。\n"
-" \n"
-" 将每个 ARG 参赛作为算术表达式来估值。估值的计算以定宽的整\n"
-" 数完成,不带溢出检测,不过除 0 是被置陷阱的并且会报一个错\n"
-" 误。下列操作符被按照相同的算术优先级组合。列表的顺序按照\n"
-" 优先级从高至低。\n"
+"对算术表达式进行求值。\n"
" \n"
+" 将每个 <参数> 作为算术表达式进行求值。求值在固定宽度的整数中完成,\n"
+" 没有溢出检测,不过除以 0 的异常会被捕获,并且会报一个错误。下面的运算符\n"
+" 列表中,同一行的运算符的优先级相等。列表按照优先级从高到低进行排序。\n"
" \n"
-" \tid++, id--\t变量后置加,后置减\n"
-" \t++id, --id\t变量前置加,前置减\n"
-" \t-, +\t\t一元减法,一元加法\n"
-" \t!, ~\t\t逻辑和位取反\n"
+" \tid++, id--\t变量的后缀自增、后缀自减\n"
+" \t++id, --id\t变量的前缀自增、前缀自减\n"
+" \t-, +\t\t一元负号、正号\n"
+" \t!, ~\t\t逻辑和按位取反\n"
" \t**\t\t指数\n"
-" \t*, /, %\t\t乘法,除法,取余数\n"
-" \t+, -\t\t增加,减少\n"
-" \t<<, >>\t\t向左和向右按位移位\n"
+" \t*, /, %\t\t乘法、除法、取余数\n"
+" \t+, -\t\t加法、减法\n"
+" \t<<, >>\t\t按位左移、按位右移\n"
" \t<=, >=, <, >\t比较\n"
" \t==, !=\t\t等于,不等于\n"
" \t&\t\t按位与\n"
@@ -3711,18 +3674,19 @@ msgstr ""
" \t&&\t\t逻辑与\n"
" \t||\t\t逻辑或\n"
" \texpr ? expr : expr\n"
-" \t\t\t条件操作符\n"
+" \t\t\t条件运算符\n"
" \t=, *=, /=, %=,\n"
" \t+=, -=, <<=, >>=,\n"
" \t&=, ^=, |=\t赋值\n"
" \n"
-" Shell 变量允许作为操作数。表达式中的变量的名称会被取代以值\n"
-" (强制转换为定宽的整数)。表达式中的变量不需要打开整数属性。\n"
+" shell 变量允许作为操作数。变量的名称会被它的值替代(强制转换为固定\n"
+" 宽度的整数)。变量不需要打开 \"整数\" 属性就可以在表达式中使用。\n"
" \n"
-" 操作符按照优先级进行估值。括号中的子表达式将被先估值,并可取代上述表达式规则。\n"
+" 运算符按照优先级顺序进行求值。括号中的子表达式将最先求值,\n"
+" 并可以覆盖上述优先级规则。\n"
" \n"
" 退出状态:\n"
-" 如果最后一个 ARG 参数估值为 0,则 let 返回 1; 否则 let 返回 0。"
+" 如果最后一个 <参数> 求值结果为 0,则 let 返回 1; 否则 let 返回 0。"
#: builtins.c:994
msgid ""
@@ -3769,38 +3733,38 @@ msgid ""
" (in which case it's greater than 128), a variable assignment error occurs,\n"
" or an invalid file descriptor is supplied as the argument to -u."
msgstr ""
-"从标准输入读取一行并将其分为不同的域。\n"
+"从标准输入读取一行,并将其分割为不同的字段。\n"
" \n"
-" 从标准输入读取单独的一行,或者如果使用了 -u 选项,从文件描述符 FD 中读取。\n"
-" 该行被分割成域,如同词语分割一样,并且第一个词被赋值给第一个 NAME 变量,第二\n"
-" 个词被赋值给第二个 NAME 变量,如此继续,直到剩下所有的词被赋值给最后一个 NAME\n"
-" 变量。只有 $IFS 变量中的字符被认作是词语分隔符。\n"
+" 从标准输入读取单独的一行,或者如果使用了 -u 选项,从文件描述符 <FD> 中\n"
+" 读取。该行会被分割成字段,如同分割词语一样,并且第一个词被赋值给第一个\n"
+" <名称>,第二个词被赋值给第二个 <名称>,以此类推,剩下所有的词被赋值给\n"
+" 最后一个 <名称>。只有 $IFS 中的字符会被视为词语分隔符。\n"
" \n"
-" 如果没有提供 NAME 变量,则读取的行被存放在 REPLY 变量中。\n"
+" 如果没有提供 <名称>,则读取的行被存放在 REPLY 变量中。\n"
" \n"
" 选项:\n"
-" -a array\t将词语赋值给 ARRAY 数组变量的序列下标成员,从零开始\n"
-" -d delim\t持续读取直到读入 DELIM 变量中的第一个字符,而不是换行符\n"
+" -a 数组\t将词语按顺序赋值给 <数组> 变量的各个成员,索引从零开始\n"
+" -d 分隔符\t继续读取,直到遇到 <分隔符> 的第一个字符,而不是换行符\n"
" -e\t使用 Readline 获取行\n"
-" -i text\t使用 TEXT 文本作为 Readline 的初始文字\n"
-" -n nchars\t读取 nchars 个字符之后返回,而不是等到读取换行符。\n"
-" \t\t但是分隔符仍然有效,如果遇到分隔符之前读取了不足 nchars 个字符。\n"
-" -N nchars\t在准确读取了 nchars 个字符之后返回,除非遇到文件结束符或者读超时,\n"
-" \t\t任何的分隔符都被忽略\n"
-" -p prompt\t在尝试读取之前输出 PROMPT 提示符并且不带\n"
-" \t\t换行符\n"
+" -i 文本\t使用 <文本> 作为 Readline 的初始文字\n"
+" -n 字符数\t读取 <字符数> 个字符之后返回,而不是等到读取换行符。\n"
+" \t\t但是如果读取了不到 <字符数> 个字符就遇到了分隔符,\n"
+" \t\t则分隔符仍然生效\n"
+" -N 字符数\t仅在恰好读取了 <字符数> 个字符之后返回,除非遇到 EOF\n"
+" \t\t或者读取超时。忽略所有的分隔符\n"
+" -p 提示符\t在尝试进行读取之前先输出 <提示符>(不加换行)\n"
" -r\t不允许反斜杠转义任何字符\n"
-" -s\t不回显终端的任何输入\n"
-" -t timeout\t如果在 TIMEOUT 秒内没有读取一个完整的行则超时并且返回失败。\n"
-" \t\tTMOUT 变量的值是默认的超时时间。TIMEOUT 可以是小数。\n"
-" \t\t如果 TIMEOUT 是 0,那么仅当在指定的文件描述符上输入有效的时候,\n"
-" \t\tread 才返回成功;否则它将立刻返回而不尝试读取任何数据。\n"
-" \t\t如果超过了超时时间,则返回状态码大于 128\n"
-" -u fd\t从文件描述符 FD 中读取,而不是标准输入\n"
+" -s\t不回显来自终端的输入\n"
+" -t 超时\t如果在 <超时> 秒内没有读取一个完整的行则超时并且返回失败。\n"
+" \t\t默认的超时时间是 TMOUT 变量的值。<超时> 可以是小数。\n"
+" \t\t如果 <超时> 是 0,read 会立即返回而不尝试读取任何数据,\n"
+" \t\t且仅当可以从指定的文件描述符获取输入时,才返回成功。\n"
+" \t\t如果超过了超时时间,则退出状态大于 128\n"
+" -u fd\t从文件描述符 <FD> 中读取,而不是标准输入\n"
" \n"
" 退出状态:\n"
-" 返回码为零,除非遇到了文件结束符、读超时(且返回码不大于128)、\n"
-" 出现了变量赋值错误或者无效的文件描述符作为参数传递给了 -u 选项。"
+" 返回码为零,除非遇到了文件结束符、读取超时(此时返回码大于 128)、\n"
+" 发生了变量赋值错误,或者 -u 选项的参数中的文件描述符无效。"
#: builtins.c:1041
msgid ""
@@ -3815,12 +3779,11 @@ msgid ""
msgstr ""
"从一个 shell 函数返回。\n"
" \n"
-" 使一个函数或者被引用的脚本以指定的返回值 N 退出。\n"
-" 如果 N 被省略,则返回状态就是\n"
-" 函数或脚本中的最后一个执行的命令的状态。\n"
+" 使一个函数或者被 source 的脚本退出,返回值为 N。如果 N 被\n"
+" 省略,则返回状态为函数或脚本中最后一个被执行的命令的返回状态。\n"
" \n"
" 退出状态:\n"
-" 返回 N,或者如果 shell 不在执行一个函数或引用脚本时,失败。"
+" 返回 N,或者如果 shell 不在执行一个函数或脚本时,返回失败。"
#: builtins.c:1054
msgid ""
@@ -3907,81 +3870,74 @@ msgid ""
msgstr ""
"设定或取消设定 shell 选项和位置参数的值。\n"
" \n"
-" 改变 shell 选项和位置参数的值,或者显示 shell 变量的\n"
-" 名称和值。\n"
+" 改变 shell 属性和位置参数的值,或者显示 shell 变量的名称和值。\n"
" \n"
" 选项:\n"
-" -a 标记修改的或者创建的变量为导出。\n"
-" -b 立即通告任务终结。\n"
+" -a 标记修改的或者创建的变量为导出变量。\n"
+" -b 在任务终止时立即进行通知。\n"
" -e 如果一个命令以非零状态退出,则立即退出。\n"
-" -f 禁用文件名生成(模式匹配)。\n"
-" -h 当查询命令时记住它们的位置\n"
-" -k 所有的赋值参数被放在命令的环境中,而不仅仅是\n"
-" 命令名称之前的参数。\n"
+" -f 禁用文件名生成(通配符匹配)。\n"
+" -h 查找命令时记住它们的位置。\n"
+" -k 所有的赋值参数都会进入命令的环境,而不仅仅是命令名称\n"
+" 之前的参数。\n"
" -m 启用任务控制。\n"
-" -n 读取命令但不执行\n"
+" -n 读取命令但不执行。\n"
" -o 选项名\n"
-" 设定与选项名对应的变量:\n"
+" 设定与 <选项名> 对应的变量:\n"
" allexport 与 -a 相同\n"
" braceexpand 与 -B 相同\n"
-" emacs 使用 emacs 风格的行编辑界面\n"
+" emacs 使用 emacs 风格的行编辑界面\n"
" errexit 与 -e 相同\n"
" errtrace 与 -E 相同\n"
" functrace 与 -T 相同\n"
" hashall 与 -h 相同\n"
" histexpand 与 -H 相同\n"
" history 启用命令历史\n"
-" ignoreeof shell 读取文件结束符时不会退出\n"
+" ignoreeof shell 读取到 EOF 时不会退出\n"
" interactive-comments\n"
-" 允许在交互式命令中显示注释\n"
+" 允许交互式命令中出现注释\n"
" keyword 与 -k 相同\n"
" monitor 与 -m 相同\n"
" noclobber 与 -C 相同\n"
" noexec 与 -n 相同\n"
" noglob 与 -f 相同\n"
-" nolog 目前可接受但是被忽略\n"
+" nolog 目前可接受,但会被忽略\n"
" notify 与 -b 相同\n"
" nounset 与 -u 相同\n"
" onecmd 与 -t 相同\n"
" physical 与 -P 相同\n"
-" pipefail 管道的返回值是最后一个非零返回值的命令的返回结果,\n"
-" 或者当所有命令都返回零是也为零。\n"
-" posix 改变默认时和 Posix 标准不同的 bash 行为\n"
-" 以匹配标准\n"
+" pipefail 流水线的返回值是最后一个以非零状态退出的命令的退出\n"
+" 状态,或者如果没有命令以非零状态退出,则返回零。\n"
+" posix 改变 bash 中默认操作和 Posix 标准不同的行为,\n"
+" 以符合标准\n"
" privileged 与 -p 相同\n"
" verbose 与 -v 相同\n"
" vi 使用 vi 风格的行编辑界面\n"
" xtrace 与 -x 相同\n"
-" -p 无论何时当真实的有效的用户身份不匹配时打开。\n"
-" 禁用对 $ENV 文件的处理以及导入 shell 函数。\n"
-" 关闭此选项会导致有效的用户编号和组编号设定\n"
-" 为真实的用户编号和组编号\n"
+" -p 只要真实用户 ID 和有效用户 ID 不匹配时就会被打开。\n"
+" 禁用对 $ENV 文件的处理以及 shell 函数的导入。关闭此选项\n"
+" 会导致有效 uid 和 gid 被设定为真实 uid 和 gid。\n"
" -t 读取并执行一个命令之后退出。\n"
-" -u 替换时将为设定的变量当作错误对待。\n"
-" -v 读取 shell 输入行时将它们打印。\n"
-" -x 执行命令时打印它们以及参数。\n"
-" -B shell 将执行花括号扩展。\n"
-" -C 设定之后禁止以重定向输出的方式覆盖常\n"
-" 规文件。\n"
-" -E 设定之后 ERR 陷阱会被 shell 函数继承。\n"
-" -H 启用 ! 风格的历史替换。当 shell 是交互式的\n"
-" 时候这个标识位默认打开。\n"
-" -P 设定之后类似 cd 的会改变当前目录的命令不\n"
-" 追踪符号链接。\n"
-" -T 设定之后 DEBUG 陷阱会被 shell 函数继承。\n"
-" -- 任何剩余的参数会被赋值给位置参数。如果没\n"
-" 有剩余的参数,位置参数不会被设置。\n"
-" - 任何剩余的参数会被赋值给位置参数。\n"
-" -x 和 -v 选项已关闭。\n"
-" \n"
-" 使用 + 而不是 - 会使标志位被关闭。标志位也可以在\n"
-" shell 被启动时使用。当前的标志位设定可以在 $- 变\n"
-" 量中找到。剩余的 ARG 参数是位置参数并且是按照\n"
-" $1, $2, .. $n 的顺序被赋值的。如果没有给定 ARG\n"
-" 参数,则打印所有的 shell 变量。\n"
+" -u 替换时将未设定的变量视为错误。\n"
+" -v 读取 shell 输入行时将其打印。\n"
+" -x 执行命令时打印命令及其参数。\n"
+" -B shell 会执行大括号展开。\n"
+" -C 设定之后,禁止以重定向输出的方式覆盖普通文件。\n"
+" -E 设定之后,ERR 陷阱会被 shell 函数继承。\n"
+" -H 启用 ! 风格的历史替换。当 shell 是交互式的时候这个标志默认打开。\n"
+" -P 设定之后,当执行会改变当前目录的命令,例如 cd 时,不解析符号链接。\n"
+" -T 设定之后,DEBUG 和 RETURN 陷阱会被 shell 函数继承。\n"
+" -- 将所有剩余的参数赋值给位置参数。\n"
+" 如果没有剩余的参数,则取消设定位置参数。\n"
+" - 将所有剩余的参数赋值给位置参数。\n"
+" 关闭 -x 和 -v 选项。\n"
+" \n"
+" 使用 + 而不是 - 会关闭标志。标志也可以在 shell 被启动时使用。当前已设定的\n"
+" 标志可以在 $- 变量中找到。剩余的 n 个 <参数> 是位置参数,并且会被按顺序\n"
+" 赋值给 $1, $2, .. $n。如果没有给定 <参数>,则打印所有的 shell 变量。\n"
" \n"
" 退出状态:\n"
-" 返回成功除非使用了无效的参数。"
+" 返回成功,除非使用了无效的参数。"
#: builtins.c:1139
msgid ""
@@ -4005,19 +3961,21 @@ msgid ""
msgstr ""
"取消设定 shell 变量和函数的值和属性。\n"
" \n"
-" 对每一个 NAME 名称,删除对应的变量或函数。\n"
+" 对于每一个 <名称>,删除对应的变量或函数。\n"
" \n"
" 选项:\n"
-" -f\t将每个 NAME 视为函数\n"
-" -v\t将每个 NAME 视为变量\n"
-" -n\t将每个 NAME 视为名称引用,只取消其本身而非其指向的变量\n"
+" -f\t将每个 <名称> 视为 shell 函数\n"
+" -v\t将每个 <名称> 视为 shell 变量\n"
+" -n\t将每个 <名称> 视为名称引用,并取消设定该变量本身,而不是\n"
+" \t\t其引用的变量\n"
" \n"
-" 不带选项时,unset 首先尝试取消设定一个变量,如果失败,再尝试取消设定一个函数。\n"
+" 不带选项时,unset 首先尝试取消设定一个变量,如果失败,再尝试取消设定\n"
+" 一个函数。\n"
" \n"
-" 某些变量不可以被取消设定;参见 `readonly'。\n"
+" 某些变量不可以被取消设定;参见 \"readonly\"。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非使用了无效的选项或者 NAME 名称为只读。"
+" 返回成功,除非使用了无效的选项,或者 <名称> 为只读。"
#: builtins.c:1161
msgid ""
@@ -4036,20 +3994,20 @@ msgid ""
" Exit Status:\n"
" Returns success unless an invalid option is given or NAME is invalid."
msgstr ""
-"为 shell 变量设定导出属性。\n"
+"为 shell 变量设定 \"导出\" 属性。\n"
" \n"
-" 标记每个 NAME 名称为自动导出到后续命令执行的环境。如果提供了 VALUE\n"
-" 则导出前将 VALUE 作为赋值。\n"
+" 标记每个 <名称>,将其自动导出到后续执行的命令的环境。\n"
+" 如果提供了 <值>,则导出前将其赋值为 <值>。\n"
" \n"
" 选项:\n"
-" -f\t指 shell 函数\n"
-" -n\t删除每个 NAME 名称的导出属性\n"
+" -f\t所指代的是 shell 函数\n"
+" -n\t删除每个 <名称> 的 \"导出\" 属性\n"
" -p\t显示所有导出的变量和函数的列表\n"
" \n"
-" `--' 的参数禁用进一步的选项处理。\n"
+" 参数 \"--\" 禁用后续的选项处理。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非使用了无效的选项或者 NAME 名称。"
+" 返回成功,除非使用了无效的选项,或者 <名称> 无效。"
#: builtins.c:1180
msgid ""
@@ -4073,19 +4031,19 @@ msgid ""
msgstr ""
"标记 shell 变量为不可改变。\n"
" \n"
-" 标记每一个 NAME 名称为只读;这些 NAME 变量的值将不可以被后续的赋值\n"
-" 操作所改变。如果提供了 VALUE,则在标记为只读之前将 VALUE 值赋给变量。\n"
+" 标记每一个 <名称> 为只读;这些 <名称> 的值将不可以被后续的赋值操作\n"
+" 所改变。如果提供了 <值>,则在标记为只读之前将 <值> 赋给变量。\n"
" \n"
" 选项:\n"
-" -a\t指下标数组变量\n"
-" -A\t指关联数组标量\n"
-" -f\t指 shell 函数\n"
-" -p\t显示只读变量或函数列表,取决于是否提供了 -f 选项\n"
+" -a\t所指代的是索引数组变量\n"
+" -A\t所指代的是关联数组变量\n"
+" -f\t所指代的是 shell 函数\n"
+" -p\t显示所有只读变量或者函数的列表,取决于是否提供了 -f 选项\n"
" \n"
-" `--' 的参数禁用进一步的选项处理。\n"
+" 参数 \"--\" 禁用后续的选项处理。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非使用了无效的选项或者 NAME 名称。"
+" 返回成功,除非使用了无效的选项,或者 <名称> 无效。"
#: builtins.c:1202
msgid ""
@@ -4099,11 +4057,11 @@ msgid ""
msgstr ""
"移位位置参数。\n"
" \n"
-" 重命名位置参数 $N+1、$N+2 ... 到 $1、$2 ... 如果没有给定 N,\n"
-" 则假设为1.\n"
+" 将位置参数 $N+1,$N+2 ... 重命名为 $1,$2 ...。如果没有给定 N,\n"
+" 则假定 N 为 1。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非 N 为负或者大于 $#。"
+" 返回成功,除非 N 为负数或者大于 $#。"
#: builtins.c:1214 builtins.c:1229
msgid ""
@@ -4120,12 +4078,13 @@ msgid ""
msgstr ""
"在当前 shell 中执行一个文件中的命令。\n"
" \n"
-" 在当前 shell 中读取并执行 FILENAME 文件中的命令。$PATH 变量中的\n"
-" 条目被用于寻找包含 FILENAME 文件的目录。如果提供了任何的 ARGUMENTS\n"
-" 参数,则它们将成为 FILENAME 文件执行时的位置参数。\n"
+" 在当前 shell 中读取并执行 <文件名> 中的命令。将使用 $PATH 变量中的\n"
+" 条目寻找包含 <文件名> 的目录。如果提供了 <参数>,则它们将成为\n"
+" <文件名> 执行时的位置参数。\n"
" \n"
" 退出状态:\n"
-" 返回 FILENAME 文件中最后一个命令的状态;如果 FILENAME 文件不可读则失败。"
+" 返回 <文件名> 中最后一个被执行的命令的状态;如果无法读取 <文件名>,\n"
+" 则返回失败。"
#: builtins.c:1245
msgid ""
@@ -4140,16 +4099,16 @@ msgid ""
" Exit Status:\n"
" Returns success unless job control is not enabled or an error occurs."
msgstr ""
-"挂起 shell 执行。\n"
+"挂起 shell 的执行。\n"
" \n"
-" 挂起 shell 的执行直到收到 SIGCONT 信号。\n"
+" 挂起此 shell 的执行,直到它收到 SIGCONT 信号。\n"
" 登录 shell 不可以被挂起,除非强制执行。\n"
" \n"
" 选项:\n"
-" -f\t强制挂起,即使是登录 shell。\n"
+" -f\t强制挂起,即使此 shell 是登录 shell。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非没有启用任务控制或者有错误发生。"
+" 返回成功,除非没有启用任务控制,或者有错误发生。"
#: builtins.c:1261
msgid ""
@@ -4231,77 +4190,82 @@ msgid ""
" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
" false or an invalid argument is given."
msgstr ""
-"对条件表达式进行估值。\n"
-" \n"
-" 根据 EXPR 表达式的估值以状态 0 (真) 或 1 (伪) 退出。\n"
-" 表达式可以是一元或者二元的。一元表达式通常用于检测\n"
-" 文件状态。同时还有字符串操作符和数字比较操作符。\n"
-" \n"
-" 文件操作符:\n"
-" \n"
-" -a 文件 如果文件存在则为真。\n"
-" -b 文件 如果文件为块特殊文件则为真。\n"
-" -c 文件 如果文件为字符特殊文件则为真。\n"
-" -d 文件 如果文件为目录则为真。\n"
-" -e 文件 如果文件存在则为真。\n"
-" -f 文件 如果文件存在且为常规文件则为真。\n"
-" -g 文件 如果文件的组属性设置打开则为真。\n"
-" -h 文件 如果文件为符号链接则为真。\n"
-" -L 文件 如果文件为符号链接则为真。\n"
-" -k 文件 如果文件的粘滞 (sticky) 位设定则为真。\n"
-" -p 文件 如果文件为命名管道则为真。\n"
-" -r 文件 如果文件对于您是可读的则为真。\n"
-" -s 文件 如果文件存在且不为空则为真。\n"
-" -S 文件 如果文件是套接字则为真。\n"
-" -t 文件描述符 如果文件描述符在一个终端上打开则为真。\n"
-" -u 文件 如果文件的用户数行设置打开则为真。\n"
-" -w 文件 如果文件对您是可写的则为真\n"
-" -x 文件 如果文件对您是可执行的则为真。\n"
-" -O 文件 如果文件是被您所有的则为真。\n"
-" -G 文件 如果文件被您的组所有则为真。\n"
-" -N 文件 如果文件上次被读取之后修改过则为真。\n"
-" \n"
-" FILE1 -nt FILE2 如果 file1 文件新于 file2 文件则为真(根据\n"
-" 修改日期)。\n"
-" \n"
-" FILE1 -ot FILE2 如果 file1 文件旧于 file2 文件则为真。\n"
-" \n"
-" FILE1 -ef FILE2 如果 file1 文件是 file2 文件的硬链接则为真。\n"
-" \n"
-" 字符串操作符\n"
-" \n"
-" -z 字符串 如果字符串为空则为真。\n"
+"对条件表达式进行求值。\n"
" \n"
-" -n 字符串\n"
-" 字符串 如果字符串不为空则为真。\n"
+" 根据 <表达式> 的求值结果,以状态 0(真)或 1(假)退出。\n"
+" 表达式可以是一元的或者二元的。一元表达式通常用于检测文件状态。\n"
+" 同时还有字符串运算符和数值比较运算符。\n"
" \n"
-" STRING1 = STRING2\n"
-" 如果 string1 和 string2 字符串相同则为真。\n"
-" STRING1 != STRING2\n"
-" 如果 string1 和 string2 字符串不相同则为真。\n"
-" STRING1 < STRING2\n"
-" 如果按字典排序 string1 在 string2 串之前则为真。\n"
-" STRING1 > STRING2\n"
-" 如果按字典排序 string1 在 string2 串之前则为真。\n"
+" test 的行为取决于参数的数量。请阅读 bash 手册页以获取完整的\n"
+" 说明文档。\n"
" \n"
-" 其他操作符:\n"
+" 文件运算符:\n"
" \n"
-" -o 选项 如果指定 shell 选项启用则为真。\n"
-" -v VAR 如果指定 Shell 变量 VAR 已赋值则为真。\n"
-" -R VAR 如果指定 Shell 变量 VAR 已赋值且为名称引用则为真。\n"
-" ! EXPR 如果表达式 expr 为假则为真。\n"
-" EXPR1 -a EXPR2 如果 expr1 和 expr2 都为真则为真。\n"
-" EXPR1 -o EXPR2 如果 expr1 和 expr2 有一个为真则为真。\n"
+" -a 文件 如果 <文件> 存在则为真。\n"
+" -b 文件 如果 <文件> 为块特殊文件则为真。\n"
+" -c 文件 如果 <文件> 为字符特殊文件则为真。\n"
+" -d 文件 如果 <文件> 为目录则为真。\n"
+" -e 文件 如果 <文件> 存在则为真。\n"
+" -f 文件 如果 <文件> 存在且为普通文件则为真。\n"
+" -g 文件 如果 <文件> 设置了 setgid 位则为真。\n"
+" -h 文件 如果 <文件> 为符号链接则为真。\n"
+" -L 文件 如果 <文件> 为符号链接则为真。\n"
+" -k 文件 如果 <文件> 设置了粘滞位 (sticky bit) 则为真。\n"
+" -p 文件 如果 <文件> 为命名管道则为真。\n"
+" -r 文件 如果 <文件> 对您是可读的则为真。\n"
+" -s 文件 如果 <文件> 存在且不为空则为真。\n"
+" -S 文件 如果 <文件> 是套接字则为真。\n"
+" -t FD 如果文件描述符 <FD> 已在一个终端上打开则为真。\n"
+" -u 文件 如果 <文件> 设置了 setuid 位则为真。\n"
+" -w 文件 如果 <文件> 对您是可写的则为真。\n"
+" -x 文件 如果 <文件> 对您是可执行的则为真。\n"
+" -O 文件 如果 <文件> 是被您(有效 uid)所有的则为真。\n"
+" -G 文件 如果 <文件> 是被您的组(有效 gid)所有的则为真。\n"
+" -N 文件 如果 <文件> 上次读取之后被修改过则为真。\n"
" \n"
-" arg1 OP arg2 算术测试。OP操作符可以是 -eq、-ne、\n"
-" -lt、-le、-gt、或 -ge 中的一个。\n"
+" 文件1 -nt 文件2 如果 <文件1> 新于 <文件2> 则为真(根据修改日期)。\n"
" \n"
-" 二元算术操作返回真,如果 ARG1 参数等于、不等于、\n"
-" 小于、小于等于、大于、或者大于等于 ARG2 参数。\n"
+" 文件1 -ot 文件2 如果 <文件1> 旧于 <文件2> 则为真。\n"
+" \n"
+" 文件1 -ef 文件2 如果 <文件1> 是到 <文件2> 的硬链接则为真。\n"
+" \n"
+" 字符串运算符:\n"
+" \n"
+" -z 字符串 如果 <字符串> 为空则为真。\n"
+" \n"
+" -n 字符串\n"
+" 字符串 如果 <字符串> 不为空则为真。\n"
+" \n"
+" 字符串1 = 字符串2\n"
+" 如果两个字符串相等则为真。\n"
+" 字符串1 != 字符串2\n"
+" 如果两个字符串不相等则为真。\n"
+" 字符串1 < 字符串2\n"
+" 如果按字典序 <字符串1> 在 <字符串2> 之前则为真。\n"
+" 字符串1 > 字符串2\n"
+" 如果按字典序 <字符串1> 在 <字符串2> 之后则为真。\n"
+" \n"
+" 其他运算符:\n"
+" \n"
+" -o 选项 如果指定的 shell 选项 <选项> 启用则为真。\n"
+" -v 变量 如果指定的 shell 变量 <变量> 已设定则为真。\n"
+" -R 变量 如果指定的 shell 变量 <变量> 已设定且为名称引用则为真。\n"
+" ! 表达式 如果 <表达式> 为假则为真。\n"
+" 表达式1 -a 表达式2\n"
+" 如果 <表达式1> 和 <表达式2> 都为真则为真。\n"
+" 表达式1 -o 表达式2\n"
+" 如果 <表达式1> 和 <表达式2> 中任何一个为真则为真。\n"
+" \n"
+" 参数1 运算符 参数2\n"
+" 算术测试。<运算符> 可以是 -eq、-ne、\n"
+" -lt、-le、-gt 或 -ge 中的一个。\n"
+" \n"
+" 二元算术运算符返回真,如果 <参数1> 等于、不等于、小于、小于等于、\n"
+" 大于,或者大于等于 <参数2>。\n"
" \n"
" 退出状态:\n"
-" 如果 EXPR 表达式估值为真则返回成功;如果 EXPR 表达式估值\n"
-" 为假或者使用了无效的参数则返回失败。"
+" 如果 <表达式> 求值结果为真则返回成功;如果 <表达式> 求值结果为假,\n"
+" 或者使用了无效的参数,则返回失败。"
#: builtins.c:1343
msgid ""
@@ -4310,10 +4274,9 @@ msgid ""
" This is a synonym for the \"test\" builtin, but the last argument must\n"
" be a literal `]', to match the opening `['."
msgstr ""
-"估值条件表达式。\n"
+"对条件表达式进行求值。\n"
" \n"
-" 是内建命令 \"test\" 的同义词,但是最后一个参数必须是\n"
-" 字符 `]',以匹配起始的 `['。"
+" 同 \"test\" 内建,但是最后一个参数必须是字符 \"]\",以匹配起始的 \"[\"。"
#: builtins.c:1352
msgid ""
@@ -4325,12 +4288,11 @@ msgid ""
" Exit Status:\n"
" Always succeeds."
msgstr ""
-"显示进程时间\n"
+"显示进程时间。\n"
" \n"
-" 打印 shell 及其所有子进程的累计用户空间和\n"
-" 系统空间执行时间。\n"
+" 打印此 shell 及其所有子进程的累计用户和系统时间。\n"
" \n"
-" 退出状态\n"
+" 退出状态:\n"
" 总是成功。"
# EXIT and DEBUG should be as-is. Use before you translate, please.
@@ -4369,32 +4331,34 @@ msgid ""
" Exit Status:\n"
" Returns success unless a SIGSPEC is invalid or an invalid option is given."
msgstr ""
-"对信号和其他事件设陷阱。\n"
+"为信号和其他事件设置陷阱。\n"
" \n"
-" 定义一个处理器,在 shell 接收到信号和其他条件下执行。\n"
+" 定义并激活当 shell 接收到信号或满足其他条件时执行的处理程序。\n"
" \n"
-" ARG 参数是当 shell 接收到 SIGNAL_SPEC 信号时读取和执行的命令。\n"
-" 如果没有指定 ARG 参数 (并且只给出一个 SIGNAL_SPEC 信号) 或者\n"
-" ARG 参数为\n"
-" `-',每一个指定的参数会被重置为原始值。如果 ARG 参数是一个空串,则每一个\n"
-" SIGNAL_SPEC 信号会被 shell 和它启动的命令忽略。\n"
+" <参数> 是当 shell 接收到 <信号说明符> 时读取和执行的命令。如果\n"
+" 没有指定 <参数>(并且只给出一个 <信号说明符>)或者 <参数> 为 \"-\",\n"
+" 则每一个指定的信号会被重置为原始值。如果 <参数> 是空字符串,则每一个\n"
+" <信号说明符> 会被 shell 和它启动的命令忽略。\n"
" \n"
-" 如果一个 SIGNAL_SPEC 信号是 EXIT (0) ,则 ARG 命令会在 shell 退出时被\n"
-" 执行。如果一个 SIGNAL_SPEC 信号是 DEBUG,则 ARG命令会在每一个简单命\n"
-" 令之前执行。\n"
+" 如果一个 <信号说明符> 是 EXIT (0),则 <参数> 会在 shell 退出时被执行。\n"
+" 如果一个 <信号说明符> 是 DEBUG,则 <参数> 会在每一个简单命令之前执行。\n"
+" 如果一个 <信号说明符> 是 RETURN,则 <参数> 会在每一个 shell 函数或者\n"
+" 通过 . 或 source 内建执行的脚本执行结束时被执行。如果一个 <信号说明符>\n"
+" 是 ERR,则 <参数> 会在命令返回失败,并且假如启用了 -e 选项,本次失败就\n"
+" 会导致 shell 退出的情况下被执行。\n"
" \n"
-" 如果不提供参数,trap 打印列表显示每一个与每一个信号相关联的命令。\n"
+" 如果不提供参数,trap 打印与每一个信号相关联的命令列表。\n"
" \n"
" 选项:\n"
-" -l\t打印一个信号名称和它们对应的编号的列表\n"
-" -p\t打印与每个 SIGNAL_SPEC 信号相关联的陷阱命令\n"
+" -l\t打印信号名称以及和它们对应的编号的列表\n"
+" -p\t打印与每个 <信号说明符> 相关联的陷阱命令\n"
" \n"
-" 每一个 SIGNAL_SPEC 信号可以是 <signal.h> 中的信号名称或者信号编号。\n"
-" 信号名称大小写敏感且可以使用 SIG 前缀。信号可用 \"kill -信号 $$\"\n"
-" 发送给 shell。\n"
+" 每一个 <信号说明符> 可以是 <signal.h> 中的信号名称或者信号编号。信号名称\n"
+" 是大小写敏感的,并且 SIG 前缀是可选的。可以使用 \"kill -信号 $$\" 给 shell\n"
+" 发送信号。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非使用了无效的选项或者 SIGSPEC。"
+" 返回成功,除非使用了无效的 <信号说明符>,或者无效的选项。"
#: builtins.c:1400
msgid ""
@@ -4424,28 +4388,27 @@ msgid ""
" Exit Status:\n"
" Returns success if all of the NAMEs are found; fails if any are not found."
msgstr ""
-"显示命令类型的信息。\n"
+"显示关于命令类型的信息。\n"
" \n"
-" 对于每一个 NAME 名称,指示如果作为命令它将如何被解释。\n"
+" 对于每一个 <名称>,指出如果作为命令名使用时,它将如何被解释。\n"
" \n"
" 选项:\n"
-" -a\t显示所有包含名称为 NAME 的可执行文件的位置;\n"
-" \t\t包括别名、内建和函数。仅当 `-p' 选项没有使用时\n"
-" -f\t抑制 shell 函数查询\n"
-" -P\t为每个 NAME 名称惊醒 PATH 路径搜索,即使它是别名、\n"
-" \t\t内建或函数,并且返回将被执行的磁盘上文件的名称。\n"
-" -p\t返回将被执行的磁盘上文件的名称,或者当 `type -t NAME'\n"
-" \t不返回 `file' 时,不返回任何值。\n"
-" -t\t返回下列词中的任何一个 `alias'、`keyword'、\n"
-" \t`function'、`builtin'、`file' 或者 `',相应地如果 NAME 是\n"
-" \t一个别名、shell 保留字、shell 函数、shell 内建、\n"
-" \t磁盘文件或没有找到。\n"
+" -a\t当且仅当没有同时使用 \"-p\" 选项时,显示所有包含名为 <名称>\n"
+" \t\t的可执行文件的位置;包括别名、内建和函数\n"
+" -f\t阻止 shell 函数查找流程\n"
+" -P\t强制对每个 <名称> 搜索 PATH,即使它是别名、内建或函数,\n"
+" \t\t并且返回将被执行的磁盘上的文件的名称\n"
+" -p\t返回将被执行的磁盘上的文件的名称,或者当 \"type -t 名称\"\n"
+" \t\t不返回 \"file\" 时,不返回任何值\n"
+" -t\t返回下列单词中的一个:\"alias\"、\"keyword\"、\"function\"、\n"
+" \t\t\"builtin\"、\"file\" 或者 \"\",分别表示 <名称> 是一个别名、\n"
+" \t\tshell 保留字、shell 函数、shell 内建、磁盘文件或者未找到\n"
" \n"
" 参数:\n"
-" NAME\t将要解析的命令。\n"
+" 名称\t需要解释的命令。\n"
" \n"
" 退出状态:\n"
-" 如果所有的 NAME 命令都找到则返回成功;任何一个找不到则失败。"
+" 如果所有的 <名称> 都被找到则返回成功;任何一个未找到则失败。"
#: builtins.c:1431
msgid ""
@@ -4497,17 +4460,17 @@ msgid ""
msgstr ""
"修改 shell 资源限制。\n"
" \n"
-" 在允许此类控制的系统上,提供对于 shell 及其创建的进程所可用的\n"
-" 资源的控制。\n"
+" 在允许此类控制的系统上,提供对于 shell 及其创建的进程可使用的资源的\n"
+" 控制。\n"
" \n"
" 选项:\n"
-" -S\t使用软 (`soft') 资源限制\n"
-" -H\t使用硬 (`hard') 资源限制\n"
+" -S\t使用 \"软\" (soft) 资源限制\n"
+" -H\t使用 \"硬\" (hard) 资源限制\n"
" -a\t报告当前的所有限制\n"
" -b\t套接字缓冲区大小\n"
" -c\t创建的核心文件的最大大小\n"
" -d\t一个进程的数据段的最大大小\n"
-" -e\t调度优先级 (`nice')的最大值\n"
+" -e\t调度优先级 (nice) 的最大值\n"
" -f\tshell 及其子进程可以写的最大文件大小\n"
" -i\t可以挂起的最大信号数量\n"
" -k\t分配给此进程的最大 kqueue 数量\n"
@@ -4526,17 +4489,18 @@ msgstr ""
" -R\t实时进程阻塞前可运行的最大时间\n"
" -T\t最大线程数量\n"
" \n"
-" 并非所有选项在所有系统上可用。\n"
+" 并非所有选项都在所有系统上可用。\n"
" \n"
-" 如果提供了 <限制>,则它将成为指定资源的新的值;特殊的 <限制> 值为\n"
-" `soft'、`hard' 和 `unlimited',分别表示当前的软限制,硬限制和无限制。\n"
-" 否则,打印指定资源的当前限制值。如果未提供选项,则假定为 -f。\n"
+" 如果提供了 <限制>,则它将成为指定的资源的新的值;特殊的 <限制> 值为\n"
+" \"soft\"、\"hard\" 和 \"unlimited\",分别表示当前的软限制、当前的硬限制,\n"
+" 以及无限制。否则,打印指定资源的当前限制值。如果未提供选项,则假定\n"
+" 为 -f。\n"
" \n"
-" 限制值都以 1024 字节为单位,除了 -t 以秒为单位,-p 以 512 字节为单位,\n"
+" 限制值的单位都是 1024 字节,除了 -t 单位是秒,-p 单位是 512 字节,\n"
" -u 为未经缩放的进程数量。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非使用了无效的选项或者有错误发生。"
+" 返回成功,除非使用了无效的选项,或者有错误发生。"
#: builtins.c:1482
msgid ""
@@ -4557,18 +4521,17 @@ msgid ""
msgstr ""
"显示或设定文件模式掩码。\n"
" \n"
-" 设定用户文件创建掩码为 MODE 模式。如果省略了 MODE,则\n"
-" 打印当前掩码的值。\n"
+" 设定用户文件创建掩码为 <模式>。如果省略 <模式>,则打印当前掩码的值。\n"
" \n"
-" 如果 MODE 模式以数字开头,则被当作八进制数解析;否则是一个\n"
-" chmod(1) 可接收的符号模式串。\n"
+" 如果 <模式> 以数字开头,则按照八进制数进行解释;否则视为一个\n"
+" chmod(1) 可接受的符号模式串。\n"
" \n"
" 选项:\n"
-" -p\t如果省略 MODE 模式,以可重用为输入的格式输入\n"
+" -p\t如果省略 <模式>,以可重用作输入的格式输出\n"
" -S\t以符号形式输出,否则以八进制数格式输出\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非使用了无效的 MODE 模式或者选项。"
+" 返回成功,除非使用了无效的 <模式> 或者选项。"
#: builtins.c:1502
msgid ""
@@ -4599,20 +4562,20 @@ msgid ""
msgstr ""
"等待任务完成并返回退出状态。\n"
" \n"
-" 等待以 <ID> 识别的进程,其中 <ID> 可以是进程 ID 或者任务声明,\n"
+" 等待以 <ID> 指定的进程,其中 <ID> 可以是进程 ID 或者任务说明符,\n"
" 并报告它的终止状态。如果没有指定 <ID> ,则等待当前活跃的所有子\n"
-" 进程,并且返回状态为零。如果 <ID> 是任务声明,则等待该任务管道中的\n"
-" 所有进程。\n"
+" 进程,并且返回状态为零。如果 <ID> 是任务说明符,则等待该任务的\n"
+" 流水线中的所有进程。\n"
" \n"
-" 若给定了 -n 选项,从 <ID> 列表中等待一个单一的任务完成,\n"
-" 或者,如果没有提供 <ID>,等待下一个任务完成并返回其退出状态。\n"
+" 若给定了 -n 选项,从 <ID> 列表中等待单个任务完成,或者,\n"
+" 如果没有提供 <ID>,等待下一个任务完成并返回其退出状态。\n"
" \n"
" 若给定了 -p 选项, 被返回退出状态的任务的进程 ID 或任务 ID 将被赋值\n"
" 给选项的参数指定的 <变量>。该变量会首先被取消设定,然后才会进行赋值。\n"
-" 该选项只有和 -n 选项同时使用才有用。\n"
+" 该选项只有和 -n 选项同时使用时才有用。\n"
" \n"
-" 若给定了 -f 选项,且已启用了任务控制,则等待指定的 <ID> 终止,\n"
-" 而非等待它改变状态。\n"
+" 若给定了 -f 选项,且启用了任务控制,则等待指定的 <ID> 终止,\n"
+" 而不是等待它改变状态。\n"
" \n"
" 退出状态:\n"
" 返回最后一个 <ID> 的状态;如果使用了无效的 <ID> ,或者使用了无效的\n"
@@ -4632,11 +4595,11 @@ msgid ""
msgstr ""
"等待进程完成并且返回退出状态。\n"
" \n"
-" 等待指定进程并报告它的终止状态。如果没有提供 PID,则当前所有的活跃\n"
-" 子进程都会被等待,并且返回码为零。PID 必须为进程号。\n"
+" 等待以 <PID> 指定的进程并报告它的终止状态。如果没有提供 <PID>,则等待当前\n"
+" 所有活跃的子进程,并且返回码为零。<PID> 必须为进程 ID。\n"
" \n"
" 退出状态:\n"
-" 返回进程 ID 的状态;如果 PID 是无效的进程号或者指定了无效的选项则失败。"
+" 返回最后一个 <PID> 的状态;如果 <PID> 无效,或者使用了无效的选项,则失败。"
#: builtins.c:1548
msgid ""
@@ -4652,9 +4615,9 @@ msgid ""
msgstr ""
"为列表中的每个成员执行命令。\n"
" \n"
-" “for”循环为列表中的每个成员执行一系列的命令。如果没有\n"
-" “in <词语> ...;”则假定使用“in \"$@\"”。对于 <词语> 中的每\n"
-" 个元素,<名称> 变量被设定为该元素后执行 <命令>。\n"
+" \"for\" 循环为列表中的每个成员执行一系列的命令。\n"
+" 如果没有 \"in 词语 ...;\" ,则假定使用 `in \"$@\"'。对于 <词语> 中的\n"
+" 每个元素,<名称> 被设定为该元素,然后执行 <命令>。\n"
" \n"
" 退出状态:\n"
" 返回最后执行的命令的状态。"
@@ -4678,13 +4641,13 @@ msgstr ""
"算术 for 循环。\n"
" \n"
" 等价于\n"
-" \t(( EXP1 ))\n"
-" \twhile (( EXP2 )); do\n"
-" \t\t命令们\n"
-" \t\t(( EXP3 ))\n"
+" \t(( 表达式1 ))\n"
+" \twhile (( 表达式2 )); do\n"
+" \t\t命令\n"
+" \t\t(( 表达式3 ))\n"
" \tdone\n"
-" EXP1、EXP2 和 EXP3 都是算术表达式。如果省略任何表达式,\n"
-" 则等同于使用了估值为1的表达式。\n"
+" <表达式1>、<表达式2> 和 <表达式3> 都是算术表达式。如果省略任何表达式,\n"
+" 则等价于使用了求值结果为 1 的表达式。\n"
" \n"
" 退出状态:\n"
" 返回最后执行的命令的状态。"
@@ -4710,14 +4673,14 @@ msgid ""
msgstr ""
"从列表中选取词并且执行命令。\n"
" \n"
-" <词语...> 被展开,生成一个词的列表。展开的词集合被打印\n"
-" 在标准错误输出设备上,每个以一个数字做前缀。如果没有 `in WORDS'\n"
-" 则假定使用`in \"$@\"'。PS3提示符会被显示并且从标准输入读入一行\n"
-" 如果该行由被显示的词对应的数字组成,则 NAME 变量被设定为相应\n"
-" 的词。如果行为空,则 WORDS 变量和提示符被重新显示。如果读取了\n"
-" 文件结束符,则命令完成。读入任何其他的值会导致 NAME 变量被设定\n"
-" 为空。读入的行被存放在变量 REPLY 中。COMMANDS 命令在每次选择\n"
-" 之后执行直到执行一个 break 命令。\n"
+" <词语> 被展开,生成一个词语列表。展开后的词语集合被打印到\n"
+" 标准错误,每个词语前面打印一个数字。如果没有 \"in 词语\" ,则假定\n"
+" 使用 `in \"$@\"'。然后,会显示一个 PS3 提示符,并且从标准输入读取\n"
+" 一行。如果该行是所显示的词之一所对应的数字,则 <名称> 被设定为\n"
+" 相应的词。如果该行为空,则会重新显示 <词语> 和提示符。如果读到了\n"
+" EOF,则命令完成。读入任何其他的值会导致 <名称> 变量被设定为空。\n"
+" 读入的行被存放在变量 REPLY 中。<命令> 会在每次选择之后被执行,\n"
+" 直到执行到 break 命令。\n"
" \n"
" 退出状态:\n"
" 返回最后一个执行的命令的状态。"
@@ -4737,18 +4700,18 @@ msgid ""
" Exit Status:\n"
" The return status is the return status of PIPELINE."
msgstr ""
-"报告管道执行的消耗时间。\n"
+"报告流水线执行消耗的时间。\n"
" \n"
-" 执行 PIPELINE 并且打印 PIPELINE 终结时实际时间、用户 CPU 时间和系统\n"
-" CPU 时间的总结。\n"
+" 执行 <流水线> 并且打印 <流水线> 终止时消耗的真实时间、用户 CPU 时间\n"
+" 和系统 CPU 时间的总结。\n"
" \n"
" 选项:\n"
-" -p\t用可迁移的 POSIX 格式打印用时总结。\n"
+" -p\t用可移植的 POSIX 格式打印用时总结。\n"
" \n"
-" TIMEFORMAT 变量的值被作为输出格式。\n"
+" 使用 TIMEFORMAT 变量的值作为输出格式。\n"
" \n"
" 退出状态:\n"
-" 返回状态即PIPELINE 的返回状态。"
+" 返回状态是 <流水线> 的返回状态。"
#: builtins.c:1618
msgid ""
@@ -4762,8 +4725,8 @@ msgid ""
msgstr ""
"基于模式匹配来执行命令。\n"
" \n"
-" 基于 PATTERN 模式匹配的词 WORD,有选择的执行 COMMANDS 命令。\n"
-" `|' 用于分隔多个模式。\n"
+" 根据和 <词语> 匹配的 <模式> ,选择性地执行 <命令>。\n"
+" \"|\" 用于分隔多个模式。\n"
" \n"
" 退出状态:\n"
" 返回最后一个执行的命令的状态。"
@@ -4785,11 +4748,11 @@ msgid ""
msgstr ""
"根据条件执行命令。\n"
" \n"
-" `if COMMANDS'列表被执行。如果退出状态为零,则执行`then COMMANDS' \n"
-" 列表。否则按顺序执行每个 `elif COMMANDS'列表,并且如果它的退出状态为\n"
-" 零,则执行对应的 `then COMMANDS' 列表并且 if 命令终止。否则如果存在的\n"
-" 情况下,执行 `else COMMANDS'列表。整个结构的退出状态是最后一个执行\n"
-" 的命令的状态,或者如果没有条件测试为真的话,为零。\n"
+" 执行 \"if 命令\" 列表。如果退出状态为零,则执行 \"then 命令\" 列表。\n"
+" 否则按顺序执行每个 \"elif 命令\" 列表,如果某一个的退出状态为零,则执行\n"
+" 对应的 \"then 命令\" 列表,然后 if 命令完成。否则,执行 \"else 命令\"\n"
+" 列表(如果有的话)。整个结构的退出状态是最后一个执行的命令的状态,\n"
+" 或者如果没有一个条件的测试结果为真,则退出状态为零。\n"
" \n"
" 退出状态:\n"
" 返回最后一个执行的命令的状态。"
@@ -4804,10 +4767,10 @@ msgid ""
" Exit Status:\n"
" Returns the status of the last command executed."
msgstr ""
-"只要测试成功即执行命令。\n"
+"只要测试仍然成功,就执行命令。\n"
" \n"
-" 只要在 `while' COMMANDS 中的最终命令返回结果为0,则\n"
-" 展开并执行 COMMANDS 命令。\n"
+" 只要 \"while\" 的 <命令> 中的最后一个命令的退出状态仍然为 0,\n"
+" 就展开并执行 <命令>。\n"
" \n"
" 退出状态:\n"
" 返回最后一个执行的命令的状态。"
@@ -4822,10 +4785,10 @@ msgid ""
" Exit Status:\n"
" Returns the status of the last command executed."
msgstr ""
-"当测试不同过时执行命令。\n"
+"只要测试仍然不成功,就执行命令。\n"
" \n"
-" `until' COMMANDS 命令的最终命令返回状态不为 0 时,\n"
-" 展开并执行 COMMANDS 命令。\n"
+" 只要 \"until\" 的 <命令> 中的最后一个命令的退出状态仍然不为 0,\n"
+" 就展开并执行 <命令>。\n"
" \n"
" 退出状态:\n"
" 返回最后一个执行的命令的状态。"
@@ -4842,15 +4805,15 @@ msgid ""
" Exit Status:\n"
" The coproc command returns an exit status of 0."
msgstr ""
-"创建一个以 NAME 为名的副进程。\n"
+"创建一个名为 <名称> 的副进程。\n"
" \n"
-" 异步执行 COMMANDS 命令,在执行 shell 中的数组变量 NAME\n"
-" 的 0 号和 1 号元素作为文件描述符,以一个管道连接命令\n"
-" 分别作为命令的标准输出和输入设备。\n"
-" 默认的 NAME 是 \"COPROC\"。\n"
+" 异步执行 <命令>,并将命令的标准输出和标准输入通过管道连接到执行该命令\n"
+" 的 shell 的文件描述符,再将两个文件描述符分别赋值给数组变量 <名称> 的\n"
+" 索引为 0 和 1 的元素。\n"
+" 默认的 <名称> 是 \"COPROC\"。\n"
" \n"
" 退出状态:\n"
-" 副进程会返回退出状态 0。"
+" coproc 命令返回退出状态 0。"
#: builtins.c:1685
msgid ""
@@ -4866,13 +4829,12 @@ msgid ""
msgstr ""
"定义 shell 函数。\n"
" \n"
-" 创建一个以 NAME 为名的 shell 函数。当作为一个简单的命令启用时,\n"
-" NAME 函数执行调用 shell 的上下文中的 COMMANDs 命令。当 NAME\n"
-" 被启用时,参数作为 $1...$n 被传递给函数,函数的名字储存在变量\n"
-" $FUNCNAME 中。\n"
+" 创建一个名为 <名称> 的 shell 函数。当作为一个简单命令被调用时,\n"
+" <名称> 在调用它的 shell 的上下文中执行 <命令>。当 <名称> 被调用时,\n"
+" 传递给函数的参数储存在 $1...$n 中,函数名储存在 $FUNCNAME 中。\n"
" \n"
" 退出状态:\n"
-" 返回成功除非 NAME 为只读。"
+" 返回成功,除非 <名称> 为只读。"
#: builtins.c:1699
msgid ""
@@ -4886,8 +4848,7 @@ msgid ""
msgstr ""
"将命令组合为一个单元。\n"
" \n"
-" 运行组中的命令集合。这是对整个命令集合\n"
-" 做重定向的方法之一。\n"
+" 运行一个组中的命令集合。这是对整个命令集合进行重定向的方法之一。\n"
" \n"
" 退出状态:\n"
" 返回最后一个执行的命令的状态。"
@@ -4905,12 +4866,11 @@ msgid ""
" Exit Status:\n"
" Returns the status of the resumed job."
msgstr ""
-"在前台继续任务\n"
+"在前台继续任务。\n"
" \n"
-" 对于 JOB_SPEC 参数来说和 `fg' 命令等同。继续一个\n"
-" 停止的或者后台任务。JOB_SPEC 可以指定一个任务\n"
-" 名字或任务号。在 JOB_SPEC 后加上一个 `&' 将会把\n"
-" 任务放至后台,就像任务声明被作为 `bg' 命令的参数\n"
+" 等价于向 \"fg\" 命令传递 <任务说明符> 参数。继续一个已停止的任务或\n"
+" 后台任务。<任务说明符> 可以是任务名称或任务编号。在 <任务说明符>\n"
+" 后加上一个 \"&\" 会把任务放至后台,就像该任务说明符被作为 \"bg\" 的参数\n"
" 执行一样。\n"
" \n"
" 退出状态:\n"
@@ -4926,13 +4886,12 @@ msgid ""
" Exit Status:\n"
" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
msgstr ""
-"对算术表达式估值。\n"
+"对算术表达式进行求值。\n"
" \n"
-" <表达式> 按照算术法则进行估值。\n"
-" 等价于 \"let <表达式>\"。\n"
+" 对 <表达式> 按照算术求值的规则进行求值。等价于 \"let <表达式>\"。\n"
" \n"
" 退出状态:\n"
-" 如果 <表达式> 估值为 0 则返回 1;否则返回 0。"
+" 如果 <表达式> 求值结果为 0,则返回 1;否则返回 0。"
#: builtins.c:1738
msgid ""
@@ -4960,23 +4919,24 @@ msgid ""
msgstr ""
"执行条件命令。\n"
" \n"
-" 根据条件表达式 EXPRESSION 的估值返回状态0或1。表达式按照\n"
-" `test' 内建的相同条件组成,或者可以有下列操作符连接而成:\n"
+" 根据条件表达式 <表达式> 的求值结果返回状态 0 或 1。表达式的基本元素\n"
+" 与 \"test\" 内建相同,且可以通过下列运算符进行组合:\n"
" \n"
-" ( EXPRESSION )\t返回 EXPRESSION 表达式的值\n"
-" ! EXPRESSION\t\t如果 EXPRESSION表达式为假则为真,否则为假\n"
-" EXPR1 && EXPR2\t如果 EXPR1 和 EXPR2 表达式均为真则为真,否则为假\n"
-" EXPR1 || EXPR2\t如果 EXPR1 和 EXPR2 表达式中有一个为真则为真,否则为假\n"
+" ( 表达式 )\t\t返回 <表达式> 的值\n"
+" ! 表达式\t\t\t如果 <表达式> 为假则为真,否则为假\n"
+" 表达式1 && 表达式2\t如果 <表达式1> 和 <表达式2> 均为真则为真,\n"
+" \t\t\t\t否则为假\n"
+" 表达式1 || 表达式2\t如果 <表达式1> 和 <表达式2> 中任何一个为真\n"
+" \t\t\t\t则为真,否则为假\n"
" \n"
-" 当使用 `==' 和 `!=' 操作符时,操作符右边的字符串被用作模式并且执行一个\n"
-" 匹配。当使用 `=~' 操作符时,操作符右边的字符串被当作正则表达式来进行\n"
-" 匹配。\n"
+" 当使用 \"==\" 和 \"!=\" 运算符时,运算符右边的字符串被视为模式,进行模式匹配。\n"
+" 当使用 \"=~\" 运算符时,运算符右边的字符串被视为正则表达式来进行匹配。\n"
" \n"
-" 操作符 && 和 || 将不对 EXPR2 表达式进行估值,如果 EXPR1 表达式足够确定\n"
-" 整个表达式的值。\n"
+" 如果 <表达式1> 足够确定整个表达式的值,运算符 && 和 || 将不会对\n"
+" <表达式2> 进行求值。\n"
" \n"
" 退出状态:\n"
-" 根据 EXPRESSION 的值为0或1。"
+" 根据 <表达式> 的值返回 0 或 1。"
#: builtins.c:1764
msgid ""
@@ -5031,47 +4991,43 @@ msgid ""
" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
" \t\tcommands should be saved on the history list.\n"
msgstr ""
-"常用 shell 变量名称和使用。\n"
+"常用 shell 变量名称和用法。\n"
" \n"
" BASH_VERSION\t当前 Bash 的版本信息。\n"
-" CDPATH\t用于 `cd' 命令参数搜索的分号分隔的目录列表\n"
-" GLOBIGNORE\t路径扩展时忽略的文件名匹配模式列表,\n"
-" \t\t以分号分隔。\n"
-" HISTFILE\t您的命令历史存放的文件名称。\n"
+" CDPATH\t用于搜索 \"cd\" 的参数中的目录的,以冒号分隔的目录列表\n"
+" GLOBIGNORE\t路径名展开时要忽略的文件名的模式列表,以冒号分隔。\n"
+" HISTFILE\t存储您的命令历史的文件名称。\n"
" HISTFILESIZE\t历史文件最多可以保存的行数。\n"
" HISTSIZE\t一个运行的 shell 最多可以访问的历史命令行数。\n"
-" HOME\t您的登录目录的完整路径。\n"
+" HOME\t您的登录目录的完整路径名。\n"
" HOSTNAME\t当前主机的主机名。\n"
-" HOSTTYPE\t当前版本的 BASH 在其之上运行的 CPU 类型。\n"
-" IGNOREEOF\t控制 shell 收到文件结束符作为单一输入后的\n"
-" \t\t动作。如果设定这个变量,则它的值是 shell 退出之前在\n"
-" \t\t一个空行上可以连续看到的文件结束符数量(默认为10)。\n"
-" \t\t未设定时,文件结束符标志着输入的结束。\n"
+" HOSTTYPE\t运行当前版本 BASH 的 CPU 的类型。\n"
+" IGNOREEOF\t控制 shell 收到 EOF 作为唯一输入字符后的动作。如果\n"
+" \t\t该变量被设定,则它的值是 shell 退出之前在一个空行上\n"
+" \t\t可以连续读取到的 EOF 数量(默认为 10)。如果未设定,\n"
+" \t\tEOF 标志着输入的结束。\n"
" MACHTYPE\t描述当前运行 Bash 的系统的字符串。\n"
-" MAILCHECK\tBash 检测新邮件的频率,以秒为单位。\n"
-" MAILPATH\tBash 从中检测新邮件的文件列表,以分号分隔。\n"
-" OSTYPE\t运行 Bash 的 Unix 版本。\n"
-" PATH\t当寻找命令时搜索的目录列表,以冒号分隔。\n"
-" PROMPT_COMMAND\t打印每一个主提示符之前执行的命\n"
-" \t\t令。\n"
+" MAILCHECK\tBash 检查新邮件的频率,以秒为单位。\n"
+" MAILPATH\tBash 从中检查新邮件的文件列表,以冒号分隔。\n"
+" OSTYPE\t运行当前版本 Bash 的 Unix 版本。\n"
+" PATH\t寻找命令时搜索的目录列表,以冒号分隔。\n"
+" PROMPT_COMMAND\t每次打印主提示符之前执行的命令。\n"
" PS1\t\t主提示符字符串。\n"
-" PS2\t\t从提示符字符串。\n"
-" PWD\t\t当前目录的完整路径。\n"
+" PS2\t\t次提示符字符串。\n"
+" PWD\t\t当前目录的完整路径名。\n"
" SHELLOPTS\t已启用的 shell 选项列表,以冒号分隔。\n"
" TERM\t当前终端类型的名称。\n"
-" TIMEFORMAT\t以关键则 `time' 显示的时间统计信息的输出\n"
-" \t\t格式。\n"
-" auto_resume\t非空时,一个单独的命令词会首先被在当前\n"
-" \t\t停止的任务列表中搜索。如果找到则该任务被置于前台。\n"
-" \t\t如果值为 `exact' 则意味着命令词必须精确匹配停止任务\n"
-" \t\t列表中的命令。如果值为 `substring' 则意味着命令词必\n"
-" \t\t须匹配任务的一个子字符串。任何其他的值意味着命令词\n"
-" \t\t必须是停止任务的一个前缀。\n"
+" TIMEFORMAT\t保留字 \"time\" 显示的时间统计信息的输出格式。\n"
+" auto_resume\t非空时,一个单独的命令词会首先被在当前已停止的\n"
+" \t\t任务列表中搜索。如果找到,则该任务被置于前台。\n"
+" \t\t如果值为 \"exact\" 则意味着命令词必须精确匹配已停止的\n"
+" \t\t任务列表中的命令。如果值为 \"substring\" 则意味着命令词\n"
+" \t\t必须匹配任务的一个子字符串。任何其他的值意味着命令词\n"
+" \t\t必须是已停止的任务的一个前缀。\n"
" histchars\t控制历史展开和快速替换的字符。第一个字符是\n"
-" \t\t历史替换字符,通常是 `!'。第二个字符是快速替换字符,\n"
-" \t\t通常是 `^'。第三个是历史注释字符,通常是 `#'。\n"
-" HISTIGNORE\t用于决定哪些命令被存入历史文件的模式\n"
-" \t\t列表,以冒号分隔。\n"
+" \t\t历史替换字符,通常是 \"!\"。第二个字符是快速替换字符,\n"
+" \t\t通常是 \"^\"。第三个字符是历史注释字符,通常是 \"#\"。\n"
+" HISTIGNORE\t用于决定哪些命令被存入历史文件的模式列表,以冒号分隔。\n"
#: builtins.c:1821
msgid ""
@@ -5109,22 +5065,22 @@ msgstr ""
" 新的栈顶。不带参数时,交换栈顶的两个目录。\n"
" \n"
" 选项:\n"
-" -n\t抑制添加目录至栈时通常的改变目录操作,从而仅对栈\n"
-" \t进行操作。\n"
+" -n\t阻止添加目录至栈时通常的改变目录操作,从而仅对栈\n"
+" \t\t进行操作。\n"
" \n"
" 参数:\n"
-" +N\t旋转栈从而第 N 个目录 (`dirs' 显示的列表中左起,从零开始)\n"
-" \t将移动到栈顶。\n"
+" +N\t旋转栈,使得第 N 个目录(\"dirs\" 显示的列表中左起,\n"
+" \t\t从零开始)移动到栈顶。\n"
" \n"
-" -N\t旋转栈从而第 N 个目录 (`dirs' 显示的列表中右起,从零开始)\n"
-" \t将移动到栈顶。\n"
+" -N\t旋转栈,使得第 N 个目录(\"dirs\" 显示的列表中右起,\n"
+" \t\t从零开始)移动到栈顶。\n"
" \n"
-" dir\t将 DIR 目录添加到栈顶,并且使其成为当前工作目录。\n"
+" 目录\t将 <目录> 添加到栈顶,使其成为当前工作目录。\n"
" \n"
-" `dirs' 内建显示目录栈。\n"
+" \"dirs\" 内建可以显示目录栈。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非使用了无效的参数或者目录转换失败。"
+" 返回成功,除非使用了无效的参数,或者改变目录失败。"
#: builtins.c:1855
msgid ""
@@ -5154,24 +5110,22 @@ msgid ""
msgstr ""
"从栈中删除目录。\n"
" \n"
-" 从目录栈中删除条目。不带参数时,删除栈顶目录,并改变至新的栈\n"
-" 顶目录。\n"
+" 从目录栈中删除条目。不带参数时,删除栈顶目录,并改变目录至新的栈顶目录。\n"
" \n"
" 选项:\n"
-" -n\t抑制从栈中删除目录时通常的目录变换操作,从而仅对栈\n"
-" \t进行操作。\n"
+" -n\t阻止从栈中删除目录时通常的改变目录操作,从而仅对栈进行操作。\n"
" \n"
" 参数:\n"
-" +N\t删除第 N 个目录 (`dirs' 显示的目录列表中左起,从零开始)。\n"
-" \t例如:`popd +0' 删除第一个目录,`popd +1' 删除第二个。\n"
+" +N\t删除第 N 个目录(\"dirs\" 显示的列表中左起,从零开始)。\n"
+" \t\t例如:\"popd +0\" 删除第一个目录,\"popd +1\" 删除第二个。\n"
" \n"
-" -N\t删除第 N 个目录 (`dirs' 显示的目录列表中右起,从零开始)。\n"
-" \t例如:`popd -0' 删除最后一个目录,,`popd -1' 删除倒数第二个。\n"
+" -N\t删除第 N 个目录(\"dirs\" 显示的列表中右起,从零开始)。\n"
+" \t\t例如:\"popd -0\" 删除最后一个目录,\"popd -1\" 删除倒数第二个。\n"
" \n"
-" `dirs' 内建显示目录栈。\n"
+" \"dirs\" 内建可以显示目录栈。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非使用了无效的参数或者目录变换失败。"
+" 返回成功,除非使用了无效的参数,或者改变目录失败。"
#: builtins.c:1885
msgid ""
@@ -5203,24 +5157,25 @@ msgid ""
msgstr ""
"显示目录栈。\n"
" \n"
-" 显示当前记住的目录列表。通过 `pushd' 命令可以将目录存入列表\n"
-" 中;`popd' 命令可用于遍历弹出列表。\n"
+" 显示当前记住的目录列表。 使用 \"pushd\" 命令将目录加入这个列表;\n"
+" 使用 \"popd\" 命令逐个回到之前加入列表的目录。\n"
" \n"
" 选项:\n"
" -c\t删除所有元素以清空目录栈\n"
-" -l\t不打印与主目录相关的波浪号前缀的目录\n"
+" -l\t打印目录时,不表示为以波浪号 (~) 为前缀的,\n"
+" \t\t相对于您的主目录的路径\n"
" -p\t每行一个条目打印目录栈\n"
-" -v\t每行一个条目,以栈中位置为前缀打印目录栈\n"
+" -v\t每行一个条目打印目录栈,前面加上在栈中的位置\n"
" \n"
" 参数:\n"
-" +N\t显示 dirs 不带选项启动时显示的目录列表左起中第\n"
-" \tN 个目录,从零开始。\n"
+" +N\t显示 dirs 不带选项启动时显示的目录列表中左起第 N 个目录,\n"
+" \t\t从零开始。\n"
" \n"
-" -N\t显示 dirs 不带选项启动时显示的目录列表右起中第\n"
-" \tN 个目录,从零开始。\n"
+" -N\t显示 dirs 不带选项启动时显示的目录列表中右起第 N 个目录,\n"
+" \t\t从零开始。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非使用了无效的选项或者发生错误。"
+" 返回成功,除非使用了无效的选项,或者有错误发生。"
#: builtins.c:1916
msgid ""
@@ -5243,20 +5198,20 @@ msgid ""
msgstr ""
"设定和取消设定 shell 选项。\n"
" \n"
-" 改变每个 shell 选项 OPTNAME 的设定。不带参数时,\n"
-" 列出每个提供的 OPTNAME,否则列出所有 shell 选项;\n"
-" 同时标注每一个选项是否被设定。\n"
+" 改变每个 shell 选项 <选项名> 的设定。不带选项时,列出每个提供的\n"
+" <选项名>,或者如果没有提供 <选项名> 时,列出所有 shell 选项,同时\n"
+" 标注每一个选项是否被设定。\n"
" \n"
" 选项:\n"
-" -o\t限制 OPTNAME 为定义用于`set -o' 的选项\n"
+" -o\t限制 <选项名>,只使用可被 \"set -o\" 设置的选项\n"
" -p\t打印每个 shell 选项并标注它的状态。\n"
-" -q\t抑制输出\n"
-" -s\t启用(设定)每个 OPTNAME 选项\n"
-" -u\t禁用(取消设定)每个 OPTNAME 选项\n"
+" -q\t阻止输出\n"
+" -s\t启用(设定)每个 <选项名>\n"
+" -u\t禁用(取消设定)每个 <选项名>\n"
" \n"
" 退出状态:\n"
-" 如果 OPTNAME 选项被启用则返回成功;如果是\n"
-" 无效的选项或 OPTNAME 被禁用则失败。"
+" 如果 <选项名> 被启用则返回成功;如果使用了无效的选项,或者 <选项名>\n"
+" 被禁用,则返回失败。"
#: builtins.c:1937
msgid ""
@@ -5289,22 +5244,28 @@ msgid ""
" Returns success unless an invalid option is given or a write or assignment\n"
" error occurs."
msgstr ""
-"在 FORMAT 的控制下格式化并打印 ARGUMENTS 参数。\n"
+"在 <格式> 的控制下格式化并打印 <参数>。\n"
" \n"
" 选项:\n"
-" -v var\t将输出赋值给 shell 变量 VAR 而不显示在标准输出上\n"
+" -v 变量\t将输出赋值给 shell 变量 <变量>,而不是将它显示在\n"
+" \t\t标准输出上\n"
+" \n"
+" FORMAT 是包含三种类型的对象的字符串:普通字符,会被简单地复制到标准输出;\n"
+" 字符转义序列,会在转义之后复制到标准输出;格式说明符,每个都会让 shell 打印\n"
+" 下一个多余的参数。\n"
" \n"
-" FORMAT 是包含三种对象的字符串:简单地被拷贝到标准输出的普通字符;\n"
-" 被变换之后拷贝到标准输入的转义字符;以及每个都会影响到下个参数的打印的格式化声明。\n"
+" 除了 printf(1) 中描述的标准格式说明符以外,printf 还可解析:\n"
" \n"
-" 在 printf(1) 中描述的标准控制声明之外,printf 解析:\n"
+" %b\t展开对应参数中的反斜杠转义序列\n"
+" %q\t以可以重新用作 shell 输入的格式给参数加上引号\n"
+" %(格式)T\t将 <格式> 作为 strftime(3) 的格式字符串,并输出产生的\n"
+" \t 日期-时间字符串\n"
" \n"
-" %b\t扩展对应参数中的反斜杠转义序列\n"
-" %q\t以可作为 shell 输入的格式引用参数\n"
-" %(fmt)T\t以 FMT 为供给 strftime(3) 的格式输出日期时间字符串\n"
+" 有必要时,会重新使用格式串以消耗所有参数。如果参数的数量少于格式串要求\n"
+" 的数量,则视为将零值或空字符串(视情况而定)提供给了多余的格式说明符。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非使用了无效的选项或者写或赋值错误发生。"
+" 返回成功,除非使用了无效的选项,或者发生了写入或赋值错误。"
#: builtins.c:1971
msgid ""
@@ -5334,23 +5295,22 @@ msgid ""
msgstr ""
"指定 Readline 如何补全参数。\n"
" \n"
-" 声明对于每一个 <名称> 如何补全参数。如果不带选项,\n"
-" 现有的补全声明会以可以重用为输入的格式打印出来。\n"
+" 指定对于每一个 <名称> 如何补全参数。如果不带选项,现有的补全规约会以\n"
+" 可以重新用作输入的格式打印出来。\n"
" \n"
" 选项:\n"
-" -p\t以可重用的格式打印现有的补全声明\n"
-" -r\t对每一个 <名称> 删除补全声明,或者,如果没有提供 <名称> ,\n"
-" \t\t删除所有的补全声明\n"
-" -D\t对于没有补全声明定义的命令,设定默认的补全和动作\n"
-" -E\t对于 \"empty\" 命令设定补全动作——对于空行的补全\n"
-" -I\t将补全和动作应用在首单词(通常是所给命令)上\n"
+" -p\t以可重用的格式打印现有的补全规约\n"
+" -r\t对每一个 <名称> 删除补全规约,或者,如果没有提供 <名称> ,\n"
+" \t\t删除所有的补全规约\n"
+" -D\t设定默认的补全和动作,给没有定义补全规约的命令使用\n"
+" -E\t对于 \"空\" (empty) 命令设定补全动作 -- 对于空行的补全\n"
+" -I\t将补全和动作应用在首个单词(通常是所给命令)上\n"
" \n"
-" 尝试补全时,按照上述大写字母选项的顺序进行动作。\n"
-" 如果给出了多个选项,-D 选项优先级高于 -E 选项,且\n"
-" 这两个选项优先级均高于 -I。\n"
+" 尝试补全时,按照上述大写字母选项的顺序进行动作。如果给出了多个选项,\n"
+" -D 选项优先级高于 -E 选项,且这两个选项优先级均高于 -I。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非使用了无效的选项或者有错误发生。"
+" 返回成功,除非使用了无效的选项,或者有错误发生。"
#: builtins.c:2001
msgid ""
@@ -5365,12 +5325,11 @@ msgid ""
msgstr ""
"依据选项显示可能的补全。\n"
" \n"
-" 意图在能产生可能的补全的 shell 函数内部使用。\n"
-" 如果提供了可选的 WORD 参数,则产生按照 WORD\n"
-" 进行的匹配。\n"
+" 设计意图是在用来生成可能的补全的 shell 函数的内部使用。\n"
+" 如果提供了可选的 <词语> 参数,则依据 <词语> 产生匹配。\n"
" \n"
" 退出状态:\n"
-" 除非使用了无效选项或者错误发生,否则返回成功。"
+" 返回成功,除非使用了无效的选项,或者有错误发生。"
#: builtins.c:2016
msgid ""
@@ -5402,25 +5361,25 @@ msgid ""
msgstr ""
"修改或显示补全选项。\n"
" \n"
-" 修改每个 NAME 名称的补全选项,或如果没有提供 NAME 名称,执行当前的补全。\n"
-" 如果不带选项,打印每个 NAME 名称的补全选项或当前的补全声明。\n"
+" 修改每个 <名称> 的补全选项,或者如果没有提供 <名称>,修改正在执行的补全的\n"
+" 选项。如果没有提供 <选项>,打印每个 <名称> 的补全选项或者当前的补全规约。\n"
" \n"
" 选项:\n"
-" \t-o option\t为每个 NAME 名称设定补全选项 option\n"
-" \t-D\t\t为 \"default\" 命令补全改变选项\n"
-" \t-E\t\t为 \"empty\" 命令补全改变选项\n"
-" \t-I\t\t为首单词的补全改变选项\n"
+" \t-o 选项\t\t为每个 <名称> 设定补全选项 <选项>\n"
+" \t-D\t\t修改 \"默认\" (default) 命令的补全选项\n"
+" \t-E\t\t修改 \"空\" (empty) 命令的补全选项\n"
+" \t-I\t\t修改首个单词的补全选项\n"
" \n"
-" 使用 `+o' 而不是 `-o' 可以关闭指定的选项。\n"
+" 使用 \"+o\" 代替 \"-o\" 可以关闭指定的选项。\n"
" \n"
" 参数:\n"
" \n"
-" 每个 NAME 名称都对应一个之前以通过 `complete' 内建定义了的补全声明的\n"
-" 命令。如果不提供 NAME 名称,当前生成补全的函数必须调用 compopt,\n"
-" 并且当前执行的补全生成器选项会被修改。\n"
+" 每个 <名称> 都对应一个之前已通过 \"complete\" 内建定义了补全规约的命令。\n"
+" 如果没有提供 <名称>,compopt 必须由当前正在生成补全的函数进行调用,\n"
+" 并且当前正在执行的补全生成器的选项会被修改。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非使用了无效的选项或者 NAME 名称没有定义补全声明。"
+" 返回成功,除非使用了无效的选项,或者 <名称> 没有定义补全规约。"
#: builtins.c:2047
msgid ""
@@ -5456,31 +5415,32 @@ msgid ""
" Returns success unless an invalid option is given or ARRAY is readonly or\n"
" not an indexed array."
msgstr ""
-"从标准输入读取行到下标数组变量中。\n"
+"从标准输入读取行到索引数组变量中。\n"
" \n"
-" 从标准输入读取行到下标数组变量 ARRAY 中,或者如果使用了 -u 选项,\n"
-" 从文件描述符 FD 中读取。MAPFILE 变量是默认的 ARRAY 变量。\n"
+" 从标准输入读取行到索引数组变量 <数组> 中,或者如果使用了 -u 选项,\n"
+" 从文件描述符 <FD> 中读取。默认的 <数组> 是 MAPFILE 变量。\n"
" \n"
" 选项:\n"
-" -d delim\t使用 DELIM 而非换行符断行\n"
-" -n count\t最多拷贝 COUNT 行,如果 COUNT 为 0,则拷贝所有行。\n"
-" -O origin\t从下标 ORIGIN 开始 赋值给 ARRAY 变量。默认下标是0.\n"
-" -s count \t丢弃最先读取的 COUNT 行。\n"
-" -t\t\t从读取的每行末尾删除一个换行符。\n"
-" -u fd\t\t从文件描述符 FD 中读取行而不是标准输入。\n"
-" -C callback\t每 QUANTUM 次读行之后对 CALLBACK 回调进行估值。\n"
-" -c quantum\t定义每次调用 CALLBACK 回调之间读取的行数。\n"
+" -d 分隔符\t使用 <分隔符> 而非换行符标志一行的结束\n"
+" -n 计数\t最多复制 <计数> 行。如果 <计数> 为 0,则复制所有行\n"
+" -O 起始\t从索引 <起始> 开始赋值给 <数组> 变量。默认索引是 0\n"
+" -s 计数\t丢弃最初读取的 <计数> 行\n"
+" -t\t从读取的每行末尾删除一个 <分隔符>(默认为换行符)\n"
+" -u fd\t从文件描述符 <FD> 中读取行,而不是标准输入\n"
+" -C 回调\t每读取 <间隔> 行之后对 <回调> 进行求值\n"
+" -c 间隔\t指定每次调用 <回调> 之前读取的行数\n"
" \n"
" 参数:\n"
-" ARRAY\t\t存储数据使用的数组变量\n"
+" 数组\t存储文件数据使用的数组变量名\n"
" \n"
-" 如果使用了 -C 而没有 -c,默认的量子是5000。当对 CALLBACK 估值时,\n"
-" 下一个将被赋值的数组元素的下标作为额外参数被传递。\n"
+" 如果使用了 -C 而没有 -c,默认的间隔是 5000。当对 <回调> 进行求值时,\n"
+" 下一个将被赋值的数组元素的索引以及将被赋给那个元素的行会作为额外参数\n"
+" 被传递给它。\n"
" \n"
-" 如果没有显式指定起始下标,mapfile 将在赋值前清空 ARRAY 变量。\n"
+" 如果没有显式指定起始索引,mapfile 会在赋值前清空 <数组>。\n"
" \n"
" 退出状态:\n"
-" 返回成功,除非使用了无效的选项,或者 ARRAY 变量只读或不是下标数组。"
+" 返回成功,除非使用了无效的选项,或者 <数组> 为只读或不是索引数组。"
#: builtins.c:2083
msgid ""
@@ -5490,7 +5450,7 @@ msgid ""
msgstr ""
"从一个文件中读取行到数组变量中。\n"
" \n"
-" 一个 `mapfile'的同义词。"
+" 同 \"mapfile\"。"
#~ msgid ""
#~ "Returns the context of the current subroutine call.\n"
diff --git a/subst.c b/subst.c
index a9cb4e2..32cae88 100644
--- a/subst.c
+++ b/subst.c
@@ -341,6 +341,7 @@ static int shouldexp_replacement PARAMS((char *));
static char *pos_params_pat_subst PARAMS((char *, char *, char *, int));
+static char *expand_string_for_patsub PARAMS((char *, int));
static char *parameter_brace_patsub PARAMS((char *, char *, array_eltstate_t *, char *, int, int, int));
static char *pos_params_casemod PARAMS((char *, char *, int, int));
@@ -3603,6 +3604,104 @@ expand_assignment_string_to_string (string, quoted)
return (expand_string_to_string_internal (string, quoted, expand_string_assignment));
}
+/* Kind of like a combination of dequote_string and quote_string_for_globbing;
+ try to remove CTLESC quoting characters and convert CTLESC escaping a `&'
+ or a backslash into a backslash. The output of this function must eventually
+ be processed by strcreplace(). */
+static char *
+quote_string_for_repl (string, flags)
+ char *string;
+ int flags;
+{
+ size_t slen;
+ char *result, *t;
+ const char *s, *send;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string);
+ send = string + slen;
+
+ result = (char *)xmalloc (slen * 2 + 1);
+
+ if (string[0] == CTLESC && string[1] == 0)
+ {
+ result[0] = CTLESC;
+ result[1] = '\0';
+ return (result);
+ }
+
+ /* This is awkward. We want to translate CTLESC-\ to \\ if we will
+ eventually send this string through strcreplace(), which we will do
+ only if shouldexp_replacement() determines that there is something
+ to replace. We can either make sure to escape backslashes here and
+ have shouldexp_replacement() signal that we should send the string to
+ strcreplace() if it sees an escaped backslash, or we can scan the
+ string before copying it and turn CTLESC-\ into \\ only if we encounter
+ a CTLESC-& or a &. This does the former and changes shouldexp_replacement().
+ If we double the backslashes here, we'll get doubled backslashes in any
+ result that doesn't get passed to strcreplace(). */
+
+ for (s = string, t = result; *s; )
+ {
+ /* This function's result has to be processed by strcreplace() */
+ if (*s == CTLESC && (s[1] == '&' || s[1] == '\\'))
+ {
+ *t++ = '\\';
+ s++;
+ *t++ = *s++;
+ continue;
+ }
+ /* Dequote it */
+ if (*s == CTLESC)
+ {
+ s++;
+ if (*s == '\0')
+ break;
+ }
+ COPY_CHAR_P (t, s, send);
+ }
+
+ *t = '\0';
+ return (result);
+}
+
+/* This does not perform word splitting on the WORD_LIST it returns and
+ it treats $* as if it were quoted. It dequotes the WORD_LIST, adds
+ backslash escapes before CTLESC-quoted backslash and `& if
+ patsub_replacement is enabled. */
+static char *
+expand_string_for_patsub (string, quoted)
+ char *string;
+ int quoted;
+{
+ WORD_LIST *value;
+ char *ret, *t;
+
+ if (string == 0 || *string == '\0')
+ return (char *)NULL;
+
+ value = expand_string_for_pat (string, quoted, (int *)0, (int *)0);
+
+ if (value && value->word)
+ {
+ remove_quoted_nulls (value->word->word); /* XXX */
+ value->word->flags &= ~W_HASQUOTEDNULL;
+ }
+
+ if (value)
+ {
+ t = (value->next) ? string_list (value) : value->word->word;
+ ret = quote_string_for_repl (t, quoted);
+ if (t != value->word->word)
+ free (t);
+ dispose_words (value);
+ }
+ else
+ ret = (char *)NULL;
+
+ return (ret);
+}
+
char *
expand_arith_string (string, quoted)
char *string;
@@ -8432,6 +8531,8 @@ shouldexp_replacement (s)
preceding the special character. */
if (s[sindex] == '&')
return 1;
+ if (s[sindex] == '\\')
+ return 1;
}
else if (c == '&')
return 1;
@@ -8696,8 +8797,10 @@ parameter_brace_patsub (varname, value, estatep, patsub, quoted, pflags, flags)
the entire expansion is double-quoted because the parser and string
extraction functions treated quotes in the replacement string as
special. THIS IS NOT BACKWARDS COMPATIBLE WITH BASH-4.2. */
- if (shell_compatibility_level > 42)
+ if (shell_compatibility_level > 42 && patsub_replacement == 0)
rep = expand_string_if_necessary (rep, quoted & ~(Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT), expand_string_unsplit);
+ else if (shell_compatibility_level > 42 && patsub_replacement)
+ rep = expand_string_for_patsub (rep, quoted & ~(Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT));
/* This is the bash-4.2 code. */
else if ((mflags & MATCH_QUOTED) == 0)
rep = expand_string_if_necessary (rep, quoted, expand_string_unsplit);
@@ -8706,9 +8809,7 @@ parameter_brace_patsub (varname, value, estatep, patsub, quoted, pflags, flags)
/* Check whether or not to replace `&' in the replacement string after
expanding it, since we want to treat backslashes quoting the `&'
- consistently. The replacement string already undergoes quote removal
- above, so users need to make sure any desired backslash makes it
- through that. */
+ consistently. */
if (patsub_replacement && rep && *rep && shouldexp_replacement (rep))
mflags |= MATCH_EXPREP;
diff --git a/support/mkdist b/support/mkdist
index 133566f..13c790f 100755
--- a/support/mkdist
+++ b/support/mkdist
@@ -89,6 +89,7 @@ do
case "$type" in
d) mkdir $newdir/$fname ;;
f) cp -p $SRCDIR/$fname $newdir/$fname ;;
+ F) cp $SRCDIR/$fname $newdir/$fname ;;
s) ln -s $mode $newdir/$fname ; mode= ;; # symlink
l) ln $mode $newdir/$fname ; mode= ;; # hard link
*) echo "unknown file type $type" 1>&2 ;;
diff --git a/tests/RUN-ONE-TEST b/tests/RUN-ONE-TEST
index 0b06381..c8bef8d 100755
--- a/tests/RUN-ONE-TEST
+++ b/tests/RUN-ONE-TEST
@@ -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
diff --git a/tests/dynvar.tests b/tests/dynvar.tests
index 5aefab6..3abfc25 100644
--- a/tests/dynvar.tests
+++ b/tests/dynvar.tests
@@ -50,15 +50,20 @@ unset before after
# EPOCHSECONDS
# not exact, but should work
-# could also use python -c 'import time; ts = int(time.time()); print(ts)'
-now1=$(perl -e 'print time')
+# date +%s should be portable enough now
+# then try gawk, perl, python in that order
+now1=$(date +%s 2>/dev/null) D=date
+[ -z "$now1" ] && now1=$(gawk 'BEGIN { print systime(); }' 2>/dev/null) D=gawk
+[ -z "$now1" ] && now1=$(perl -e 'print time' 2>/dev/null) D=perl
+[ -z "$now1" ] && now1=$(python -c 'import time; ts = int(time.time()); print(ts)' 2>/dev/null) D=python
now2=$EPOCHSECONDS
case $now1 in
$now2) echo EPOCHSECONDS ok ;;
-*) echo "current time via perl and EPOCHSECONDS possible mismatch|$now1|$now2" >&2 ;;
+'') echo "cannot get current time using date/gawk/perl/python" >&2 ;;
+*) echo "current time via $D and EPOCHSECONDS possible mismatch|$now1|$now2" >&2 ;;
esac
-unset now1 now2
+unset now1 now2 D
LC_ALL=C # force decimal point to `.'
now1=$EPOCHREALTIME
diff --git a/tests/exportfunc.right b/tests/exportfunc.right
index ff7fc8d..890bdfa 100644
--- a/tests/exportfunc.right
+++ b/tests/exportfunc.right
@@ -4,7 +4,7 @@ exportfunc ok 2
./exportfunc.tests: eval: line 44: syntax error: unexpected end of file
./exportfunc.tests: line 43: cve7169-bad2: No such file or directory
./exportfunc1.sub: line 14: maximum here-document count exceeded
-./exportfunc.tests: line 64: HELLO_WORLD: No such file or directory
+./exportfunc.tests: line 72: HELLO_WORLD: No such file or directory
eval ok
./exportfunc3.sub: line 23: export: foo=bar: cannot export
status: 1
diff --git a/tests/exportfunc.tests b/tests/exportfunc.tests
index b2742d2..d06b1a3 100644
--- a/tests/exportfunc.tests
+++ b/tests/exportfunc.tests
@@ -50,10 +50,18 @@ ${THIS_SH} ./exportfunc1.sub
${THIS_SH} ./exportfunc2.sub
# CVE-2014-6277
+A100=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+A1000=${A100}
+
+for (( i = 0; i < 999; i++ ))
+do
+ A1000+=${A100}
+done
env BASH_FUNC_foo%%="() { 000(){>0;}&000(){ 0;}<<0 0" ${THIS_SH} -c foo 2>/dev/null
-env BASH_FUNC_foo%%="() { 000(){>0;}&000(){ 0;}<<`perl -e '{print "A"x100000}'` 0" ${THIS_SH} -c foo 2>/dev/null
+env BASH_FUNC_foo%%="() { 000(){>0;}&000(){ 0;}<<${A1000} 0" ${THIS_SH} -c foo 2>/dev/null
${THIS_SH} -c "f(){ x(){ _;}; x(){ _;}<<a;}" 2>/dev/null
+unset A100 A1000
# CVE-2014-6278
diff --git a/tests/func.tests b/tests/func.tests
index fffe3d2..e35ec2b 100644
--- a/tests/func.tests
+++ b/tests/func.tests
@@ -11,6 +11,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+# since we look at functions below, remove all functions now
+funcs=$(compgen -A function)
+if [ -n "$funcs" ]; then
+ unset -f $funcs
+fi
+
a()
{
x=$((x - 1))
diff --git a/tests/glob2.sub b/tests/glob2.sub
index cabc350..09cb6d5 100644
--- a/tests/glob2.sub
+++ b/tests/glob2.sub
@@ -13,6 +13,14 @@
#
. ./test-glue-functions
+# this locale causes problems all over the place
+if locale -a | grep -i '^zh_HK\.big5hkscs' >/dev/null ; then
+ :
+else
+ echo "glob2.sub: warning: you do not have the zh_HK.big5hkscs locale installed;" >&2
+ echo "glob2.sub: warning: that will cause some of these tests to fail." >&2
+fi
+
var='ab\'
case $var in
diff --git a/tests/glob5.sub b/tests/glob5.sub
index 5735715..a0dd623 100644
--- a/tests/glob5.sub
+++ b/tests/glob5.sub
@@ -11,6 +11,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+[ $UID -eq 0 ] && { echo "glob5.sub: the test suite should not be run as root" >&2 ; }
+
ORIGD=$PWD
: ${TMPDIR:=/var/tmp}
diff --git a/tests/glob6.sub b/tests/glob6.sub
index f26ae4d..8842983 100644
--- a/tests/glob6.sub
+++ b/tests/glob6.sub
@@ -12,6 +12,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# tests of the backslash-in-glob-patterns discussion on the austin-group ML
+[ $UID -eq 0 ] && { echo "glob6.sub: the test suite should not be run as root" >&2 ; }
: ${TMPDIR:=/var/tmp}
diff --git a/tests/herestr.tests b/tests/herestr.tests
index 6f4c74c..c97fa4f 100644
--- a/tests/herestr.tests
+++ b/tests/herestr.tests
@@ -11,6 +11,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+# since we look at functions below, remove all functions now
+funcs=$(compgen -A function)
+if [ -n "$funcs" ]; then
+ unset -f $funcs
+fi
+
# basics
read x <<<"alpha"
echo "$x"
diff --git a/tests/intl2.sub b/tests/intl2.sub
index 64961bc..2f3236e 100644
--- a/tests/intl2.sub
+++ b/tests/intl2.sub
@@ -1,5 +1,25 @@
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# this locale causes problems all over the place
unset LC_ALL LC_NUMERIC
-export LANG=de_DE.UTF-8
+if locale -a | grep -i '^de_DE\.UTF.*8' >/dev/null ; then
+ export LANG=de_DE.UTF-8
+else
+ echo "intl2.sub: warning: you do not have the de_DE.UTF-8 locale installed;" >&2
+ echo "intl2.sub: that will cause some of these tests to fail." >&2
+fi
+
printf '%.4f\n' 1
LANG=C printf '%.4f\n' 1
diff --git a/tests/jobs4.sub b/tests/jobs4.sub
index 7ecd712..9f1cd04 100644
--- a/tests/jobs4.sub
+++ b/tests/jobs4.sub
@@ -34,4 +34,6 @@ wait
# the sleep is intended to give the kill time to execute before the job
# exits
(sleep 1 ; cat ) &
+# suppress any message about terminated process
+exec 2>/dev/null
kill -1 %% && echo i killed it || echo could not kill it
diff --git a/tests/jobs7.sub b/tests/jobs7.sub
index 3e76db3..582365f 100644
--- a/tests/jobs7.sub
+++ b/tests/jobs7.sub
@@ -3,4 +3,6 @@ set -m
sleep 20 &
echo $(jobs)
echo $(fg %% ; jobs)
+# suppress any message about sleep 20 being terminated
+exec 2>/dev/null
kill %1
diff --git a/tests/new-exp.right b/tests/new-exp.right
index b35782e..628e3ff 100644
--- a/tests/new-exp.right
+++ b/tests/new-exp.right
@@ -735,30 +735,51 @@ a
defg
defg
defg
+$'&' $'&' $'&' $'&' $'&' $'&' $'&'
$'a' $'b' $'c' $'d' $'e' $'f' $'g'
a b c d e f g
a b c d e f g
-a b c d e f g
& & & & & & &
+& & & & & & &
+& & & & & & &
+\& \& \& \& \& \& \&
a a a a a a a
3 3 3 3 3 3 3
abc defg
abc defg
-abc defg
-abc defg
-abc defg
& defg
& defg
+& defg
+\& defg
+\abc defg
abcdefg
-abcdefg
-&defg
&defg
\abcdefg
+\&defg
+\&defg
+\abcdefg
+\\&defg
&defg
&defg
\&defg
\&defg
\\&defg
+letx&yee
+letx&yee
+letxssyee
+letxssyee
+letx\&yee
+letx\&yee
+letx&yee
+letx&yee
+let\&ee
+let\\ssee
+let\ssee
+let\ssee
+let\&ee
+let\&ee
+let&ee
+let&ee
argv[1] = </>
argv[1] = </>
diff --git a/tests/new-exp16.sub b/tests/new-exp16.sub
index 34ad8a7..a48efb8 100644
--- a/tests/new-exp16.sub
+++ b/tests/new-exp16.sub
@@ -16,6 +16,8 @@ HOME=/homes/chet
string=abcdefg
set -- a b c
+shopt -u patsub_replacement
+
# verify existing behavior
echo ${string/abc/~}
echo "${string/abc/~}"
@@ -29,6 +31,11 @@ echo ${string//?/\$\'&\' }
shopt -s patsub_replacement
+echo ${string//?/\$\'&\' }
+
+echo ${string//?/& }
+echo "${string//?/& }"
+
echo ${string//?/\& }
echo "${string//?/\& }"
echo ${string//?/"& "}
@@ -51,7 +58,9 @@ rep='\\&'
echo "${string/abc/&}"
echo ${string/abc/\&}
echo "${string/abc/\\&}"
+echo ${string/abc/"\\&"}
echo "${string/abc/"\\&"}"
+echo ${string/abc/$rep}
echo ${string/abc/"$rep"}
shopt -u patsub_replacement
@@ -61,3 +70,34 @@ echo ${string/abc/\&}
echo "${string/abc/\\&}"
echo "${string/abc/"\\&"}"
echo ${string/abc/"$rep"}
+
+shopt -s patsub_replacement
+
+repl='x&y'
+r2='x\&y'
+var='letssee'
+
+pat=ss
+
+echo ${var//$pat/"$repl"}
+echo "${var//$pat/"$repl"}"
+echo ${var//$pat/$repl}
+echo "${var//$pat/$repl}"
+
+echo ${var//$pat/"$r2"}
+echo "${var//$pat/"$r2"}"
+echo ${var//$pat/$r2}
+echo "${var//$pat/$r2}"
+
+r2='\\&'
+r3='\&'
+
+echo ${var//$pat/\\\&}
+echo ${var//$pat/\\$r2}
+echo ${var//$pat/\\&}
+echo ${var//$pat/$r2}
+
+echo ${var//$pat/"\&"}
+echo ${var//$pat/"$r3"}
+echo ${var//$pat/"&"}
+echo ${var//$pat/$r3}
diff --git a/tests/read.right b/tests/read.right
index b9212ca..ec3d686 100644
--- a/tests/read.right
+++ b/tests/read.right
@@ -69,11 +69,11 @@ FOO
0
0
1
-[?2004h[?2004l timeout 1: ok
+timeout 1: ok
unset or null 1
-[?2004h[?2004l timeout 2: ok
+timeout 2: ok
unset or null 2
-[?2004h[?2004l timeout 3: ok
+timeout 3: ok
unset or null 3
timeout 4: ok
abcde
diff --git a/tests/read7.sub b/tests/read7.sub
index d47882f..a9204ac 100644
--- a/tests/read7.sub
+++ b/tests/read7.sub
@@ -13,6 +13,9 @@
#
# test behavior of native readline timeouts
+# turn off bracketed paste to avoid spurious output
+bind 'set enable-bracketed-paste off' 2>/dev/null
+
read -t 0.00001 -e var
estat=$?
if [ $estat -gt 128 ]; then
diff --git a/tests/run-intl b/tests/run-intl
index c31d1d0..8234f28 100644
--- a/tests/run-intl
+++ b/tests/run-intl
@@ -1,8 +1,5 @@
# See whether or not we can use `diff -a'
( diff -a ./intl.right ./intl.right >/dev/null 2>&1 ) && AFLAG=-a
-echo "warning: some of these tests will fail if you do not have UTF-8" >&2
-echo "warning: locales installed on your system." >&2
-
${THIS_SH} ./intl.tests > ${BASH_TSTOUT}
diff $AFLAG ${BASH_TSTOUT} intl.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/unicode1.sub b/tests/unicode1.sub
index fc74285..0debe3d 100644
--- a/tests/unicode1.sub
+++ b/tests/unicode1.sub
@@ -109,7 +109,14 @@ fr_FR_ISO_8859_1=(
[0x00fb]=$'\373' [0x00fc]=$'\374' [0x00fd]=$'\375' [0x00fe]=$'\376'
)
-TestCodePage fr_FR.ISO8859-1 fr_FR_ISO_8859_1
+# this locale causes problems all over the place
+if locale -a | grep -i '^fr_FR\.ISO8859.*1' >/dev/null ; then
+ TestCodePage fr_FR.ISO8859-1 fr_FR_ISO_8859_1
+else
+ echo "unicode1.sub: warning: you do not have the fr_FR.ISO8859-1 locale installed;" >&2
+ echo "unicode1.sub: that will cause some of these tests to fail." >&2
+fi
+
zh_TW_BIG5=(
[0x00f6]=$'\366' [0x00f7]=$'\367' [0x00f8]=$'\370' [0x00f9]=$'\371' [0x00fa]=$'\372'