zsh-users
 help / color / mirror / code / Atom feed
From: Silas Silva <silasdb@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>, zsh-users@zsh.org
Subject: Re: Playing with list-expand + complete-word
Date: Mon, 21 Jul 2014 11:38:45 -0300	[thread overview]
Message-ID: <20140721143845.GA26646@auron.ufabc.int.br> (raw)
In-Reply-To: <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


      reply	other threads:[~2014-07-21 14:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-19  5:22 Silas Silva
2014-07-20  1:21 ` Bart Schaefer
2014-07-20 14:49   ` Silas Silva
2014-07-20 17:02     ` Bart Schaefer
2014-07-21 13:40       ` Silas Silva
2014-07-21 14:38         ` Silas Silva [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140721143845.GA26646@auron.ufabc.int.br \
    --to=silasdb@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).