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

Re: Prepend/append to the members of a list



On 10/31/06, Nikolai Weibull <now@xxxxxxxx> wrote:
On 10/31/06, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Oct 31,  2:52pm, Peter Stephenson wrote:
> }
> } +When tt(HIST_SUBST_PATTERN) is set, var(l) may start with a tt(#)
> } +to indicate that the pattern must match at the start of the string
> } +to be substituted, and a tt(%) may appear at the start or after an tt(#)
> } +to indicate that the pattern must match at the end of the string
> } +to be substituted.
>
> The doc in parameter expansion says
>
>      The PATTERN may begin with a `#', in which case the PATTERN must
>      match at the start of the string, or `%', in which case it must
>      match at the end of the string.
>
> Should that doc also say that #% is a legal pattern meaning "anchor
> the match at both ends of the string"?

So that it matches an empty string you mean?

Oops, still in regex mode.  Forget that question.

 nikolai



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