zsh-users
 help / color / 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, back to index

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

zsh-users

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-users

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git