I wrote a script a while ago which uses information from zsh's vcs_info to maintain the root of a repository in the cdpath as long as you're in the dir. Works with any vcs supported by vcs_info.
If you are not familiar with cdpath, it's an array in zsh which allows specifying more paths for cd to look in for candidates to change the working directory to. And since it's a built-in thing, you get integration with cd and completion for free :) https://github.com/Valodim/zshrc/blob/master/modules/96-vcs_info-cdpath.zsh This requires a prompt which calls vcs_info, since it is implemented as a hook. The script should be self-contained and work by just sourcing it. If you can't get it to work, setting this style zstyle ':vcs_info:*' debug true might help to check if the hook is called properly. Cheers, - Valodim
Description: Digital signature
_______________________________________________ vcs-home mailing list firstname.lastname@example.org http://lists.madduck.net/listinfo/vcs-home