From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id UAA29670 for ; Sat, 8 Jul 1995 20:53:46 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA04766 (5.65c/Gatech-10.0-IDA for ); Sat, 8 Jul 1995 06:54:44 -0400 Received: by math (5.x/SMI-SVR4) id AA05011; Sat, 8 Jul 1995 06:51:22 -0400 Resent-Date: Sat, 8 Jul 1995 00:18:11 +0200 (MET DST) Old-Return-Path: Message-Id: Subject: Doc fix for :s/l/r/ modifier To: zsh-workers@math.gatech.edu Date: Sat, 8 Jul 1995 00:18:11 +0200 (MET DST) From: Thorsten Meinecke Organization: none. Location: Berlin, Germany X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-Id: <"Te6d13.0.9E1.fCc_l"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/182 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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