diff options
| author | slavaGanzin <slava.ganzin@gmail.com> | 2016-09-29 19:05:49 +0300 | 
|---|---|---|
| committer | slavaGanzin <slava.ganzin@gmail.com> | 2016-10-04 21:34:29 +0300 | 
| commit | a1200f5bccd7c0ebe327ccbc554d56247136d48c (patch) | |
| tree | 7c57d7856a8a13a1e2537f325f2be12844b2417b /plugins/git-auto-fetch | |
| parent | 57fcee0f1c520a7c5e3aa5e2bde974154cdaf0c3 (diff) | |
| download | zsh-a1200f5bccd7c0ebe327ccbc554d56247136d48c.tar.gz zsh-a1200f5bccd7c0ebe327ccbc554d56247136d48c.tar.bz2 zsh-a1200f5bccd7c0ebe327ccbc554d56247136d48c.zip | |
git auto fetch on change directory
Diffstat (limited to 'plugins/git-auto-fetch')
| -rw-r--r-- | plugins/git-auto-fetch/git-auto-fetch.plugin.zsh | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/plugins/git-auto-fetch/git-auto-fetch.plugin.zsh b/plugins/git-auto-fetch/git-auto-fetch.plugin.zsh new file mode 100644 index 000000000..841f47baf --- /dev/null +++ b/plugins/git-auto-fetch/git-auto-fetch.plugin.zsh @@ -0,0 +1,5 @@ +function git_fetch_on_chpwd { +  ([[ -d .git ]] && git fetch --all >! ./.git/FETCH_LOG &) +} +chpwd_functions=(${chpwd_functions[@]} "git_fetch_on_chpwd") +unset git_fetch_on_cpwd | 
