How can I selectively disable zsh's version control integration when my CWD is on a remote filesystem?
Solution 1:
Have a look at Version-Control-Information
Search for the section on 'disable-patterns' (roughly 20% down the page).
Assuming your remote mounts are fixed, or relatively fixed, i.e. /mnt/remote/*
or you can list them all, you should be able to come up with a regex for them.
The example at the link is disabling vcs_info
under ~/.zsh/
, via:
zstyle ':vcs_info:*' disable-patterns "$HOME/.zsh(|/*)"
I guess you could make the zshrc or equivalent (sorry - bash user) figure out which are remote at startup (or periodically, or ...) and update the zstyle
accordingly.