zsh-users
 help / color / mirror / code / Atom feed
* how to make zsh tab-complete $path after dot?
@ 2019-12-06 19:45 Timothee Cour
  2019-12-09 14:46 ` Oliver Kiddle
  0 siblings, 1 reply; 2+ messages in thread
From: Timothee Cour @ 2019-12-06 19:45 UTC (permalink / raw)
  To: Zsh Users

ls $nim_devel_X.*
/Users/timothee/git_clone//nim//Nim_devel//bin/nim.bak1
/Users/timothee/git_clone//nim//Nim_devel//bin/nim.bak2

echo $nim_devel_X.<TAB>
nothing gets completed

expected outcome:
would suggest filename completions:
$nim_devel_X.bak1
$nim_devel_X.bak2

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: how to make zsh tab-complete $path after dot?
  2019-12-06 19:45 how to make zsh tab-complete $path after dot? Timothee Cour
@ 2019-12-09 14:46 ` Oliver Kiddle
  0 siblings, 0 replies; 2+ messages in thread
From: Oliver Kiddle @ 2019-12-09 14:46 UTC (permalink / raw)
  To: Timothee Cour; +Cc: Zsh Users

On 6 Dec, Timothee Cour wrote:
> echo $nim_devel_X.<TAB>
> nothing gets completed

That depends on your setup. A default setup will expand to both
possibilities.

> expected outcome:
> would suggest filename completions:
> $nim_devel_X.bak1
> $nim_devel_X.bak2

For that you would want to enable the _match completer. Completers are
configured through the completer style, e.g.:
  zstyle ':completion:*::::' completer _match _complete

By default tab is bound to expand-or-complete which does some basic
expansion of things like globs. So you may need to redefine it to just
complete-word:
  bindkey "^I" complete-word

There's also an _expand completer which does expansion but where details
of how it works can be configured. For either of _match or _expand you
almost certainly want go through the documentation and configure the
relevant styles.

Oliver

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-09 14:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06 19:45 how to make zsh tab-complete $path after dot? Timothee Cour
2019-12-09 14:46 ` Oliver Kiddle

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).