From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22865 invoked by alias); 14 Apr 2015 01:31:07 -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: 20164 Received: (qmail 6517 invoked from network); 14 Apr 2015 01:31:04 -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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.2 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@zsh.org From: Jan Larres Subject: Re: Matching anywhere in a full path Date: Tue, 14 Apr 2015 13:30:44 +1200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: yass.opencloud.co.nz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 In-Reply-To: On 14/04/15 08:06, Jesper Nygårds wrote: > Here's what I don't know how to solve: I would like to type some string on > the command line, and I want to have that string working as a filter for > the suggestions, matching anywhere in the path. Say I have "/etc/foo", > "/etc/bar" and /etc/baz/foo.txt", and I type "ls foo <\ee>", I only want > "/etc/foo" and "/etc/baz/foo.txt" to be suggested. In other words, I want > the completion to match against the string anywhere in the full path. I'm not sure completion is the best way to handle this. I would recommend something like fzf instead: https://github.com/junegunn/fzf -Jan