Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Playing with list-expand + complete-word
- X-seq: zsh-users 18983
- From: Silas Silva <silasdb@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, zsh-users@xxxxxxx
- Subject: Re: Playing with list-expand + complete-word
- Date: Mon, 21 Jul 2014 11:38:45 -0300
- 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==
- In-reply-to: <20140721134040.GA2480@auron.ufabc.int.br>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- 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>
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*<Tab>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author