1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326
|
From: Jakub Wilk <jwilk@debian.org>
Date: Mon, 12 Aug 2019 23:29:30 +0000
Subject: improve typography in the manual page
Forwarded: no
---
rc.1 | 84 ++++++++++++++++++++++++++++++++++----------------------------------
1 file changed, 42 insertions(+), 42 deletions(-)
diff --git a/rc.1 b/rc.1
index 4da360f..85f5239 100644
--- a/rc.1
+++ b/rc.1
@@ -194,7 +194,7 @@ are placed in
.Cr $* .
Thus:
.Ds
-.Cr "rc -c 'echo $*' 1 2 3"
+.Cr "rc \-c \(aqecho $*\(aq 1 2 3"
.De
.TP
\&
@@ -433,9 +433,9 @@ i.e.,
the backslash is ignored along with everything else.
.SS Grouping
Zero or more commands may be grouped within braces
-.Rc (`` { ''
+.Rc (\(lq { \(rq
and
-.Rc `` } ''),
+.Rc \(lq } \(rq),
and are then treated as one command.
Braces do not otherwise define scope;
they are used only for command grouping.
@@ -538,11 +538,11 @@ existing file, use:
.PP
If the file does not exist, then it is created.
.PP
-``Here documents'' are supported as in
+\(lqHere documents\(rq are supported as in
.I sh
with the use of
.Ds
-.Cr "command << 'eof-marker'"
+.Cr "command << \(aqeof-marker\(aq"
.De
.PP
Subsequent lines form the standard input of
@@ -573,11 +573,11 @@ enter it as
.PP
Additionally,
.I rc
-supports ``here strings'', which are like here documents,
+supports \(lqhere strings\(rq, which are like here documents,
except that input is taken directly from a string on the command line.
Their use is illustrated here:
.Ds
-.Cr "cat <<< 'this is a here string' | wc"
+.Cr "cat <<< \(aqthis is a here string\(aq | wc"
.De
.PP
(This feature enables
@@ -649,7 +649,7 @@ Data can be sent down a pipe to several commands using
.IR tee (1)
and the output version of this notation:
.Ds
-.Cr "echo hi there | tee >{sed 's/^/p1 /'} >{sed 's/^/p2 /'}"
+.Cr "echo hi there | tee >{sed \(aqs/^/p1 /\(aq} >{sed \(aqs/^/p2 /\(aq}"
.De
.SH "CONTROL STRUCTURES"
The following may be used for control flow in
@@ -699,8 +699,8 @@ to each element of
(which may contain variables and backquote substitutions) and runs
.IR cmd .
If
-.Rc `` in
-.IR list ''
+.Rc \(lq in
+.IR list \(rq
is omitted, then
.I rc
will set
@@ -709,7 +709,7 @@ to each element of
.Cr $* .
For example:
.Ds
-.Cr "for (i in \`{ls -F | grep '\e*$' | sed 's/\e*$//'}) { commands }"
+.Cr "for (i in \`{ls \-F | grep \(aq\e*$\(aq | sed \(aqs/\e*$//\(aq}) { commands }"
.De
.TP
\&
@@ -753,13 +753,13 @@ which depend on the exit status of a command.
.De
.PP
executes the first command and then executes the second command if and only if
-the first command exits with a zero exit status (``true'' in Unix).
+the first command exits with a zero exit status (\(lqtrue\(rq in Unix).
.Ds
.Cr "command || command"
.De
.PP
executes the first command and then executes the second command if and only if
-the first command exits with a nonzero exit status (``false'' in Unix).
+the first command exits with a nonzero exit status (\(lqfalse\(rq in Unix).
.Ds
.Cr "! command"
.De
@@ -789,7 +789,7 @@ will only perform pattern matching if a metacharacter occurs unquoted and
literally in the input.
Thus,
.Ds
-.Cr "foo='*'"
+.Cr "foo=\(aq*\(aq"
.Cr "echo $foo"
.De
.PP
@@ -939,14 +939,14 @@ Thus, the following are all equivalent
.De
.PP
Note that the null string,
-.Cr "''" ,
+.Cr "\(aq\(aq" ,
and the null list,
.Cr "()" ,
are two very different things.
Assigning the null string to a variable is a valid operation, but it
does not remove its definition.
.Ds
-.Cr "null = '' empty = () echo $#null $#empty"
+.Cr "null = \(aq\(aq empty = () echo $#null $#empty"
.De
.PP
produces the output
@@ -1063,7 +1063,7 @@ assigning the null list to a variable:
.Ic var =()
.De
.PP
-For ``free careting'' to work correctly,
+For \(lqfree careting\(rq to work correctly,
.I rc
must make certain assumptions
about what characters may appear in a variable name.
@@ -1077,7 +1077,7 @@ To reference a variable with other
characters in its name, quote the variable name.
Thus:
.Ds
-.Cr "echo $'we$Ird:Variab!le'"
+.Cr "echo $\(aqwe$Ird:Variab!le\(aq"
.De
.SS "Local Variables"
Any number of variable assignments may be made local to a single
@@ -1144,7 +1144,7 @@ Note also that the list of subscripts may be given by any of
.IR rc 's
list operations:
.Ds
-.Cr "$var(\`{awk 'BEGIN{for(i=1;i<=10;i++)print i;exit; }'})"
+.Cr "$var(\`{awk \(aqBEGIN{for(i=1;i<=10;i++)print i;exit; }\(aq})"
.De
.PP
returns the first 10 elements of
@@ -1262,13 +1262,13 @@ Instead, they should explicitly set what they need.
Several variables are known to
.I rc
and are treated specially.
-In the following list, ``default'' indicates that
+In the following list, \(lqdefault\(rq indicates that
.I rc
-gives the variable a default value on startup; ``no-export'' indicates
-that the variable is never exported; and ``read-only'' indicates that
+gives the variable a default value on startup; \(lqno-export\(rq indicates
+that the variable is never exported; and \(lqread-only\(rq indicates that
an attempt to set the variable will silently have no effect.
.PP
-Also, ``alias'' means that the variable is aliased to the same name in
+Also, \(lqalias\(rq means that the variable is aliased to the same name in
capitals.
For example, an assignment to
.Cr $cdpath
@@ -1354,7 +1354,7 @@ prints
\&
whereas
.Ds
-.Cr "x=`{echo foo |grep bar}; whatis bqstatus"
+.Cr "x=\`{echo foo |grep bar}; whatis bqstatus"
.De
.TP
\&
@@ -1446,7 +1446,7 @@ line.
sets
.Cr $prompt
to
-.Cr "('; ' '')"
+.Cr "(\(aq; \(aq \(aq\(aq)"
by default.
The reason for this is that it enables an
.I rc
@@ -1479,7 +1479,7 @@ The exit status of the last command.
If the command exited with a numeric value, that number is the status.
If the command died with a signal, the status is the name of that signal;
if a core file was created, the string
-.Rc `` +core ''
+.Rc \(lq +core \(rq
is appended.
The value of
.Cr $status
@@ -1545,12 +1545,12 @@ a shorthand for
.IR ls (1),
could be:
.Ds
-.Cr "fn l { ls -FC $* }"
+.Cr "fn l { ls \-FC $* }"
.De
.PP
but not
.Ds
-.Cr "fn l { ls -FC } # WRONG"
+.Cr "fn l { ls \-FC } # WRONG"
.De
.SH "INTERRUPTS AND SIGNALS"
.I rc
@@ -1639,7 +1639,7 @@ Thus from within a shell script,
.De
.TP
\&
-does the ``right thing''.
+does the \(lqright thing\(rq.
.TP
.B break
Breaks from the innermost
@@ -1663,7 +1663,7 @@ This command is present to allow functions with the
same names as builtins to use the underlying builtin or binary.
For example:
.Ds
-.Cr "fn ls { builtin ls -FC $* }"
+.Cr "fn ls { builtin ls \-FC $* }"
.De
.TP
\&
@@ -1671,7 +1671,7 @@ is a reasonable way to pass a default set of arguments to
.Cr ls (1),
whereas
.Ds
-.Cr "fn ls { ls -FC $* } # WRONG"
+.Cr "fn ls { ls \-FC $* } # WRONG"
.De
.TP
\&
@@ -1813,7 +1813,7 @@ For example:
disables core dumps.
To set a soft limit equal to the hard limit:
.Ds
-.Cr "limit `{limit -h datasize}"
+.Cr "limit \`{limit \-h datasize}"
.De
.TP
.B newpgrp
@@ -1899,7 +1899,7 @@ lists all objects of that type.
Without arguments,
.Cr whatis
is equivalent to
-.Cr "whatis -fv" ,
+.Cr "whatis \-fv" ,
and prints the values of all shell variables and functions.
.TP
\&
@@ -1915,7 +1915,7 @@ by sourcing this file with a
.Cr .
command.
Another note:
-.Cr "whatis -s > file"
+.Cr "whatis \-s > file"
cannot be used to store the state of
.IR rc 's
signal handlers in a file, because builtins with redirections
@@ -2098,10 +2098,10 @@ cmd : /* empty */ %prec WHILE
| simple
| brace epilog
| IF paren optnl iftail
- | FOR '(' word IN words ')' optnl cmd
- | FOR '(' word ')' optnl cmd
+ | FOR \(aq(\(aq word IN words \(aq)\(aq optnl cmd
+ | FOR \(aq(\(aq word \(aq)\(aq optnl cmd
| WHILE paren optnl cmd
- | SWITCH '(' word ')' optnl '{' cbody '}'
+ | SWITCH \(aq(\(aq word \(aq)\(aq optnl \(aq{\(aq cbody \(aq}\(aq
| TWIDDLE optcaret word words
| cmd ANDAND optnl cmd
| cmd OROR optnl cmd
@@ -2143,7 +2143,7 @@ keyword: FOR | IN | WHILE | IF | SWITCH
words: /* empty */ | words word
-optnl: /* empty */ | optnl '\en'
+optnl: /* empty */ | optnl \(aq\en\(aq
.ft R
.De
.SH FILES
@@ -2202,7 +2202,7 @@ expression or a
expression are a syntax error.
Thus, this code is illegal.
.Ds
-.Cr "while ((~ $1 -*) && (! ~ $1 --)) { ..."
+.Cr "while ((~ $1 \-*) && (! ~ $1 \-\-)) { ..."
.De
.TP
The redundant inner parentheses must be omitted.
@@ -2217,8 +2217,8 @@ Backquote substitution never produces empty strings - multiple
consecutive occurrences of the separator are treated the same as a
single occurrence.
.Ds
-.Cr "ifs=! { x = `{echo -n a!!b}; whatis x }"
-.Cr "x=(a b) # NOT x=(a '' b)"
+.Cr "ifs=! { x = \`{echo -n a!!b}; whatis x }"
+.Cr "x=(a b) # NOT x=(a \(aq\(aq b)"
.PP
Bug reports should be mailed to
.Cr "<toby@paccrat.org>" .
@@ -2302,7 +2302,7 @@ also sets
to the name of a function being executed/file
being sourced.
.SH "SEE ALSO"
-``rc \(em A Shell for Plan 9 and UNIX Systems'',
+\(lqrc \(em A Shell for Plan 9 and UNIX Systems\(rq,
Unix Research System,
Tenth Edition,
Volume 2. (Saunders College Publishing)
|