Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Feature request: #a (approximate matching) only for spaces
- X-seq: zsh-users 21308
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Feature request: #a (approximate matching) only for spaces
- Date: Fri, 19 Feb 2016 11:13:27 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=Xg+wcd9D7MsHNtL40GcFOZ8Wwg5WHjCWSlQdZm9fk3I=; b=seXoKOD/zNu8+f0QSTDUoWsIt8CU1OuQNBL4yiZwbBuck+gkIAQLRw1nr9ccyUpSdJ QJjHewXh+s+S10nQXYeZESH32qF6PRuFfSI2uyEjX0nJUWJvoubGGKefZU7BGuAle+c8 0YOfTbijeSdPuMuNW265/bctq0Q5S9+COM+sWja8waab5IUgv9139H1gzVJSnOM5bcai fO//xXYKvVOX9/wjHhGjGGoRENDOsFqnXjKljbJiMgqPCGDVdAEPpH/M1/WruYu7duni 5HZSrgJHIVD06niZAQ04CPR51kTKeGVnJL2v3r1bKoNq/nc9Bl+asqXgVj2XJFIA4cqA Ei+Q==
- In-reply-to: <CAKc7PVAiaRoVuwpaWNH5+-qnkJKRYUm+cd-5z65aEz1_EFrtkA@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: <CAKc7PVATpn35B0mNzKQQFCpAgKq6F8C98nCFb0OfXMobJNi6Ow@mail.gmail.com> <CAHYJk3RgHN+WZs-57dOSuNJ2KQVJFEMK3GYOeXKktbvZ6ba+Ww@mail.gmail.com> <151207002253.ZM32539@torch.brasslantern.com> <CAKc7PVAiaRoVuwpaWNH5+-qnkJKRYUm+cd-5z65aEz1_EFrtkA@mail.gmail.com>
On Feb 19, 7:21am, Sebastian Gniazdowski wrote:
} Subject: Re: Feature request: #a (approximate matching) only for spaces
}
} On 7 December 2015 at 09:22, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
} > Amazingly, you can write that as a one-liner, if you don't count the
} > necessity of the setopts and declaring the parameters:
} >
} > (${(j:|:)~${i::=1}+${${:-$INPUT"${(@)^${(s::)INPUT}/?/}"}:s/(#b)(#s)(?(#c$[i++]))/$match[1]*}})*
}
} Can be resulting pattern put into $parameter for later use by $~parameter?
You might be able to work out a way to do so, but it'd be difficult to get
the quoting right so that arrays were processed before joining etc.
In fact that also may mess up the use of same as an array subscript. Hm.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author