Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/xgarrido/antigen
Browse files Browse the repository at this point in the history
  • Loading branch information
sharat87 committed Feb 21, 2013
2 parents 66c9657 + a6d4689 commit 96f9ef5
Showing 1 changed file with 28 additions and 15 deletions.
43 changes: 28 additions & 15 deletions antigen.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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>=/]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 96f9ef5

Please sign in to comment.