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

Re: PATCH: predict-on: suppress long listings



On Oct 27,  4:03pm, Sven Wischnowsky wrote:
} Subject: Re: PATCH: predict-on: suppress long listings
}
} May I pour some compconfig over this?

Sure!  I've been hoping you'd get interested.

} Also, this didn't really work together with AUTO_MENU, it started that 
} too early (if it had just attempted completion). For now I've unset it 
} in predict-on and restore it in predict-off, but there must be a
} better solution.

There is -- just unset it inside insert-and-predict and let localoptions
restore it when that exits.  Does that not work?  I'm not sure how to
reproduce exactly the behavior you don't like, so I can't tell.

} Also, with a global match spec with partial-word stuff, the behavior
} of always returning to the previous cursor position was clearly
} wrong.

Ah, yes.  It also does odd things with certain characters, like if you
type $! you end up with $\! with the cursor on the backslash.  Probably
it should search rightwards until it finds the character you typed and
stay there, going back again if it doesn't find that character.

There's one other annoying thing if you can think of how to fix it.
Example:

zagzig% setopt automenu			<-- type this and hit return
zagzig% se				<-- then type this
zagzig% setopt automenu			<-- history-searches to this

Now you have "setopt automenu" on the command line with the cursor on
the "t".  If you press TAB, you get this:

zagzig% setopt  automenu		<-- note two spaces

with cursor on the second space.  I don't want it to insert the space
after the completion when there already is a space on the line!

} I hope all this isn't completely the kind of stuff you didn't want to
} have in predict-on...

No problem.  BTW, the keys I chose to bind this to are `^X/' (on) and
`^X.' (off).  Those are pretty obscure things in emacs (I'd never used
them) and unused by default in zsh.  I originally had it on ^X^R and
^X^T but one of the other completion widgets wants ^X^R.

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



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