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 :)


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.


 - Valodim

Attachment: signature.asc
Description: Digital signature

vcs-home mailing list

Reply via email to