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

add homebrew for installation #29

Closed
mmathys opened this issue Jul 15, 2022 · 12 comments · Fixed by #49
Closed

add homebrew for installation #29

mmathys opened this issue Jul 15, 2022 · 12 comments · Fixed by #49

Comments

@mmathys
Copy link

mmathys commented Jul 15, 2022

No description provided.

@mgunyho
Copy link
Owner

mgunyho commented Jul 15, 2022

Hi! Thanks for the suggestion. Do you mean homebrew for mac or homebrew for linux? I have zero experience with either, so it might be a while until I get around to doing this, but PRs are welcome!

@mmathys
Copy link
Author

mmathys commented Jul 15, 2022

For mac. I also don't have experience how to add a homebrew package

@superatomic
Copy link
Contributor

I have experience with adding packages to Homebrew and I would be happy to add tere to Homebrew.

Just so you know, Homebrew for Mac and Linux are the same thing: tere can be added to both in one go.

@superatomic
Copy link
Contributor

superatomic commented Jul 18, 2022

@mgunyho I started working on a Homebrew formula for tere, but it looks like adding the wrappers for the different shells is going to be tricky. Homebrew formula (rightfully) shouldn't modify shell configurations, so the installer should inform the user to do so via a caveats section.

I can make specifically tailor the wrappers listed in the README to work with Homebrew, but I'd like to know if you think that these wrappers have any chance of changing in the future (for example, #9 might break all old wrappers), as the formula will have to be manually updated if that happens.

Other than this bit, I have completed the formula for tere, and I can submit a pull request to homebrew/core once this problem is resolved.

@davinkevin
Copy link

Homebrew formula (rightfully) shouldn't modify shell configurations, so the installer should inform the user to do so via a caveats section.

One common solution is to add intere files to create for each shell, so as a user, you just have to tere install completions > /path/to/file (this is an example) to generate the file.

@davinkevin
Copy link

+1 for tere available from brew, and especially for MacOS if possible. Installation of cargo just to compile it is not something I like to do in my computer 😇

@superatomic
Copy link
Contributor

Homebrew formula (rightfully) shouldn't modify shell configurations, so the installer should inform the user to do so via a caveats section.

One common solution is to add intere files to create for each shell, so as a user, you just have to tere install completions > /path/to/file (this is an example) to generate the file.

That's a great idea! I've seen projects like starship do things this way and it works really well.

I would be willing to implement this feature myself and submit a pull request. @mgunyho do you support using this method of adding the shell wrappers?

@superatomic
Copy link
Contributor

superatomic commented Jul 21, 2022

It's probably worth splitting the "add a subcommand for printing shell wrappers" idea into a separate issue, and it would be useful for all methods of installation, not just with Homebrew. I have created #47 for this purpose.

@superatomic
Copy link
Contributor

Additionally, it might be worth it for me to submit my tere formula to homebrew/core before something like #47 or similar is implemented, and to just have the caveats section link to the setup section of the README. That way tere is at least able to be installed with Homebrew.

What are everyone's thoughts on this?

@mgunyho
Copy link
Owner

mgunyho commented Jul 21, 2022

Thanks @superatomic ! I think for now it's a good idea to just put the shell instructions in the caveats section. Feel free to submit the PR. How is the binary provided for homebrew? Will somebody have to build tere for Mac?

Currently I'm not planning to merge #9, it was more of a note to self after seeing how others like ranger and nnn do it. Maybe it can be added as an option, but for now let's say that the default will be to always just print to stdout.

@superatomic
Copy link
Contributor

I think for now it's a good idea to just put the shell instructions in the caveats section. Feel free to submit the PR.

Sounds good, although I think it would be beneficial to eventually get #46 implemented.

How is the binary provided for homebrew? Will somebody have to build tere for Mac?

The tere formula provides instructions on how to build tere from source. The formula is built on Homebrew's dedicated hardware and stored as a "bottle". When users run brew install tere, they download the prebuilt binary (and all other files) from the bottle, without having to build it themselves.

It is also possible to tell Homebrew to build from source locally during installation.

@superatomic
Copy link
Contributor

tere is now in homebrew/core! 🎉

You can now install tere by running brew install tere. (You will probably have to run brew update beforehand to pull the new formula)

While tere is in Homebrew now, I recommend that this issue stays open until #49 is closed.

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 a pull request may close this issue.

4 participants