From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6864 invoked by alias); 19 Feb 2016 19:13:03 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21308 Received: (qmail 20930 invoked from network); 19 Feb 2016 19:13:02 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=Xg+wcd9D7MsHNtL40GcFOZ8Wwg5WHjCWSlQdZm9fk3I=; b=hdKixMcsTcgWFyje1/D4CHon1I+GhyhBDuapAIwYmfwurkxEsDVhfV2JlErFhkHJqq GRdcu0xRnVu9wmxn6UUNi6ewtdxH4CvtUWQBrcyz80L61EhR5hcnP3ooD3/bkt2LDlXO OpqgdsY522s4hzKCF2OpvJ1HbsKrRaCktJpScyhUDSMgJytn7tY8/KbEwZEoKTc6t3mo SBhpacTHHAIvnugDXPCtRQiks15RsPeUrdOc+mFVhhfRKBZsPWj01JKiZlb9G1IfSCg8 WkE9bmJrWY4YVCshjZ6hMi2zQU38qpMCWIGJCY9SrDJqz1ZNcCdVmqXg/VFkvhwPKbor x/Aw== X-Gm-Message-State: AG10YORkex79ylanU54sIyNWxBPUKYzbJdTxV1IF0r0J9I4yfJ2r7CVZeW8NSUqBfc0Ntw== X-Received: by 10.98.8.219 with SMTP id 88mr20373368pfi.51.1455909180974; Fri, 19 Feb 2016 11:13:00 -0800 (PST) From: Bart Schaefer Message-Id: <160219111327.ZM17643@torch.brasslantern.com> Date: Fri, 19 Feb 2016 11:13:27 -0800 In-Reply-To: Comments: In reply to Sebastian Gniazdowski "Re: Feature request: #a (approximate matching) only for spaces" (Feb 19, 7:21am) References: <151207002253.ZM32539@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: Feature request: #a (approximate matching) only for spaces MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 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.