* PATCH: zle-history-line-set hook
@ 2011-02-18 22:29 Peter Stephenson
0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 2011-02-18 22:29 UTC (permalink / raw)
To: Zsh hackers list
This is a good place to be able to do highlighting.
Index: Doc/Zsh/zle.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/zle.yo,v
retrieving revision 1.91
diff -p -u -r1.91 zle.yo
--- Doc/Zsh/zle.yo 18 Feb 2011 22:08:45 -0000 1.91
+++ Doc/Zsh/zle.yo 18 Feb 2011 22:29:04 -0000
@@ -923,6 +923,10 @@ item(tt(zle-line-finish))(
This is similar to tt(zle-line-init) but is executed every time the
line editor has finished reading a line of input.
)
+tindex(zle-history-line-set)
+item(tt(zle-history-line-set))(
+Executed when the history line changes.
+)
tindex(zle-keymap-select)
item(tt(zle-keymap-select))(
Executed every time the keymap changes, i.e. the special parameter
Index: Src/Zle/zle_hist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_hist.c,v
retrieving revision 1.67
diff -p -u -r1.67 zle_hist.c
--- Src/Zle/zle_hist.c 12 Dec 2010 22:44:51 -0000 1.67
+++ Src/Zle/zle_hist.c 18 Feb 2011 22:29:04 -0000
@@ -765,6 +765,7 @@ zle_setline(Histent he)
histline = he->histnum;
setline(GETZLETEXT(he), ZSL_COPY|ZSL_TOEND);
+ zlecallhook("zle-history-line-set", NULL);
setlastline();
clearlist = 1;
if (remetafy)
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-18 22:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-18 22:29 PATCH: zle-history-line-set hook Peter Stephenson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).