From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14356 invoked by alias); 27 Jan 2012 07:51:34 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30129 Received: (qmail 29336 invoked from network); 27 Jan 2012 07:51:23 -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 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <120126235114.ZM2826@torch.brasslantern.com> Date: Thu, 26 Jan 2012 23:51:14 -0800 In-reply-to: Comments: In reply to Bernhard Tittelbach "Question about _history-complete-older" (Jan 26, 8:10pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Question about _history-complete-older MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jan 26, 8:10pm, Bernhard Tittelbach wrote: } } In my zsh version 4.3.11, _history-complete-newer completes a word from } the history, beginning with the oldest words in the history, } while _history-complete-older completes a word from history starting } with the most recent entries. That's because they wrap around if they don't find anything. So if you do "newer" starting from the end, it will immediately find nothing and then wrap to the beginning and start from there; similarly "older" from the end (most recent) will work backward from there. Thus "newer" and "older" are relative to the entry on which you start searching, not relative to each other; they refer to the direction of the search, not to the recency of the entries they find. If you don't want it to wrap around, you set the "stop" style: stop If set to `true', the _history_complete_word bindable command will stop once when reaching the beginning or end of the history. Invoking _history_complete_word will then wrap around to the opposite end of the history. If this style is set to `false' (the default), _history_complete_word will loop immediately as in a menu completion. There ought to be an example for this, but there isn't, so: zstyle :completion:*:history-words stop yes Also the I see the description for the "list" style is incorrect; it says: The context always starts with `:completion:history-words'. In fact the context always starts with :completion: and always ENDS with :history-words, but there may be more context in between.