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

Re: Interactive search on the command line?



Bart Schaefer wrote on Thu, Dec 03, 2015 at 16:59:50 -0800:
> On Dec 3, 11:39pm, Daniel Shahaf wrote:
> }     % () {
> }         local haystack="$1"
...
> 
> % () {
>     local haystack=$1 needle=$2
...
> (I also removed all redundant quotes and braces, since the original
> would only work in native zsh emulation anyway.)

The quotes are not redundant; they are required for compatibility with
zsh-5.0.8 and older.  (Those releases predate the upgrade of 'local' to
a reserved word, and, without the quotes, would perform word splitting
before the assignment.)



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