zsh-workers
 help / color / mirror / code / Atom feed
From: Thorsten Meinecke <kaefer@aglaia.snafu.de>
To: zsh-workers@math.gatech.edu
Subject: Doc fix for :s/l/r/ modifier
Date: Sat, 8 Jul 1995 00:18:11 +0200 (MET DST)	[thread overview]
Message-ID: <m0sULiv-00000PC@aglaia.snafu.DE> (raw)

Since aeons, it seems to be perfectly legal to use the :s/l/r/ modifier
with history expansion. It may be just a funny way to write ^l^r, but
it can do much more.
The man page still says it only works with filename and parameter
expansion. This clarifies that a bit.

Since aeons, the error message for `!:s//r/' (and no previous match) is:

    zsh: no previous substitution with &

This is at least confusing for the casual user.


diff -c Doc/zshexpn.1.orig Doc/zshexpn.1
*** Doc/zshexpn.1.orig	Sat Jul  1 00:07:50 1995
--- Doc/zshexpn.1	Fri Jul  7 23:21:13 1995
***************
*** 827,834 ****
  .TP
  .B f
  Repeats the immediately (without a colon) following modifier until the
! resulting word doesn't change any more. This one and the following
! four only work with parameter and filename expansion.
  .TP
  .B F:\fIexpr\fB:
  Like \fBf\fP, but repeats only \fIn\fP times if the expression
--- 827,835 ----
  .TP
  .B f
  Repeats the immediately (without a colon) following modifier until the
! resulting word doesn't change any more. This and the following
! \fBF\fP, \fBw\fP and \fBW\fP modifier only work with parameter and
! filename expansion.
  .TP
  .B F:\fIexpr\fB:
  Like \fBf\fP, but repeats only \fIn\fP times if the expression
diff -c Src/hist.c.orig Src/hist.c
*** Src/hist.c.orig	Fri Jul  7 23:23:56 1995
--- Src/hist.c	Fri Jul  7 23:24:23 1995
***************
*** 356,362 ****
  		    subst(&sline, hsubl, hsubr, gbal);
  		else {
  		    herrflush();
! 		    zerr("no previous substitution with &", NULL, 0);
  		    habort();
  		}
  		break;
--- 356,362 ----
  		    subst(&sline, hsubl, hsubr, gbal);
  		else {
  		    herrflush();
! 		    zerr("no previous substitution", NULL, 0);
  		    habort();
  		}
  		break;

-- 
Thorsten Meinecke
<kaefer@aglaia.snafu.de>


             reply	other threads:[~1995-07-08 10:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-07-07 22:18 Thorsten Meinecke [this message]
1995-07-10 18:55 ` Zoltan Hidvegi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m0sULiv-00000PC@aglaia.snafu.DE \
    --to=kaefer@aglaia.snafu.de \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).