Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: dynamic globbing for cdpath?
- X-seq: zsh-users 13383
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Re: dynamic globbing for cdpath?
- Date: Wed, 22 Oct 2008 20:07:26 -0700
- In-reply-to: <2B9B10D6-AAED-44B3-AC90-F3EE210A9083@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <2B9B10D6-AAED-44B3-AC90-F3EE210A9083@xxxxxxx>
On Oct 22, 12:24pm, Eric D. Friedman wrote:
}
} Is it possible to have an entry in cdpath that contains a shell
} globbing pattern that gets reevaulated when I press cd <TAB> ?
You're really asking two almost-unrelated questions here.
The cdpath value might be used by completion, but where it really
matters is when you type "cd somewhere<RETURN>" without completing
first. No, it's not possible to introduce a glob into that.
What's your objection to resetting cdpath? You could do it in your
precmd function, for example, so you never have to notice it.
As for the completion-related part of your question, you can use
the fake-files style. Although the name of the style implies that
the files might not really be there, you can populate the value
with actual files if you want to. Start with something like this:
zstyle -e ':completion:*' fake-files \
'reply=($HOME/*/branches); reply=(:"${(@)reply#$HOME/}")'
Then tweak to suit your preferred behavior.
--
Messages sorted by:
Reverse Date,
Date,
Thread,
Author