Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Doc fix for :s/l/r/ modifier



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@xxxxxxxxxxxxxxx>



Messages sorted by: Reverse Date, Date, Thread, Author