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

RE: ${_comps[(K)*diff*]}



>
> The keys of $_comps are used as patterns (none of them is a real
> pattern, they are just strings -- the names of commands and special
> context), but none of them matches the string `*diff*'. So you get
> nothing. Of course. Right? Maybe what you wanted is the (I) flag?
> (That (I) and (K) do what they do and that they are named the way they
> are named may be a bit irritating -- probably less when thinking about
> normal arrays instead of associations -- but that has historical
> reasons. (K) just came later.)
>

O.K., sorry, I was confused by manual. The description in (k), (K): "the first value whose
key matches the EXP" means (unless my english completely fails me) STRING key is matched
against PATTERN EXP. The usual usage is "string matches pattern", is not it? I hope,
somebody with native english can clarify it.

And the reference in (k) description "this behaves like `r'" just adds to confusion.

Sorry for the noice (yes, I actually meant (I) in this case)

-andrej



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