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

Setup bash & zsh autocomplete as part of brew install #264

Closed
bfarayev opened this issue Nov 13, 2019 · 8 comments
Closed

Setup bash & zsh autocomplete as part of brew install #264

bfarayev opened this issue Nov 13, 2019 · 8 comments
Labels
area: releasing Changes related to the release process. good first issue Issues that are good for first-time contributors to pick up. help wanted Issues that could benefit from members of the community contributing their expertise or experience.

Comments

@bfarayev
Copy link

Now that we have bash & zsh autocomplete scripts in this repo, we can install them as part of installation with homebrew.

I've noticed that we have this formula already: https://github.com/go-task/homebrew-tap/blob/master/Formula/go-task.rb

Adding 2 lines to the formula, will do that for us:

    bash_completion.install "completion/bash/task.bash" => "task"
    zsh_completion.install "completion/zsh/_task" => "_task"

I was just testing this on my machine today. Happy to raise a PR for that if it's fine.

Thanks

@andreynering andreynering added the area: releasing Changes related to the release process. label Nov 16, 2019
@andreynering
Copy link
Member

Hi @bfarayev,

Yeah, it'd be nice to have that. Contributions would be welcome. 🙂

We'd probably have to adapt our Goreleaser setup to also include these completion scripts on the .tar.gz files.

Also, we need to make sure that it won't break stuff for users that try install an older version (without the completion scripts in the tarball).

@andreynering
Copy link
Member

Some additional instructions on how to do it was added by @zx8 here: #382 (comment)

Contributions with this are welcome!

@andreynering andreynering added good first issue Issues that are good for first-time contributors to pick up. help wanted Issues that could benefit from members of the community contributing their expertise or experience. labels Oct 12, 2020
@notnmeyer
Copy link
Contributor

hey @bfarayev! i opened a PR for this, but im not sure how to go about testing it. would love to hear a little about how you tested.

@bfarayev
Copy link
Author

bfarayev commented Sep 5, 2021

hey @notnmeyer! I guess the best way to test is to remove task from your system (Eg: on Mac you'd do brew uninstall task) first. Assuming that you're making a change into the Homebrew formula in your own fork, install that formula and see if it installs bash/zsh completion as part of it. Delete and make changes to your formula until it works and when ready, PR to the upstream.

@notnmeyer
Copy link
Contributor

notnmeyer commented Sep 7, 2021

thanks @bfarayev, i think what i probably worded my question poorly. i was looking for tips on how to install from the tap in my fork, that's the part that seems non-obvious.

edit: i think ive figured it out, thanks @bfarayev

@bfarayev
Copy link
Author

ah sorry for the late answer. glad that you figured it out.

I think the best ways to test the changes to the tap (Eg the PR you're doing to go-tasks's main homebrew-tap in this PR) is to fork that repo, make your own tap and then in your local machine, remove everything related to task, "brew tap" your forked tap which will include the autocompletion scripts change and see what you get when you say something like this:

brew tap notnmeyer/go-task
brew install go-task ?

or directly use

brew install notnmeyer/tap/go-task

(something along these lines will work).

Check this out as well to see how it works: https://docs.brew.sh/Taps

Hope it helps

@bfarayev
Copy link
Author

I also found some notes on how to update the formula in the project docs: https://taskfile.dev/#/releasing_task?id=homebrew

@andreynering
Copy link
Member

Implemented as part of #592.

We should have completions when installing via Brew starting in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: releasing Changes related to the release process. good first issue Issues that are good for first-time contributors to pick up. help wanted Issues that could benefit from members of the community contributing their expertise or experience.
Projects
None yet
Development

No branches or pull requests

3 participants