Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

dynamic globbing for cdpath?



Is it possible to have an entry in cdpath that contains a shell
globbing pattern that gets reevaulated when I press cd <TAB> ?

Suppose that I have this structure

mkdir -p $HOME/{foo,bar,baz}/branches/

Under those branch directories, there are several distinct subdirs

I'd like to have the branches dirs on my cdpath so that I can cd into
any of the subdirs.

cdpath=($HOME/*/branches)

The issue is that "foo,bar,baz" might grow/shrink to contain new
entries and I'd rather not have to reset cdpath to re-glob.

Is there something I can put into cdpath that will get reevaluated
when I do a cd <TAB>?

Messages sorted by: Reverse Date, Date, Thread, Author