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

Re: requests



On Apr 16,  4:06pm, Bart Schaefer wrote:
} Subject: (Fwd) Re: requests
}
} } 1. in ${param[(r)$anotherparam]} the result of $anotherparam
} } is always treated as a pattern, it would be nice if one could use
} } $~anotherparam for this.
} 
} One can get the desired effect by using ${param[(r)${(q)anotherparam}]},
} but (another inconsistency) this works for arrays but fails for string
} subscription on scalars.  That's clearly a bug.

I have a fix for that now, too.  It failed only when the `*' was the last
character in $anotherparam, because the code that checked for whether to
append a `*' to the pattern failed to check that the next-to-last character
might be a backslash.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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