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

feat: add option to update all plugins at once #123

Closed
wants to merge 0 commits into from
Closed

feat: add option to update all plugins at once #123

wants to merge 0 commits into from

Conversation

LoneExile
Copy link
Contributor

Hi there,

With this change, users can now run zap update -a to update all installed plugins.

I hope you find this feature helpful! As a personal anecdote, I often use an alias that updates everything on my machine, including brew and zap. This change to zap will make it even easier to update all my plugins without having to interrupt the process by typing a key.

Thanks for considering my pull request!

Copy link
Member

@mamaraddio mamaraddio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @LoneExile, thanks for your pull request.

Please merge zap:master into your branch to align the current state of Zap (there where some changes in last days).

In addition, to simplify and stay close to the actual "Zap style" please adopt the following approach:

Instead of lines 79-83 (if [[ "$1" == "-a" ...), please make the same with:

    [[ $1 = "self" ]] && { _pull $ZAP_DIR; return }
    [[ $1 = "all" ]] && { for _plug in ${ZAP_INSTALLED_PLUGINS[@]}; do _pull "$ZAP_PLUGIN_DIR/$_plug"; done; return }

If you are interested take a look at this

@LoneExile LoneExile closed this May 3, 2023
LoneExile added a commit to LoneExile/zap that referenced this pull request May 3, 2023
mamaraddio pushed a commit that referenced this pull request May 4, 2023
* feat(update): add flag (-a, --all) #123

* refactor: format code to "Zap style"

* feat(update): add options all, self to update

* feat(update): update usage zap_help

* refactor: rm return value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants