Skip to content

Commit d41ec67

Browse files
JohnoKingMcDutchie
authored andcommitted
Fix some errors in the documentation and other minor issues (#42)
Somewhat notable changes in this commit: - The 'set +r' bugfix (re: 74b4162) is now documented in the changelog. - Missing options have been added to the synopsis section of the ksh man page. - The minor formatting fix from ksh-community/ksh#5 has been applied to the ksh man page. - A few fixes from att@5e747cfb have been applied to the ksh man page. - The man page fixes from att#353 have been applied, being: - An addition to document the behavior of 'set -H'. - A fix for the cd section appending rksh93. - A fix for some options being indented too far. - Removal of a duplicate section documenting '-D'. - Reordering the options for 'set' in alphabetical order. - A minor fix for the documentation of 'ksh -i'.
1 parent 43d9fba commit d41ec67

File tree

13 files changed

+54
-48
lines changed

13 files changed

+54
-48
lines changed

NEWS

+5-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ Any uppercase BUG_* names are modernish shell bug IDs.
4545

4646
- A two decade old bug that caused 'whence -a' to base the path of
4747
tracked aliases on the user's current working directory has been
48-
fixed. Now the real path to the tracked aliases is shown when '-a'
49-
is passed to the whence command.
48+
fixed. Now the real path to tracked aliases is shown when '-a' is
49+
passed to the whence command.
5050

5151
2020-06-17:
5252

@@ -120,6 +120,9 @@ Any uppercase BUG_* names are modernish shell bug IDs.
120120
shell's hash table. This fix applies to the hash utility and when the
121121
PATH is reset manually.
122122

123+
- 'set +r' is no longer able to unset the restricted option. This change
124+
makes the behavior of 'set +r' identical to 'set +o restricted'.
125+
123126
2020-06-09:
124127

125128
- The 'unalias' builtin will now return a non-zero status if it tries

lib/package/INIT.README

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ All recorded changes follow.
165165
10-06-25 package.sh: "force admin ditto" => no ditto --update option
166166
10-06-22 C+probe: handle cc that require .[ci] input for version info
167167
10-06-21 ditto.sh: change default remote access to ssh (about time)
168-
10-06-12 regress.sh: DISGNOSTICS [ 1 | 0 | pattern ] and fix EXIT for all
168+
10-06-12 regress.sh: DIAGNOSTICS [ 1 | 0 | pattern ] and fix EXIT for all
169169
10-06-09 package.sh: add AT&T to usable nmake check
170170
10-06-06 iffe.sh,iffe.tst: add { api ver } ops
171171
10-04-22 package.sh: update "html binary|source" NAME/PASSWORD info

lib/package/INIT.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
10-06-25 package.sh: "force admin ditto" => no ditto --update option
128128
10-06-22 C+probe: handle cc that require .[ci] input for version info
129129
10-06-21 ditto.sh: change default remote access to ssh (about time)
130-
10-06-12 regress.sh: DISGNOSTICS [ 1 | 0 | pattern ] and fix EXIT for all
130+
10-06-12 regress.sh: DIAGNOSTICS [ 1 | 0 | pattern ] and fix EXIT for all
131131
10-06-09 package.sh: add AT&T to usable nmake check
132132
10-06-06 iffe.sh,iffe.tst: add { api ver } ops
133133
10-04-22 package.sh: update "html binary|source" NAME/PASSWORD info

src/cmd/INIT/RELEASE

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
10-06-25 package.sh: "force admin ditto" => no ditto --update option
7171
10-06-22 C+probe: handle cc that require .[ci] input for version info
7272
10-06-21 ditto.sh: change default remote access to ssh (about time)
73-
10-06-12 regress.sh: DISGNOSTICS [ 1 | 0 | pattern ] and fix EXIT for all
73+
10-06-12 regress.sh: DIAGNOSTICS [ 1 | 0 | pattern ] and fix EXIT for all
7474
10-06-09 package.sh: add AT&T to usable nmake check
7575
10-06-06 iffe.sh,iffe.tst: add { api ver } ops
7676
10-04-22 package.sh: update "html binary|source" NAME/PASSWORD info

src/cmd/builtin/pty.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ USAGE_LICENSE
3333
"[+?Input to \bpty\b will be written to the standard input of this "
3434
"command. The standard output and standard error from the command will "
3535
"be written to the standard output of \bpty\b.]"
36-
"[+?The \bpty\b commmand terminates when the command completes.]"
36+
"[+?The \bpty\b command terminates when the command completes.]"
3737
"[d:dialogue?Execute the dialogue on the standard input. A dialogue is a "
3838
"sequence of commands, one command per line. All \are\a patterns are "
3939
"extended regular expressions. The \are\a \b?1\b will print the subject "
@@ -58,7 +58,7 @@ USAGE_LICENSE
5858
"[r [\are\a]]?read a line from the master [and it should match "
5959
"re]]]"
6060
"[s \amilliseconds\a?sleep for \amilliseconds\a]"
61-
"[t \amilliseconds\a?set the master read timout to "
61+
"[t \amilliseconds\a?set the master read timeout to "
6262
"\amilliseconds\a; the default is \b1000\b]"
6363
"[u \are\a?read lines from the master until one matches \are\a]"
6464
"[v \alevel\a?set the verbose trace \alevel\a, more output for "

src/cmd/ksh93/COMPATIBILITY

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ omitted features that are completely upward compatible.
128128
The sequence escape control-v will display the shell version.
129129

130130
29. In ksh-88, DEBUG traps were executed. after each command. In ksh-93
131-
DEBUG traps are exeucted before each command.
131+
DEBUG traps are executed before each command.
132132

133133
30. In ksh-88, a redirection to a file name given by an empty string was
134134
ignored. In ksh-93, this is an error.

src/cmd/ksh93/RELEASE88

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ of ksh.
157157
8. Variable .sh.version is set to the version string for
158158
this shell.
159159
9. Variable .sh.name is set to the name of the variable
160-
that that was referenced or assigned to when executing a get
160+
that was referenced or assigned to when executing a get
161161
or set discipline function.
162162
10. Variable .sh.subscript is set to the subscript for the variable
163163
that was referenced or assign to when executing a get or

src/cmd/ksh93/bltins/enum.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ static void put_enum(Namval_t* np,const char *val,int flags,Namfun_t *fp)
160160
i++;
161161
}
162162
if(nv_isattr(np,NV_NOFREE))
163-
error(ERROR_exit(1), "%s: invalid value %s",nv_name(np),val);
163+
error(ERROR_exit(1), "%s: invalid value %s",nv_name(np),val);
164164
}
165165

166166
static char* get_enum(register Namval_t* np, Namfun_t *fp)

src/cmd/ksh93/bltins/typeset.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ static int setall(char **argv,register int flag,Dt_t *troot,struct tdata *tp
561561
if(troot == shp->fun_tree)
562562
{
563563
/*
564-
*functions can be exported or
564+
* functions can be exported or
565565
* traced but not set
566566
*/
567567
flag &= ~NV_ASSIGN;

src/cmd/ksh93/data/builtins.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ const char sh_opthash[] =
940940
"\n"
941941
"[+EXIT STATUS?]{"
942942
"[+0?Successful completion.]"
943-
"[+>0?An error occured.]"
943+
"[+>0?An error occurred.]"
944944
"}"
945945
"[+SEE ALSO?\bsh\b(1), \balias\b(1)]"
946946
;

src/cmd/ksh93/sh.1

+37-34
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ ksh93, rksh93, pfksh93 \- KornShell, a standard/restricted command and programmi
3939
.B ksh93
4040
.\}
4141
[
42-
.B \(+-abcefhikmnoprstuvxBCDP
42+
.B \(+-abcefhiklmnoprstuvxBCDEGHP
4343
] [
4444
.B \-R
4545
file ] [
@@ -63,7 +63,7 @@ option ] .\|.\|. [
6363
.B \-R
6464
file ] [
6565
.B \(+-o
66-
option ] .\|.\|. [
66+
option ] .\|.\|. [
6767
.B \-
6868
] [ arg .\|.\|. ]
6969
.SH DESCRIPTION
@@ -2201,7 +2201,7 @@ included.
22012201
.IP
22022202
All other characters are output without change and a trailing
22032203
newline is added.
2204-
If unset, the default value, \fB$'\enreal\et%2lR\enuser\et%2lU\ensys\t%2lS'\fP,
2204+
If unset, the default value, \fB$'\enreal\et%2lR\enuser\et%2lU\ensys\et%2lS'\fP,
22052205
is used. If the value is null, no timing information is displayed.
22062206
.TP
22072207
.B
@@ -4005,7 +4005,7 @@ by defining the first sub-variable name as
40054005
and defining its type as the base type.
40064006
Any remaining definitions will be additions and modifications
40074007
that apply to the new type.
4008-
If the new type name is the same is that of the base type,
4008+
If the new type name is the same as that of the base type,
40094009
the type will be replaced and the original type will
40104010
no longer be accessible.
40114011
.PP
@@ -4014,7 +4014,7 @@ The
40144014
command with the
40154015
.B \-T
40164016
and no option argument or operands will write all the type definitions to
4017-
standard output in a form that that can be read in to create all they types.
4017+
standard output in a form that can be read in to create all they types.
40184018
.SS Jobs.
40194019
.PP
40204020
If the
@@ -4252,7 +4252,7 @@ where
42524252
.I path\^
42534253
names an
42544254
existing directory
4255-
then that directory is searched after immediately after the current directory
4255+
then that directory is searched immediately after the current directory
42564256
as if it were found in the
42574257
.B
42584258
.SM FPATH
@@ -5769,7 +5769,7 @@ The
57695769
command may not be executed by
57705770
.if \nZ=0 .B rsh\^.
57715771
.if \nZ=1 .B rksh\^.
5772-
.if \nZ=1 .B rksh93\^.
5772+
.if \nZ=2 .B rksh93\^.
57735773
.TP
57745774
\f3command\fP \*(OK \f3\-pvxV\fP \*(CK \f2name\^\fP \*(OK \f2arg\^\fP .\|.\|. \*(CK
57755775
Without the
@@ -6302,7 +6302,7 @@ The exit status is
63026302
0 if the value of the last expression
63036303
is non-zero, and 1 otherwise.
63046304
.TP
6305-
\f3print\fP \*(OK \f3\-CRenprsv\^\fP \*(CK \*(OK \f3\-u\fP \f2unit\^\fP\*(CK \*(OK \f3\-f\fP \f2format\^\fP \*(CK \*(OK \f2arg\^\fP .\|.\|. \*(CK
6305+
\f3print\fP \*(OK \f3\-CRenprsv\^\fP \*(CK \*(OK \f3\-u\fP \f2unit \^\fP\*(CK \*(OK \f3\-f\fP \f2format\^\fP \*(CK \*(OK \f2arg\^\fP .\|.\|. \*(CK
63066306
With no options or with option
63076307
.B \-
63086308
or
@@ -6607,7 +6607,7 @@ or
66076607
on the command line
66086608
determines which method is used.
66096609
.TP
6610-
\f3read\fP \*(OK \f3\-ACSprsv\^\fP \*(CK \*(OK \f3\-d\fP \f2delim\^\fP\*(CK \*(OK \f3\-n\fP \f2n\^\fP\*(CK \*(OK \*(OK \f3\-N\fP \f2n\^\fP\*(CK \*(OK \*(OK \f3\-t\fP \f2timeout\^\fP\*(CK \*(OK \f3\-u\fP \f2unit\^\fP\*(CK \*(OK \f2vname\f3?\f2prompt\^\f1 \*(CK \*(OK \f2vname\^\fP .\|.\|. \*(CK
6610+
\f3read\fP \*(OK \f3\-ACSprsv\^\fP \*(CK \*(OK \f3\-d\fP \f2delim \^\fP\*(CK \*(OK \f3\-n\fP \f2n \^\fP\*(CK \*(OK \*(OK \f3\-N\fP \f2n \^\fP\*(CK \*(OK \f3\-t\fP \f2timeout \^\fP\*(CK \*(OK \f3\-u\fP \f2unit \^\fP\*(CK \*(OK \f2vname\f3?\f2prompt\^\f1 \*(CK \*(OK \f2vname\^\fP .\|.\|. \*(CK
66116611
The shell input mechanism.
66126612
One line is read and
66136613
is broken up into fields using the characters in
@@ -6838,6 +6838,11 @@ If followed by a
68386838
.B /
68396839
only directories and sub-directories are matched.
68406840
.TP 8
6841+
.B \-H
6842+
Enable \f3!\fP-style history expansion similar to
6843+
.IR csh (1).
6844+
.
6845+
.TP 8
68416846
.B \-a
68426847
All subsequent variables that are defined are automatically exported.
68436848
.TP 8
@@ -6896,10 +6901,6 @@ The following argument can be one of the following option names:
68966901
Same as
68976902
.BR \-a .
68986903
.TP 8
6899-
.B errexit
6900-
Same as
6901-
.BR \-e .
6902-
.TP 8
69036904
.B bgnice
69046905
All background jobs are run at a lower priority.
69056906
This is the default mode.
@@ -6913,6 +6914,10 @@ Puts you in an
69136914
.I emacs
69146915
style in-line editor for command entry.
69156916
.TP 8
6917+
.B errexit
6918+
Same as
6919+
.BR \-e .
6920+
.TP 8
69166921
.B globstar
69176922
Same as
69186923
.BR \-G .
@@ -6922,6 +6927,10 @@ Puts you in a
69226927
.I gmacs
69236928
style in-line editor for command entry.
69246929
.TP 8
6930+
.B histexpand
6931+
Same as
6932+
.BR \-H .
6933+
.TP 8
69256934
.B ignoreeof
69266935
The shell will not exit on end-of-file.
69276936
The command
@@ -6981,6 +6990,10 @@ of the pipeline have completed, and the return value
69816990
will be the value of the last non-zero command
69826991
to fail or zero if no command has failed.
69836992
.TP 8
6993+
.B privileged
6994+
Same as
6995+
.BR \-p .
6996+
.TP 8
69846997
.B showme
69856998
When enabled, simple commands or pipelines preceded by a semicolon
69866999
.RB ( ; )
@@ -6991,18 +7004,14 @@ Otherwise, the leading
69917004
.B ;
69927005
will be ignored.
69937006
.TP 8
6994-
.B privileged
7007+
.B trackall
69957008
Same as
6996-
.BR \-p .
7009+
.BR \-h .
69977010
.TP 8
69987011
.B verbose
69997012
Same as
70007013
.BR \-v .
70017014
.TP 8
7002-
.B trackall
7003-
Same as
7004-
.BR \-h .
7005-
.TP 8
70067015
.B vi
70077016
Puts you in insert mode of a
70087017
.I vi\^
@@ -7937,18 +7946,21 @@ when it is invoked:
79377946
.PD 0
79387947
.TP 8
79397948
.B \-D
7940-
Do not execute the script, but output the set of double quoted strings
7941-
preceded by a
7942-
.BR $ .
7943-
These strings are needed for localization of the script to different locales.
7949+
A list of all double quoted strings that are preceded by a
7950+
.B $
7951+
will be printed on standard output and the shell will exit.
7952+
This set of strings will be subject to language translation
7953+
when the locale is not C or POSIX.
7954+
No commands will be executed.
7955+
.PD
79447956
.TP 8
79457957
.B \-E
79467958
Reads the file named by the
79477959
.B ENV
79487960
variable or by
79497961
\s-1$HOME\s+1/\f3.\fPkshrc
79507962
if not defined after the profiles.
7951-
.TP 10
7963+
.TP 8
79527964
.BI \-c
79537965
If the
79547966
.B \-c
@@ -7984,23 +7996,14 @@ In this case \s-1TERM\s+1 is ignored (so that \f3kill 0\fP
79847996
does not kill an interactive shell) and \s-1INTR\s+1 is caught and ignored
79857997
(so that
79867998
.B wait
7987-
is ).
7999+
is interruptible).
79888000
In all cases, \s-1QUIT\s+1 is ignored by the shell.
79898001
.TP
79908002
.B \-r
79918003
If the
79928004
.B \-r
79938005
option is present, the shell is a restricted shell.
79948006
.TP
7995-
.B \-D
7996-
A list of all double quoted strings that are preceded by a
7997-
.B $
7998-
will be printed on standard output and the shell will exit.
7999-
This set of strings will be subject to language translation
8000-
when the locale is not C or POSIX.
8001-
No commands will be executed.
8002-
.PD
8003-
.TP
80048007
.B \-P
80058008
If
80068009
.B \-P

src/cmd/ksh93/tests/functions.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,7 @@ $SHELL -c 'PATH=/dev/null; function fn { unset -f fn; true; }; fn; fn' 2> /dev/n
12621262
# Check if environment variables passed while invoking a function are exported
12631263
# https://github.com/att/ast/issues/32
12641264
unset foo
1265-
function f2 { env | grep -q "^foo" || err_exit "Environment variable is not propogated from caller function"; }
1265+
function f2 { env | grep -q "^foo" || err_exit "Environment variable is not propagated from caller function"; }
12661266
function f1 { f2; env | grep -q "^foo" || err_exit "Environment variable is not passed to a function"; }
12671267
foo=bar f1
12681268

src/lib/libast/RELEASE

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
09-12-04 features/options: add "opt map-libc" check
224224
09-12-03 tm/tmxdate.c: fix 'next month final day' for dec -> jan
225225
09-11-21 misc/magic.tab: add gimp XCF
226-
09-11-20 vmalloc/vmtrace.c: add pid to assertion disgnostics
226+
09-11-20 vmalloc/vmtrace.c: add pid to assertion diagnostics
227227
09-11-11 regex.h,regcomp.c: add REG_CLASS_ESCAPE, \ inside [...] literal by default
228228
09-11-03 regex/regcache.c: change to variable length pattern strings
229229
09-10-28 include/error.h: fix ERROR_translate() arg parens

0 commit comments

Comments
 (0)