zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] docs: Expand documentation of $histchars[1].  Joint with Matthew Martin.
@ 2018-01-13 16:11 Daniel Shahaf
  2018-01-13 18:04 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Shahaf @ 2018-01-13 16:11 UTC (permalink / raw)
  To: zsh-workers

---
 Doc/Zsh/expn.yo    | 11 +++++++----
 Doc/Zsh/grammar.yo |  3 ++-
 2 files changed, 9 insertions(+), 5 deletions(-)

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(!)').


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] docs: Expand documentation of $histchars[1]. Joint with Matthew Martin.
  2018-01-13 16:11 [PATCH] docs: Expand documentation of $histchars[1]. Joint with Matthew Martin Daniel Shahaf
@ 2018-01-13 18:04 ` Bart Schaefer
  2018-01-13 18:14   ` Daniel Shahaf
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2018-01-13 18:04 UTC (permalink / raw)
  To: Daniel Shahaf; +Cc: zsh-workers

On Sat, Jan 13, 2018 at 8:11 AM, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
>  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, 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.

Minor quibble: You're referring to "the first character of the
tt(histchars)" everywhere except in that sentence about obtaining a
literal tt(!).


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] docs: Expand documentation of $histchars[1]. Joint with Matthew Martin.
  2018-01-13 18:04 ` Bart Schaefer
@ 2018-01-13 18:14   ` Daniel Shahaf
  2018-01-13 18:28     ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Shahaf @ 2018-01-13 18:14 UTC (permalink / raw)
  To: zsh-workers

Bart Schaefer wrote on Sat, 13 Jan 2018 10:04 -0800:
> On Sat, Jan 13, 2018 at 8:11 AM, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> >  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, 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.
> 
> Minor quibble: You're referring to "the first character of the
> tt(histchars)" everywhere except in that sentence about obtaining a
> literal tt(!).

Could you suggest some alternative text?  I tried to come up with
something but don't have any suggestions yet.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] docs: Expand documentation of $histchars[1]. Joint with Matthew Martin.
  2018-01-13 18:14   ` Daniel Shahaf
@ 2018-01-13 18:28     ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2018-01-13 18:28 UTC (permalink / raw)
  To: Daniel Shahaf; +Cc: zsh-workers

On Sat, Jan 13, 2018 at 10:14 AM, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
>
> Could you suggest some alternative text?  I tried to come up with
> something but don't have any suggestions yet.

How about just adding to the preceding sentence?

... including inside double quotes (but not inside single quotes
tt('...') or C-style quotes tt($'...') nor when escaped with a
backslash).


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-13 18:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-13 16:11 [PATCH] docs: Expand documentation of $histchars[1]. Joint with Matthew Martin Daniel Shahaf
2018-01-13 18:04 ` Bart Schaefer
2018-01-13 18:14   ` Daniel Shahaf
2018-01-13 18:28     ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).