-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Merge comp into plug #18
Merged
ChristianChiarulli
merged 10 commits into
zap-zsh:master
from
Granddave:merge-comp-into-plug
Nov 11, 2022
Merged
Merge comp into plug #18
ChristianChiarulli
merged 10 commits into
zap-zsh:master
from
Granddave:merge-comp-into-plug
Nov 11, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since this function is meant to be used locally we can prefix it with underscore to hint that this function shouldn't be used externally. Also the function doesn't return any status value which makes the `||` unnecessary and since we check that the file exist before sourcing it's not a problem to `_try_source` a non-existing file.
Once the plugin is downloaded the plug emoji will be replaced with a lightning bolt. :^)
I don't think we even need the completion part tbh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #17
I tried to merge the two functions but am not sure that
zapcomp
really worked before.There are two
fpath+=
but I guess that only one is needed? I.e. this one:fpath+=$("$completion_file_path")
, and scrapfpath+="$(dirname "$plugin_dir")"
..?I am also not sure that this kind of variable operation
${completion_file:1}
is valid POSIX, so changing#!/bin/sh
to#!/bin/zsh
(or just remove the shebang since it's not supposed to be run anyway) would be better.Also, updated the way download progress is shown. Now the plug is shown during the download and when it's finished the icon will change to the lightning bolt :)