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

Tracking Issue: Integrating brew cask search into brew search #4254

Closed
7 tasks done
reitermarkus opened this issue Jun 1, 2018 · 16 comments
Closed
7 tasks done

Tracking Issue: Integrating brew cask search into brew search #4254

reitermarkus opened this issue Jun 1, 2018 · 16 comments
Assignees
Labels
outdated PR was locked due to age

Comments

@reitermarkus
Copy link
Member

reitermarkus commented Jun 1, 2018

Checkpoints:

@reitermarkus
Copy link
Member Author

Regarding the behaviour:

Without any options, I think the best way would be to output this:

==> Formulae:
foo bar
==> Casks:
baz

When the output is not a TTY, don't print the headlines and use the long versions for Casks. Alternatively, don't treat TTY differently, since we currently also don't really support piping output to another command:

==> Searching local taps...
==> Searching taps on GitHub...

If we choose to not support piping output, I don't see a need for a --cask/--formula flag to only search for one specific thing.

@MikeMcQuaid
Copy link
Member

Alternatively, don't treat TTY differently, since we currently also don't really support piping output to another command

👍 to this when passing a parameter from me; we've not had any asks for this.

brew search without argument should output just formulae, though. It may be annoying or inconsistent but there are many, many uses in the wild with this assumption that we don't want to break.

@JCount
Copy link
Contributor

JCount commented Jun 1, 2018

I strongly agree regarding what brew search's behavior needs to be.

It also probably will not be that difficult for users to accommodate, 🤞.

@reitermarkus
Copy link
Member Author

Another thing to discuss:

brew cask search creates a simplified search term, i.e. trimming all non-word and non-digit characters from both the query and the Cask tokens.

brew search does not do that.

So, for example, brew cask search eid matches

  • cocos-code-ide (cocoscodeide)
  • eclipse-ide (eclipseide)
  • kaleidoscope (kaleidoscope)
  • liteide (liteide)

I think we should do the same for brew search.

@MikeMcQuaid
Copy link
Member

I think we should do the same for brew search.

I think the opposite, I'm afraid; it seems pretty weird to me that cocos-code-ide is matched with eid. Can you point to any e.g. search engines that have similar behaviour?

@reitermarkus
Copy link
Member Author

reitermarkus commented Jun 3, 2018

Can you point to any e.g. search engines that have similar behaviour?

I'm no search engine expert, but I also can't point to a search engine not doing something like that.

Anyways, I have no strong opinion on this, but here is a more useful example:

Before:

$ brew search qt5
pyqt5 qt5

After:

$ brew search qt5
pyqt5 qt5 [email protected] [email protected]

@JCount
Copy link
Contributor

JCount commented Jun 4, 2018

I think brew search already provides similar functionality in its ability to handle regex.

@MikeMcQuaid
Copy link
Member

I'm no search engine expert, but I also can't point to a search engine not doing something like that.

Can you provide some e.g. search engine links to demonstrate this?

@reitermarkus
Copy link
Member Author

reitermarkus commented Jun 4, 2018

https://www.google.com/search?q=rubo-cop
https://github.com/search?q=rubo-cop
https://duckduckgo.com/?q=rubo-cop

All find rubocop without a -.

Although, https://rubygems.org/search?query=rubo-cop does not find it.

I think brew search already provides similar functionality in its ability to handle regex.

This functionality is nice in theory, but I have to say that I have never used this when simply searching for something I am not sure about.

I'll let you both make a final decision here so we can proceed.

@MikeMcQuaid
Copy link
Member

https://www.google.com/search?q=rubo-cop
https://github.com/search?q=rubo-cop
https://duckduckgo.com/?q=rubo-cop

All find rubocop without a -.

Cool thanks 👍

I'll let you both make a final decision here so we can proceed.

I'm 👍 on the trimming of non-word/digit characters.

@JCount
Copy link
Contributor

JCount commented Jun 5, 2018

I'm 👍 on the trimming of non-word/digit characters.

👍

@MikeMcQuaid MikeMcQuaid added the in progress Maintainers are working on this label Jun 6, 2018
@yurikoles
Copy link
Contributor

I see that now there is duplicates in search results:

brew cask search virtualbox
==> Matches
virtualbox                                           virtualbox-beta                                      virtualbox-extension-pack                            virtualbox-extension-pack-beta
==> Remote Matches
homebrew/cask-versions/virtualbox-beta                                                                    homebrew/cask/virtualbox
homebrew/cask-versions/virtualbox-extension-pack-beta                                                     homebrew/cask/virtualbox-extension-pack

@JCount
Copy link
Contributor

JCount commented Jun 15, 2018

@yurikoles brew cask search is still in the process of being merged into brew search, so that should just be a temporary issue during the transition. (🤞)

@reitermarkus
Copy link
Member Author

Done.

@ghost ghost removed the in progress Maintainers are working on this label Jun 20, 2018
@wickles
Copy link
Contributor

wickles commented Jun 21, 2018

This broke one of my scripts for interfacing with brew-cask. I need the functionality for brew cask search without arguments where all Casks are listed. Now it shows all brew formulae and no Casks. Is there an alternative method that I can use to list all Casks (or equivalently, all formulae from a specific tap)?

@laughedelic
Copy link
Contributor

This broke one of my scripts for interfacing with brew-cask. I need the functionality for brew cask search without arguments where all Casks are listed.

Same here: laughedelic/brew-completions#4. I think it still needs a --cask flag to list only casks.

@lock lock bot added the outdated PR was locked due to age label Jul 22, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

6 participants