From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17438 invoked by alias); 13 Jan 2018 16:23:00 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 42261 Received: (qmail 6266 invoked by uid 1010); 13 Jan 2018 16:23:00 -0000 X-Qmail-Scanner-Diagnostics: from out1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.25):SA:0(-2.6/5.0):. Processed in 2.451847 secs); 13 Jan 2018 16:23:00 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=mkak1G0CLONeH3pMD +ZgEu+iPtoKV6/sXiFIsazWVX8=; b=JBhWi1PYzVguhDGut4f0kfg64agvUg9wW jf2jghRVSnfrzhZa86hB3ZT3MAfPzU75xcLUyVGnw7xSsMcOXSvRqJQvfQ53NDt8 qRBbXUrnNtllzRErxEW+U+10Snfu07rTDAicrJMEixrICDOrJOnZi0BGe+NUgx27 iytk+kzsJow2/SKPJKbyDVjum+/Ne988Uf58jS2RkN0v7SdM1M+j5pt5/2YPGgzc CE6RUbv0PRPF4dDPJeSW1EEOb7+0UQ61cHV8CDiISwTs125j4LY0tItzgyLJXmud BtJykIxuX5+p//tf4s6fhNfQR34A1wI+xuxn9ZnmZixWw8dCc/6kw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=mkak1G0CLONeH3pMD +ZgEu+iPtoKV6/sXiFIsazWVX8=; b=VdyAudFIUuDESLs0JHKTjkxNPFCfrRwWx JGv5+1XV5UzkzOMPLP67OikCIDGVEkF7wGaavPohlxKUn8T3Ff9K3jc09Rb2JPZe /k+4hz8EWkh15jfdSXJLL+pzM7+dTsk3F4yJQmV4G/+kWfpIcdgrbgukgwY+RLh9 253AJsejBz/6J0zUK2u2nyL71ANsD5Jyewg7A5M9oF+ej5BbEMwIEwDrhoMiRKyf hCfCHw1KKtzzAeRlcx+NO9HsZd70ocH0Bywo8LtyGQ0Y9evoecaMUSoG3nbBIupn cAN35Gnt/uU1S9lJiyvXfdpEe63kzSJIhKF3QUMfHHualyVJ4sjpA== X-ME-Sender: From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH] docs: Expand documentation of $histchars[1]. Joint with Matthew Martin. Date: Sat, 13 Jan 2018 16:11:14 +0000 Message-Id: <20180113161114.28345-1-danielsh@tarpaulin.shahaf.local2> X-Mailer: git-send-email 2.11.0 --- 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(!)').