Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change update all to update self plugins #152

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions zap.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,17 @@ function _zap_update() {

local _plugin _plug _status

[[ $1 = "self" ]] && { _pull $ZAP_DIR; return }
[[ $1 == "all" ]] && { echo "\nUpdating All Plugins\n"; for _plug in ${ZAP_INSTALLED_PLUGINS[@]}; do _pull "$ZAP_PLUGIN_DIR/$_plug"; done; return }
[[ $1 == "all" || $1 == "self" ]] && {
_pull $ZAP_DIR
[[ $1 == "self" ]] && return
}
[[ $1 == "all" || $1 == "plugins" ]] && {
echo "\nUpdating All Plugins\n"
for _plug in ${ZAP_INSTALLED_PLUGINS[@]}; do
_pull "$ZAP_PLUGIN_DIR/$_plug"
done
return
}

function _check() {
git -C "$1" remote update &> /dev/null
Expand Down Expand Up @@ -130,8 +139,9 @@ COMMANDS:
version Show version information

OPTIONS:
update self Update Zap itself
update all Update all plugins"
update self Update Zap itself
update plugins Update all plugins
update all Update Zap and all plugins"
}

function _zap_version() {
Expand Down