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

Re: show timestamp during history search ?



On Fri, 23 Jan 2015 20:05:49 +0100
Andy Spiegl <zsh.Andy@xxxxxxxxx> wrote:
> Hi, just had an idea:  I'd consider it really useful while searching
> backwards through the shell history to see the time when this command
> was actually run.  I've got EXTENDED_HISTORY set, of course. :-)
> Unfortunately I am clueless on how to implement this feature.
> Maybe some kind of function bound to ctrl-r ?

zle-isearch-update() { zle -M "$(history -i $HISTNO $HISTNO)"; } 
zle-isearch-exit() { zle -M ''; }
zle -N zle-isearch-update
zle -N zle-isearch-exit


Bit annoying, I was hoping for something more complicated.  Can probably
be enhanced.

pws



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