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

Re: Using buffer for history-incremental-search-backward



On Jul 3, 11:14pm, Felix Rosencrantz wrote:
}
} I actually thought my h-i-s-b was still in the history
} search, it sort of looked like it from the trace output....

Unfortunately, all it manages to do is abort the search.  Really, even
when you name the widget history-incremental-search-backward, it's not
calling your widget after the first time ... it's calling the internal
one, until you break out of repeating the same search and start again.

} Though it would also be useful if there was a parameter that explicitly
} says you are in the mini-buffer (or whatever the mode is).

Unfortunately there really is no mini-buffer.  Each of the commands that
uses a "mini-buffer" implements it (and key reading for it) separately.

This could get worked on, though, now that we actually do have multiple
keymaps.

} So is there anyway to history-incremental-search-backward (and related
} commands to show a list of matching commands.  Sort of like the w2k "F7"
} key in a cmd.exe window.)

Not without interrupting the search.  But one could write a completion
function that would do it; just search the $history hash:

	compadd - "$history[(R)$BUFFER]"

or something like that.

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

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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