Last active
August 29, 2015 14:11
-
-
Save yock/e3f16147f5172a2e349f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vundle_outdated() { | |
local -a outdated | |
for plugin in `find ~/.vim/bundle -maxdepth 1 -d 1`; | |
do | |
cd $plugin; | |
current=`git status | grep -c "Your branch is up-to-date with"`; | |
if [[ current -eq 0 ]] { | |
outdated+=$plugin; | |
} | |
cd ..; | |
done | |
if [[ ${#outdated} -gt 0 ]] { | |
echo $outdated | |
} | |
} | |
vundle_alert_if_outdated() { | |
local outdated | |
outdated=vundle_outdated | |
if ! [[ -n $outdated ]] { | |
echo "You have outdated packages in Vim. Run 'vundle-update to get current." | |
} | |
} | |
alias vundle-update="vim +PluginUpdate +qall" | |
vundle_alert_if_outdated |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment