-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
zimfw 1.17.0 (new formula) #204464
Open
ericbn
wants to merge
1
commit into
Homebrew:master
Choose a base branch
from
ericbn:zimfw
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+44
−0
Open
zimfw 1.17.0 (new formula) #204464
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
class Zimfw < Formula | ||
desc "Zsh plugin manager" | ||
homepage "https://zimfw.sh" | ||
url "https://github.com/zimfw/zimfw/releases/download/v1.17.0/zimfw.zsh.gz" | ||
sha256 "31fa45e3f2d486d2f51de190b32280c0b4adad0b26673b8aac63ddf371eefd78" | ||
license "MIT" | ||
|
||
uses_from_macos "zsh" => :test | ||
|
||
resource "zimrc" do | ||
url "https://raw.githubusercontent.com/zimfw/install/f56ab9c93c8ebc906901001b4a672edc3cb643b2/src/templates/zimrc" | ||
sha256 "3ab3f9563828a5f26ef012b480ff0ba84b7244aa81551c178388890e294ba6ca" | ||
end | ||
|
||
def install | ||
share.install "zimfw.zsh" | ||
resource("zimrc").stage do | ||
(share/"examples").install "zimrc" | ||
end | ||
end | ||
|
||
def caveats | ||
<<~EOS | ||
Get started with a sample configuration file: | ||
|
||
cp -n #{opt_share}/examples/zimrc ${ZDOTDIR:-${HOME}}/.zimrc | ||
|
||
Add the following to your .zshrc: | ||
|
||
ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim | ||
# Install missing modules, and update ${ZIM_HOME}/init.zsh if missing or outdated. | ||
if [[ ! ${ZIM_HOME}/init.zsh -nt ${ZIM_CONFIG_FILE:-${ZDOTDIR:-${HOME}}/.zimrc} ]]; then | ||
source #{opt_share}/zimfw.zsh init -q | ||
fi | ||
# Initialize modules. | ||
source ${ZIM_HOME}/init.zsh | ||
EOS | ||
end | ||
|
||
test do | ||
assert_match version.to_s, | ||
shell_output("zsh -c 'source #{share}/zimfw.zsh version'") | ||
end | ||
end |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only the opt_share locations seem specific to Homebrew right? Maybe we can shorten this to:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @SMillerDev. I wanted to keep the instructions for a quick but complete setup. The snippet for the .zshrc file is unfortunately that long. I also like how the current instructions say the configuration must go specifically to
${ZDOTDIR:-${HOME}}/.zimrc
, and the installation is useless without a configuration file.Or maybe I should add the installation details to our own documentation in the zimfw repository and then the caveats here could look like just:
And we can even remove the example configuration if the idea is to keep the instructions here to a minimum.
Let me know the preferred direction. Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The caveats are really only for instructions that are specific to the Homebrew install. The location of the files is specific, if you have documentation for the other parts I don't think they should be in the caveat.