From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25770 invoked by alias); 21 Jul 2014 14:38:10 -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: 18983 Received: (qmail 22125 invoked from network); 21 Jul 2014 14:37:57 -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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=+XkUQGv+kEzELN5FQPeweJSbWKzNbnsZsuMGsHAxhNw=; b=qhjJvTP3delATaRZo/BbEhZzkhm3qH3oyIff/RG80B7RI6b52VZAN5dOTpcW43Lrxh SgOUJPGO5QTV+mSKa1xF++mLg4PId7P4Vi0sFYXCOKusV9cb0M/c1VCouRRFqREeuDW9 PCX5joS2pLCajPiMKM2UBBoGJ/RCEvrNx88XumAJm0h0/sf7L42blN1qBbJoT12w+2eR VXydgi/De8b571Ibq6/Cx2lXQ/q6iJKA7UuOcm3ttgcddeFqefwLbbprO3WdexUkSnNj 25Y5CKfl4sb9eAF0cLUEebhYysVr+Cgcvvj8PuR7qKWLiRk3ocCz6zycEhNBiN9ljRYg eq6g== X-Received: by 10.236.203.33 with SMTP id e21mr41315415yho.92.1405953472202; Mon, 21 Jul 2014 07:37:52 -0700 (PDT) Date: Mon, 21 Jul 2014 11:38:45 -0300 From: Silas Silva To: Bart Schaefer , zsh-users@zsh.org Subject: Re: Playing with list-expand + complete-word Message-ID: <20140721143845.GA26646@auron.ufabc.int.br> Mail-Followup-To: Bart Schaefer , zsh-users@zsh.org References: <20140719052223.GA21109@auron.ufabc.int.br> <140719182113.ZM13840@torch.brasslantern.com> <20140720144907.GA20398@rikku> <140720100238.ZM20179@torch.brasslantern.com> <20140721134040.GA2480@auron.ufabc.int.br> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140721134040.GA2480@auron.ufabc.int.br> User-Agent: Mutt/1.5.21 (2010-09-15) On Mon, Jul 21, 2014 at 10:40:40AM -0300, Silas Silva wrote: > On Sun, Jul 20, 2014 at 10:02:38AM -0700, Bart Schaefer wrote: > > See what you think of > > > > bindkey $'\t' complete-word > > zstyle ':completion:*' completer _complete _match _expand > > zstyle ':completion:*:match:*' insert-unambiguous pattern > (...) > > The only difference is that, if I press tab twice, then glob is replaced > by the first entry, and so on as I press tab again (which is better than > I got) :-) > > Is there any advantage on using complete-word and configuring it with > styles than doing what I did? (creating a new widget that calls > list-choices, complete-word and list-expand)? Actually your way is much better, for instance, think in the following example: $ cd /foo/bar/*x* My widget would just print all possible expansions, no matter if entries are directories or files. In your way, it sees the context is "cd" and prints only directories. I'm going to study styles further and check how can it be improved. Thank you again! :-) -- Silas Silva