From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11119 invoked by alias); 22 Jul 2015 20:56:32 -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: 35860 Received: (qmail 27875 invoked from network); 22 Jul 2015 20:56:30 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=wPlZuW2x0ysrwwmCl/4kvnudUzKk+wSOItCOHlr35rY=; b=Zhn66dZCTlVwWJfaLzbeSz1sbFrx12tHgc+A1GmCN75dGCL26WOFkXVvyLib78xaeF g9Lt0ccs8FCSUdndtvXFNKZ9c0Ug+04Z9/yUc7G70WXDefxL3adEjDBo4sK5clZLUY8R A6MI+AbJaPjO7vbb1NcwzIxRfAHy7Sqq/QTQtdWoC+JUYIaLUzJaIvLqltEBKfeJnqdc 0lQFf9vLeXWUBCiQVJO0lWS72y0yC/Q1GcLaNizAj0wYiKBDBw+Bjy+96S1bSoH4pREb pZEwWtuVizR/y8pWKIICeyZ15/u7XM2zqoJ7E3YhWMlJ2OzWH7OQy0xyqTwe3FLcw7ej oktA== X-Gm-Message-State: ALoCoQkCJ5Z9S/LlNjo9cb+cpcS0OgHoSR/OEysi0gujyE8ziOeKYhMzTQshtsr13sEamlkpw8Cb X-Received: by 10.182.240.135 with SMTP id wa7mr4689821obc.63.1437598589747; Wed, 22 Jul 2015 13:56:29 -0700 (PDT) From: Bart Schaefer Message-Id: <150722135625.ZM32504@torch.brasslantern.com> Date: Wed, 22 Jul 2015 13:56:25 -0700 In-Reply-To: Comments: In reply to Sridhar Sarnobat "Bug: history-search-backward ignores search text after first space character?" (Jul 22, 12:56pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Bug: history-search-backward ignores search text after first space character? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 22, 12:56pm, Sridhar Sarnobat wrote: } } # try to autocomplete based on the history. I want "git checkout -" to } be filled in, but instead "git status" is filled in. } git c } git status } } Notice the space and c that I typed in are ignored in the autocomplete. Read the doc: history-search-backward (ESC-P ESC-p) (unbound) (unbound) Search backward in the history for a line beginning with the first word in the buffer. Note that only the first word is used for that widget. } I assume this is some shortcoming of the zsh completion system. Is this } true? Or am I misunderstanding the functionality? History search has nothing to do with completion (though completion might search the history), so yes, you're misunderstanding. What you want in the example shown is history-beginning-search-backward, which is not bound by default. Add zle -A history-beginning-search-backward history-search-backward zle -A history-beginning-search-forward history-search-forward to your .zshrc (there are other ways to accomplish the same thing if you still want to be able to use the original history-search-backward and -forward widgets).