From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3796 invoked by alias); 23 Jan 2015 20:10:40 -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: 19777 Received: (qmail 11383 invoked from network); 23 Jan 2015 20:10:38 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Originating-IP: [86.6.153.127] X-Spam: 0 X-Authority: v=2.1 cv=S8BXwecP c=1 sm=1 tr=0 a=39NrsSuza2clQiZR/7fYWQ==:117 a=39NrsSuza2clQiZR/7fYWQ==:17 a=kj9zAlcOel0A:10 a=NLZqzBF-AAAA:8 a=pigsUL7ae2ATbnx9yU8A:9 a=CjuIK1q_8ugA:10 Date: Fri, 23 Jan 2015 20:10:34 +0000 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: show timestamp during history search ? Message-ID: <20150123201034.19c2e108@ntlworld.com> In-Reply-To: <20150123190549.GA16712@spiegl.de> References: <20150123190549.GA16712@spiegl.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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. pws