* correct paths by prefixing them with '.'
@ 2009-02-13 13:02 kba
2009-02-13 16:40 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: kba @ 2009-02-13 13:02 UTC (permalink / raw)
To: zsh-users
hi
When I'm in $HOME, enter 'cd vim<tab>', can zsh correct that path to '.vim'? If so, how do
I enable it?
Thanks
kba
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: correct paths by prefixing them with '.'
2009-02-13 13:02 correct paths by prefixing them with '.' kba
@ 2009-02-13 16:40 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2009-02-13 16:40 UTC (permalink / raw)
To: zsh-users
On Feb 13, 2:02pm, kba wrote:
}
} When I'm in $HOME, enter 'cd vim<tab>', can zsh correct that path to
} '.vim'? If so, how do I enable it?
The simplest way is to find the place in your ~/.z* startup files where
the completion system is loaded, which should look something like this:
autoload -U compinit
compinit
and then below that add the line
_comp_options+=(globdots)
If that has undesired side-effects for other completions, then there's
a hack that might work:
zstyle -e ':completion::complete:cd::paths' expand 'setopt globdots'
If you already have a setting for the "expand" style in that context
(for example, it might be "prefix" like so:
zstyle ':completion::complete:cd::paths' expand prefix
or it might be "suffix") then change the above to store the current
setting into the REPLY variable, like this:
zstyle -e ':completion::complete:cd::paths' expand \
'setopt globdots; REPLY=prefix'
Note the difference in those zstyle commands with respect to teh -e
option.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-13 16:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-13 13:02 correct paths by prefixing them with '.' kba
2009-02-13 16:40 ` Bart Schaefer
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).