Permalink
Browse files

Merge branch 'master' of https://github.com/xgarrido/antigen

  • Loading branch information...
2 parents 66c9657 + a6d4689 commit 96f9ef54739841b53300624e7caa7fbc5b1d4519 @sharat87 sharat87 committed Feb 21, 2013
Showing with 28 additions and 15 deletions.
  1. +28 −15 antigen.zsh
View
@@ -5,6 +5,7 @@
# <repo-url>, <plugin-location>, <bundle-type>, <has-local-clone>
# FIXME: Is not kept local by zsh!
local _ANTIGEN_BUNDLE_RECORD=""
+local _ANTIGEN_INSTALL_DIR="$(dirname $0)"
# Syntaxes
# antigen-bundle <url> [<loc>=/]
@@ -209,12 +210,10 @@ antigen-revert () {
# Save current revision.
local old_rev="$(--plugin-git rev-parse HEAD)"
# Pull changes if update requested.
- --plugin-git pull
+ (cd "$clone_dir" && git --no-pager pull)
+ #--plugin-git pull
# Update submodules.
- pushd
- cd "$clone_dir"
- git submodule update --recursive
- popd
+ (cd "$clone_dir" && git submodule update --recursive)
# Get the new revision.
local new_rev="$(--plugin-git rev-parse HEAD)"
fi
@@ -295,6 +294,19 @@ antigen-revert () {
}
+antigen-selfupdate () {
+ # Initiate subshell
+ (
+ cd $_ANTIGEN_INSTALL_DIR
+ # Sanity checks
+ if [ ! -d .git ]; then
+ echo "antigen is not under git CVS"
+ return 1
+ fi
+ git pull
+ )
+}
+
antigen-cleanup () {
# Cleanup unused repositories.
@@ -645,16 +657,17 @@ antigen () {
# Setup antigen's autocompletion
_antigen () {
- compadd \
- bundle\
- bundles\
- update\
- revert\
- list\
- cleanup\
- lib\
- theme\
- apply\
+ compadd \
+ bundle \
+ bundles \
+ update \
+ revert \
+ list \
+ cleanup \
+ lib \
+ selfupdate \
+ theme \
+ apply \
help
}

0 comments on commit 96f9ef5

Please sign in to comment.