Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Should we backup this change? RE: Modifier substitutions.
- X-seq: zsh-workers 10702
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>, "Zsh hackers list" <zsh-workers@xxxxxxxxxxxxxx>, Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: Should we backup this change? RE: Modifier substitutions.
- Date: Wed, 12 Apr 2000 14:53:35 +0000
- In-reply-to: <000201bfa47a$4c04c690$21c9ca95@xxxxxxxxxxxxxx>
- In-reply-to: <200004121234.OAA09838@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <000201bfa47a$4c04c690$21c9ca95@xxxxxxxxxxxxxx> <200004121234.OAA09838@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
On Apr 12, 4:26pm, Andrej Borsenkow wrote:
} Subject: Should we backup this change? RE: Modifier substitutions.
}
} There was no reply ... so I ask once more: should we backup this change?
}
} > -----Original Message-----
} > > The `#' is being interpreted as an anchor at the head of the
} > > string even
} > > when buried inside $old. I have a feeling that wasn't my intention.
} > >
} >
} > Erm ... it was done by Bart (do not have arcticle number handy) as a
} > result of my question.
On Apr 12, 2:34pm, Sven Wischnowsky wrote:
}
} I would be in favour of that. The possible confusion when
} forgetting to check/quote the `#' and `%' at the beginning of
} parameters used there is more important than the advantage, I think.
The change went in in 6002. It was followed in 6003 by a change to allow
a leading double backslash to escape the delimiter. So all you need to
do is change uses of ${foo/$bar/...} into ${foo/\\$bar/...} to avoid the
confusion. And without 6002, there's no way to build up an anchored
pattern in a variable (which was Andrej's original complaint).
Also, though I'm the last person to argue for keeping a change solely for
compatibility, bash recognizes the same syntaxes.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author