Zsh Mailing List Archive
Messages sorted by:
Re: Playing with list-expand + complete-word
- X-seq: zsh-users 18971
- From: Silas Silva <silasdb@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Playing with list-expand + complete-word
- Date: Sun, 20 Jul 2014 11:49:43 -0300
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=DjeYprw0f2ICPD7pYUElgRSC8NuqB5Y/xEKLqR+/m0w=; b=Gf6G+1J03op6PbwaiHRtuRv59NZjMVW0AKQCy9tY8KkqL9Lzev5IZWnk1EdZXww3cn qGAVkwYTnkkRocBX0XdCalHgdcYmXrg/tjahi7huwSqIuCKoPr70/6sL1r37ZeQ0Oh2L 8nkicuj+1O1xQILSOR5XfikiXw7McSPM8UZR2OjXDJhmwe5LoIGhEI2zLDa9LYH/hQZc wZwKvZAz5RIUiY/KW05YL+wrWAV8Wtpp3A1G1i325c20luga6Jh/bZ2Z+X6FxQvY3epr DtQpUlQ2xx889PPArUSdAP7FIQqVTaaJ32pLx9AQ+W60IXcTi8pwTZENT2aoYsoZhELg vqhA==
- In-reply-to: <140719182113.ZM13840@torch.brasslantern.com>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:email@example.com>
- 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>
Hi there Bart and guys! Thank you for the answer. Here we go!
> Whether or not you've run compinit,
> bindkey $'\t' complete-word
> setopt glob_complete
> will probably get you very close to the behavior you want. How it works
> out in combination with the zstyle settings you've experimented with, I
> can't say.
> Equivalently (if you *have* run compinit), you should be able to add
> _match to your list of completers, e.g.
> zstyle ':completion:*' completer _complete _match
> If glob_complete doesn't seem to be what you want ...
Both setopt glob_complete and using zstyle mechanism have the same
effect. It is near of what I need, but it still expand the glob to the
first entry of the matching list, instead of listing the glob expansions
(what list-expand would do) and let the original glob intact.
> What you probably want there is
> zle list-choices || zle list-expand || zle complete-word
It works really great, with the exception that it never completes
(probably complete-word) is never called. I took your suggestion and
switched them to:
zle complete-word || zle list-choices || zle list-expand
Which really seems what I want (still testing). Thank you! :-)
> You've just described the behavior of the _expand completer when the
> "suffix" zstyle is true (the default). What's the current value of
> your "completer" zstyle?
I also tried setting tab to complete-word and changing zstyle to:
zstyle ':completion:*' completer _expand _complete
It listed options but still cycled through them (replacing glob, which I
doesn't want). So I did:
zstyle ':completion::expand:*' tag-order original -
It didn't replace the glob, but obviously disabled listing.
Creating the new widget that calls different completers seem to be the
best solution for this, but I'm still testing it.
Thank you very much!
Messages sorted by: