Use `.Pq Ql'' to quote single characters, instead of
`.Pq Li''.
This makes the resulting output more aesthetically pleasing in text-only terminals: Reviewed by: ru
This commit is contained in:
parent
91ee1c5df6
commit
a762afe578
34
bin/sh/sh.1
34
bin/sh/sh.1
@ -98,7 +98,7 @@ generally prompts before each command and handles programming
|
|||||||
and command errors differently (as described below).
|
and command errors differently (as described below).
|
||||||
When first starting, the shell inspects argument 0, and
|
When first starting, the shell inspects argument 0, and
|
||||||
if it begins with a dash
|
if it begins with a dash
|
||||||
.Pq Li - ,
|
.Pq Ql - ,
|
||||||
the shell is also considered a login shell.
|
the shell is also considered a login shell.
|
||||||
This is normally done automatically by the system
|
This is normally done automatically by the system
|
||||||
when the user first logs in.
|
when the user first logs in.
|
||||||
@ -172,15 +172,15 @@ built-in command
|
|||||||
(described later in the section called
|
(described later in the section called
|
||||||
.Sx Built-in Commands ) .
|
.Sx Built-in Commands ) .
|
||||||
Introducing an option with a dash
|
Introducing an option with a dash
|
||||||
.Pq Li -
|
.Pq Ql -
|
||||||
enables the option,
|
enables the option,
|
||||||
while using a plus
|
while using a plus
|
||||||
.Pq Li +
|
.Pq Ql +
|
||||||
disables the option.
|
disables the option.
|
||||||
A
|
A
|
||||||
.Dq Li --
|
.Dq Li --
|
||||||
or plain
|
or plain
|
||||||
.Dq Li -
|
.Dq Ql -
|
||||||
will stop option processing and will force the remaining
|
will stop option processing and will force the remaining
|
||||||
words on the command line to be treated as arguments.
|
words on the command line to be treated as arguments.
|
||||||
The
|
The
|
||||||
@ -366,11 +366,11 @@ it impossible to put single-quotes in a single-quoted string).
|
|||||||
.It Double Quotes
|
.It Double Quotes
|
||||||
Enclosing characters within double quotes preserves the literal
|
Enclosing characters within double quotes preserves the literal
|
||||||
meaning of all characters except dollarsign
|
meaning of all characters except dollarsign
|
||||||
.Pq Li $ ,
|
.Pq Ql $ ,
|
||||||
backquote
|
backquote
|
||||||
.Pq Li ` ,
|
.Pq Ql ` ,
|
||||||
and backslash
|
and backslash
|
||||||
.Pq Li \e .
|
.Pq Ql \e .
|
||||||
The backslash inside double quotes is historically weird.
|
The backslash inside double quotes is historically weird.
|
||||||
It remains literal unless it precedes the following characters,
|
It remains literal unless it precedes the following characters,
|
||||||
which it serves to quote:
|
which it serves to quote:
|
||||||
@ -380,7 +380,7 @@ which it serves to quote:
|
|||||||
.It Backslash
|
.It Backslash
|
||||||
A backslash preserves the literal meaning of the following
|
A backslash preserves the literal meaning of the following
|
||||||
character, with the exception of the newline character
|
character, with the exception of the newline character
|
||||||
.Pq Li \en .
|
.Pq Ql \en .
|
||||||
A backslash preceding a newline is treated as a line continuation.
|
A backslash preceding a newline is treated as a line continuation.
|
||||||
.El
|
.El
|
||||||
.Ss Reserved Words
|
.Ss Reserved Words
|
||||||
@ -703,7 +703,7 @@ They are executed in the current shell, although they do not affect its
|
|||||||
environment when used in pipelines.
|
environment when used in pipelines.
|
||||||
.Ss Background Commands (&)
|
.Ss Background Commands (&)
|
||||||
If a command is terminated by the control operator ampersand
|
If a command is terminated by the control operator ampersand
|
||||||
.Pq Li & ,
|
.Pq Ql & ,
|
||||||
the shell executes the command asynchronously;
|
the shell executes the command asynchronously;
|
||||||
the shell does not wait for the command to finish
|
the shell does not wait for the command to finish
|
||||||
before executing the next command.
|
before executing the next command.
|
||||||
@ -1057,11 +1057,11 @@ character is used to introduce parameter expansion, command
|
|||||||
substitution, or arithmetic evaluation.
|
substitution, or arithmetic evaluation.
|
||||||
.Ss Tilde Expansion (substituting a user's home directory)
|
.Ss Tilde Expansion (substituting a user's home directory)
|
||||||
A word beginning with an unquoted tilde character
|
A word beginning with an unquoted tilde character
|
||||||
.Pq Li ~
|
.Pq Ql ~
|
||||||
is
|
is
|
||||||
subjected to tilde expansion.
|
subjected to tilde expansion.
|
||||||
All the characters up to a slash
|
All the characters up to a slash
|
||||||
.Pq Li /
|
.Pq Ql /
|
||||||
or the end of the word are treated as a username
|
or the end of the word are treated as a username
|
||||||
and are replaced with the user's home directory.
|
and are replaced with the user's home directory.
|
||||||
If the
|
If the
|
||||||
@ -1290,13 +1290,13 @@ variable or the output of the command is scanned for these
|
|||||||
characters and they are turned into meta-characters.
|
characters and they are turned into meta-characters.
|
||||||
.Pp
|
.Pp
|
||||||
An asterisk
|
An asterisk
|
||||||
.Pq Li *
|
.Pq Ql *
|
||||||
matches any string of characters.
|
matches any string of characters.
|
||||||
A question mark
|
A question mark
|
||||||
.Pq Li \&?
|
.Pq Ql \&?
|
||||||
matches any single character.
|
matches any single character.
|
||||||
A left bracket
|
A left bracket
|
||||||
.Pq Li [
|
.Pq Ql [
|
||||||
introduces a character class.
|
introduces a character class.
|
||||||
The end of the character class is indicated by a
|
The end of the character class is indicated by a
|
||||||
.Dq Li \&] ;
|
.Dq Li \&] ;
|
||||||
@ -1310,7 +1310,7 @@ rather than introducing a character class.
|
|||||||
A character class matches any of the characters between the square brackets.
|
A character class matches any of the characters between the square brackets.
|
||||||
A range of characters may be specified using a minus sign.
|
A range of characters may be specified using a minus sign.
|
||||||
The character class may be complemented by making an exclamation point
|
The character class may be complemented by making an exclamation point
|
||||||
.Pq Li !\&
|
.Pq Ql !\&
|
||||||
the first character of the character class.
|
the first character of the character class.
|
||||||
.Pp
|
.Pp
|
||||||
To include a
|
To include a
|
||||||
@ -1853,9 +1853,9 @@ flag may be omitted when specifying arguments to be used
|
|||||||
as positional replacement parameters.
|
as positional replacement parameters.
|
||||||
This is not recommended,
|
This is not recommended,
|
||||||
because the first argument may begin with a dash
|
because the first argument may begin with a dash
|
||||||
.Pq Li -
|
.Pq Ql -
|
||||||
or a plus
|
or a plus
|
||||||
.Pq Li + ,
|
.Pq Ql + ,
|
||||||
which the
|
which the
|
||||||
.Ic set
|
.Ic set
|
||||||
command will interpret as a request to enable or disable options.
|
command will interpret as a request to enable or disable options.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user