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

Re: Feature request: #a (approximate matching) only for spaces



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