Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: correct paths by prefixing them with '.'
- X-seq: zsh-users 13843
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: correct paths by prefixing them with '.'
- Date: Fri, 13 Feb 2009 08:40:02 -0800
- In-reply-to: <20090213130228.GA32696@zoidberg>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20090213130228.GA32696@zoidberg>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author