@@ -2082,7 +2082,8 @@ The first (default: \f3!\fP) signals the start of a history expansion.
20822082The second (default: \f3 ^ \fP ) is used for short-form substitutions.
20832083The third (default: \f3 # \fP ), when found as the first character of a word,
20842084causes history expansion to be skipped for the rest of the words on the line.
2085- Multi-byte characters (e.g. UTF-8) are not supported and produce undefined results.
2085+ Multi-byte characters (e.g. UTF-8) are not supported and produce
2086+ undefined results.
20862087.TP
20872088.B
20882089.SM HISTCMD
@@ -4734,8 +4735,10 @@ Normally, this means that a command line with an erroneous history expansion
47344735is lost and needs to be retyped from scratch,
47354736but if the \f3 histreedit \fP shell option is turned on
47364737and a line editor is active (see \f2 In-line Editing Options \fP below),
4737- the erroneous line is pre-filled into the next prompt's input buffer for correcting.
4738- The \f3 histverify \fP option causes the same to be done for the results of successful
4738+ the erroneous line is pre-filled into the next prompt's input buffer
4739+ for correcting.
4740+ The \f3 histverify \fP option causes the same to be done for the results
4741+ of successful
47394742history expansions, allowing verification and editing before execution.
47404743.PP
47414744A history expansion may have an \f2 event specification \fP , which indicates
@@ -4783,12 +4786,14 @@ output by the \f3hist -l\fP command:
47834786The commands are shown with their event numbers.
47844787The current event, which we haven't typed in yet, is event 13.
47854788\f3 !11 \fP and \f3 ! \- 2 \fP refer to event 11.
4786- \f3 !! \fP refers to the previous event, 12. \f3 !! \fP can be abbreviated \f3 ! \fP if it is
4789+ \f3 !! \fP refers to the previous event, 12. \f3 !! \fP can be
4790+ abbreviated \f3 ! \fP if it is
47874791followed by \f3 : \fP (see below).
47884792\f3 !n \fP refers to event 9, which begins with \f3 n \fP .
47894793\f3 !?old? \fP also refers to event 12, which contains \f3 old \fP .
4790- Without word designators or modifiers, history references simply expand to the
4791- entire event, so we might type \f3 !cp \fP to redo the copy command or \f3 !!|more \fP
4794+ Without word designators or modifiers, history references simply
4795+ expand to the entire event, so we might type \f3 !cp \fP to redo the
4796+ copy command or \f3 !!|more \fP
47924797if the \f3 diff \fP output scrolled off the top of the screen.
47934798.PP
47944799To select words from an event,
@@ -4842,16 +4847,17 @@ arguments from the \f3cp\fP command. If we didn't care about the order of the
48424847\f3 diff \fP , we might have said \f3 diff ! \- 2:1 \- 2 \fP or simply \f3 diff ! \- 2:* \fP .
48434848The \f3 cp \fP command might have been written \f3 cp wumpus.man !#:1.old \fP ,
48444849using \f3 # \fP to refer to the current event.
4845- \f3 !n: \- hurkle.man \fP would reuse the first two words from the \f3 nroff \fP command
4846- to say \f3 nroff \- man hurkle.man \fP .
4850+ \f3 !n: \- hurkle.man \fP would reuse the first two words from
4851+ the \f3 nroff \fP command to say \f3 nroff \- man hurkle.man \fP .
48474852.PP
48484853The \f3 : \fP separating the event specification from the word designator
48494854can be omitted if the argument selector begins with a
48504855\f3 ^ \fP , \f3 $ \fP , \f3 * \fP , \f3 % \fP or \f3 \- \fP .
48514856For example, our \f3 diff \fP command might have been \f3 diff !!^.old !!^ \fP
48524857or, equivalently, \f3 diff !!$.old !!$ \fP .
48534858However, if \f3 !! \fP is abbreviated \f3 ! \fP ,
4854- an argument selector beginning with \f3 \- \fP will be interpreted as an event specification.
4859+ an argument selector beginning with \f3 \- \fP will be interpreted
4860+ as an event specification.
48554861.PP
48564862The word(s) in a history reference can be edited
48574863by following them with one or more modifiers,
@@ -4886,7 +4892,8 @@ If \f2l\fP is empty,
48864892the \f2 l \fP from the previous substitution is used,
48874893or if there is none,
48884894the \f2 s \fP from the most recent \f3 ? \fP\f2 s \fP\f3 ? \fP search.
4889- The trailing delimiter may be omitted if it is immediately followed by a newline.
4895+ The trailing delimiter may be omitted if it is immediately followed
4896+ by a newline.
48904897.TP 8
48914898.B &
48924899Repeat the previous substitution.
@@ -4921,16 +4928,19 @@ We might follow \f3mail \-s "I forgot my password" rot\fP
49214928with \f3 !:s/rot/root \fP to correct the spelling of \f3 root \fP .
49224929.PP
49234930History expansions also occur when an input line begins with \f3 ^ \fP .
4924- When it is the first character on an input line, it is an abbreviation of \f3 !:s^ \fP .
4925- Thus we might have said \f3 ^rot^root \fP to make the spelling correction in the previous example.
4931+ When it is the first character on an input line,
4932+ it is an abbreviation of \f3 !:s^ \fP .
4933+ Thus we might have said \f3 ^rot^root \fP to make the spelling correction
4934+ in the previous example.
49264935This is the only history expansion that does not explicitly begin with \f3 ! \fP .
49274936.PP
49284937If a word on a command line begins with the history comment character \f3 # \fP ,
49294938history expansion is ignored for the rest of that line.
49304939This usually causes the shell parser
49314940(which uses the same character to signal a comment)
49324941to treat the rest of the line as a comment as well,
4933- but as history expansion is parsed separately from the shell grammar and with different rules,
4942+ but as history expansion is parsed separately from the shell grammar
4943+ and with different rules,
49344944this cannot be guaranteed in all cases.
49354945If the history comment character is changed,
49364946the shell grammar comment character does not change along with it.
@@ -6310,9 +6320,11 @@ is given, the name
63106320and value of the alias is printed.
63116321The obsolete
63126322.B \- x
6313- option has no effect in most contexts, although if it's used with
6323+ option has no effect in most contexts, but when it's used with
63146324.B \- t
6315- it will suppress all output.
6325+ it will cause
6326+ .B alias
6327+ to do nothing.
63166328The exit status is non-zero if a
63176329.I name\^
63186330is given, but no value, and no alias has been defined for the
0 commit comments