#!/usr/bin/env fish function pull-vim-plugin -d 'Updates all vim plugins in the current directory' cd $argv[1] for plugin in ./* cd $plugin echo "Updating $plugin" git stash git pull -f set res $status if test $res != 0; and test $res != 128 echo "error $res in $PWD" exit 1 end if test -d doc echo "generating tags for $PWD" vim --cmd "helptags doc/" --cmd "q" end cd .. end cd .. end function update-vim-plugins -d 'Updates all vim plugins' cd ~/.vim/pack for folder in ./* cd $folder test -d start; and pull-vim-plugin start test -d opt; and pull-vim-plugin opt cd .. end end ## EOF