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

Does run-help work as intended?



Please forgive my nit-picking, but ... in zle_bindings.c we find:

    {"run-help", processcmd, ZLE_MENUCMP},

If I'm not mistaken, the ZLE_MENUCMP there means that typing <run-help>
should not interrupt a menu completion in progress.  That is, during a
command completion when menu-cycling through choices, I should be able
to invoke run-help on a command, decide that's not the one I wanted,
and proceed to complete the next command in the cycle.

Unfortunately, this doesn't work, though it would be wonderful if it did.

processcmd(), the internal implementation of run-help, uses pushline()
to save the current command line, then inserts the new "run-help ..."
command.  This means that ZLE reads the "run-help ..." as if it were
typed input; so the last ZLE action seen before the line is reprinted
is not run-help, but accept-line.  Thus the menu completion stops, no
matter what flags are attached to "run-help"; ZLE_MENUCMP might as well
not be there.

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern

New male in /home/schaefer:
>N  2 Justin William Schaefer  Sat May 11 03:43  53/4040  "Happy Birthday"




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