Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Why approximate pattern doesn't match?
- X-seq: zsh-users 21526
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Why approximate pattern doesn't match?
- Date: Mon, 9 May 2016 22:11:35 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=NTmngCnpDYhXZCvlh3APRtjmm7VVI4JlRq8Mg709Hs8=; b=G3SO1x0VRR4ctWuNipPe5shj9j/UoktEiBP6Mz44jxIYb5/aQTrJZGzOhJVQyuuM55 DSzMhUQhIiBQpBlCjUkvg59OaUQ9dJtVyMxVqcHtFpMNd6Fhlot5kowJqq2ZsW14Tx7t Tf4/9EGVa3y3L5HE/QsVL+3D1zrj0SOoIvtWJdRjsyQSTxwz+0icQz/cqgUFTdvAnDxd TZM0RbVCBU/jUk4FB/XG996ep1LuKttbH5+xTvU0AfshUndsTzoL/RcyB6gG1ZS+1Ytt mXGlFUp7pfSOvbp86cTAwf3iEJwM+UFo2C5ziJz3HniKVHHvGnVyv7OApDwiSTXoNGvV 3UDg==
- In-reply-to: <CAKc7PVB5XaTEgZ-k5dE1T1Fh1RVPR53zskRm0x9g8SeecZo-jw@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVB5XaTEgZ-k5dE1T1Fh1RVPR53zskRm0x9g8SeecZo-jw@mail.gmail.com>
Hello again,
it appears that the approximate matching works only for first word in
the *~^* sequence:
a=( "git push" )
pattern1='git*~^*pash*'
pattern2='pash*~^*git*'
echo "${(@M)a:#(#ia2)*$~pattern1*}"
-> [nothing]
echo "${(@M)a:#(#ia2)*$~pattern2*}"
-> git push
Any solution?
Best regards,
Sebastian Gniazdowski
On 9 May 2016 at 22:07, Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx> wrote:
> Hello,
>
> a=( "git commit amend" )
> pattern1='git*~^*comit*~^*amend'
> pattern2='git*~^*commit*~^*amend'
> echo "${(@M)a:#(#ia2)*$~pattern1*}"
> -> [nothing]
> echo "${(@M)a:#(#ia2)*$~pattern2*}"
> -> git commit amend
>
> Does somebody know why a2 isn't sufficient to match "comit" against "commit" ?
>
> Best regards,
> Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author