Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Feature request: search fallback on "No available formula" error #33635

Closed
mambocab opened this issue Oct 27, 2014 · 5 comments
Closed

Feature request: search fallback on "No available formula" error #33635

mambocab opened this issue Oct 27, 2014 · 5 comments
Labels

Comments

@mambocab
Copy link
Contributor

I often find myself trying to install a formula, getting the name wrong, then searching for the name I tried. Today's example was:

$ brew install racket
Error: No available formula for racket
Searching taps...
$ brew search racket
plt-racket

A useful feature for me would be optional fallback to brew search on a failed install. If the feature were enabled, that series of commands would look something like

$ brew install racket
Error: No available formula for racket
Searching taps...
Falling back to `brew search racket`. Did you mean:
plt-racket

Would this be useful for anyone else?

@MikeMcQuaid
Copy link
Member

Yup, this sounds sensible. Would you be up for attempting an implementation? Thanks!

@adamv adamv added the features label Oct 27, 2014
@mambocab
Copy link
Contributor Author

I have an implementation that's untested but 🎉 Works On My Machine 🎉.

A couple questions:

  • How do you build the man page? I have a starting point for documenting the environment variable, but I don't know how to check my work.
  • Could someone point me to an example of a feature like this being tested?

Or, if someone else wants to write tests for and document it, I can submit a PR as is.

@MikeMcQuaid
Copy link
Member

How do you build the man page? I have a starting point for documenting the environment variable, but I don't know how to check my work.

brew man.

I think this maybe doesn't need docs or tests though, honestly (although tests would always be nice if you're in the mood).

@mambocab
Copy link
Contributor Author

I think this maybe doesn't need docs or tests though, honestly (although tests would always be nice if you're in the mood).

I'll submit it as-is, taking your on-by-default comment into account. If I can figure it out later, I'll submit tests as well. I'm no Rubyist, so I may not be the best person for that job.

@DomT4
Copy link
Member

DomT4 commented Oct 28, 2014

Closed by this commit.

@Homebrew Homebrew locked and limited conversation to collaborators Feb 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants