Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] complete two or more options for zsh
On Sep 20, 4:27am, Jun T. wrote:
} Subject: [PATCH] complete two or more options for zsh
}
} % zsh -<TAB>
}
} This offers zsh's options, but the following does not work:
}
} % zsh -v -<TAB>
}
} Here, -v can be any other option.
There's another problem, which is made worse by your change: The
default thing to complete for "zsh <TAB>" is options rather than
script names. Prior to your change, a side-effect was that script
names began to be completed as they should have been all along,
which is probably why nobody noticed before. After your change,
script names are never offered unless you first type at least one
character that is not "-".
} The reason seems to be that all the optspecs generated by
} _argument -- '*:' (_sh: line 24)
} look like
} -v[equivalent to --verbose]: --aliases: etc.
} i.e., a ':' is appended to their ends (so the option requires
} an argument).
}
} This ':' is added by
} cache+=( "${(@)^tmp}${descr}" ) (_arguments: line 282)
} where $descr is equal to ':', which comes from the helpspec '*:'
} passed to _arguments.
Hm. Is this a bug in _arguments rather than in the way that _sh
called _arguments? That is, should descr ever be a single ":"?
(That _sh calls _arguments the way it does is already somewhat a
problem; _arguments doesn't behave well when it's not driving the
whole show.)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author