From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23000 invoked by alias); 27 Jan 2015 20:51:55 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19785 Received: (qmail 5029 invoked from network); 27 Jan 2015 20:51:42 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_PCNT autolearn=no version=3.3.2 Date: Tue, 27 Jan 2015 21:42:29 +0100 From: Vincent Lefevre To: zsh-users@zsh.org Subject: Re: show timestamp during history search ? Message-ID: <20150127204229.GA9814@xvii.vinc17.org> Mail-Followup-To: zsh-users@zsh.org References: <20150123190549.GA16712@spiegl.de> <20150123201034.19c2e108@ntlworld.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150123201034.19c2e108@ntlworld.com> X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.23-6405-vl-r76280 (2015-01-27) On 2015-01-23 20:10:34 +0000, Peter Stephenson wrote: > On Fri, 23 Jan 2015 20:05:49 +0100 > Andy Spiegl 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. For long commands (i.e. which take several physical lines), some lines are not cleared when typing ^U (kill-whole-line). -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)