summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2018-01-13 16:11:14 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2018-01-13 17:52:59 +0000
commitba752d2eb51957b85fa0003732e6e6345ad80668 (patch)
tree2e3d4bfa82a34406abfbba2fcc71800fa377f013
parentef0aae1c27fb198f6b7983aa85fe44853a6f426c (diff)
downloadzsh-ba752d2eb51957b85fa0003732e6e6345ad80668.tar.gz
zsh-ba752d2eb51957b85fa0003732e6e6345ad80668.zip
42261: docs: Expand documentation of $histchars[1]. Joint with Matthew Martin.
-rw-r--r--ChangeLog5
-rw-r--r--Doc/Zsh/expn.yo11
-rw-r--r--Doc/Zsh/grammar.yo3
3 files changed, 14 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 75720c61b..6b1b59932 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-13 Daniel Shahaf <d.s@daniel.shahaf.name>
+
+ * 42261: Doc/Zsh/expn.yo, Doc/Zsh/grammar.yo: docs: Expand
+ documentation of $histchars[1]. Joint with Matthew Martin.
+
2018-01-10 Oliver Kiddle <okiddle@yahoo.co.uk>
* Matthew Martin: 42242: Completion/Unix/Command/_ldconfig:
diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo
index d5e5838df..1ea6ae47b 100644
--- a/Doc/Zsh/expn.yo
+++ b/Doc/Zsh/expn.yo
@@ -83,10 +83,11 @@ subsect(Overview)
vindex(histchars, use of)
A history expansion begins with the first character of the tt(histchars)
parameter, which is `tt(!)' by default, and may occur anywhere on the
-command line; history expansions do not nest. The `tt(!)' can be escaped
-with `tt(\)' or can be enclosed between a pair of single quotes (tt(''))
-to suppress its special meaning. Double quotes will em(not) work for
-this. Following this history character is an optional event designator
+command line, including inside double quotes (but not inside single quotes
+tt('...') or C-style quotes tt($'...')). A literal `tt(!)' may be
+obtained by escaping it with a backslash.
+
+The first character is followed by an optional event designator
(ifzman(see )noderef(Event Designators)) and then an optional word
designator (noderef(Word Designators)); if neither of these designators is
present, no history expansion occurs.
@@ -96,6 +97,8 @@ but before any other expansions take place and before the command is
executed. It is this expanded form that is recorded as the history event
for later references.
+History expansions do not nest.
+
By default, a history reference with no event designator refers to the
same event as any preceding history reference on that command line; if it
is the only history reference in a command, it refers to the previous
diff --git a/Doc/Zsh/grammar.yo b/Doc/Zsh/grammar.yo
index f9600424e..d2c7cd29c 100644
--- a/Doc/Zsh/grammar.yo
+++ b/Doc/Zsh/grammar.yo
@@ -671,4 +671,5 @@ single quote if it is set.
Inside double quotes (tt("")), parameter and
command substitution occur, and `tt(\)' quotes the characters
-`tt(\)', `tt(`)', `tt(")', and `tt($)'.
+`tt(\)', `tt(`)', `tt(")', `tt($)', and the first character
+of tt($histchars) (default `tt(!)').