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

zsh completion help sought



Hi,

I'm fairly sure that what I want can be done with the new-style
completion stuff; if so, I'll be able to at last move away from compctl
stuff without spending all my time snarling at the computer I'm using as
it barfs on my bad habits.

I'm getting frustrated trying to understand the manual enough to figure
out what goes where in the zstyle parameters to achieve this.  Please,
someone, have mercy on me.

(1) I use $_<tab> frequently, rather than history expansion, when I'm
    doing multiple operations on one file; I do want it expanded before
    I press return, both as a sanity check and so that I can repeat a
    command using command history.  How do I set a style/function so
    that if the current word is $_ and the cursor is at the end, to
    ignore all those evil no-namespace-workaround-hack functions and
    just expand the $_ variable itself?

(2) As a similar sanity check before pressing return, I like to
    tab-expand a glob to cast an eye over the list and catch my more
    egregrious mistakes.  How do I keep menu-completion turned on for
    tab expansions of a bare suffix but move straight to glob expansion
    if the end of the current word is a '*' ?  (ie, the item you get in
    the new system when tab cycles far enough through the options to
    show you all the options, just before showing you the bare '*')?

The first item is the one which always kills my productivity any time I
try to make the switch.  (And yes, I know that this is my problem, not a
zsh problem, but I want the shell to cater to _my_ whim).

Help, please?

Thanks,
-Phil



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