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

Taps for Casks #12

Closed
passcod opened this issue Sep 23, 2012 · 2 comments
Closed

Taps for Casks #12

passcod opened this issue Sep 23, 2012 · 2 comments

Comments

@passcod
Copy link
Contributor

passcod commented Sep 23, 2012

Currently, only merged-in casks can be installed, except if one edits the definitions straight from Library/Taps/phinze-cask/Casks, which is awkward. [Installing from URL (#6) would also add to the convenience.]

I've started thinking (and am thinking of starting to code it up) about using plain Taps to add to the collection:

Currently, the only place we look in is Taps/phinze-cask/Casks. An easy way to add support without too much trouble is to just have normal taps, and when there's a Casks directory within a tap, use that as well.

So Taps/passcod-example/*.rb are regular Formulae, while Taps/passcod-example/Casks/*.rb are tapped casks. Plus, brew update does the right thing, no work needed.

There are a few things left to be worked out though, notably: what happens in case of duplicates across taps?

@passcod
Copy link
Contributor Author

passcod commented Sep 24, 2012

Current search output (sample):

$ brew cask search
adium                                   minecraft
alfred                                  nv-alt
at-monitor                              one-password
brackets                                passcod-extra/firefox-aurora
caffeine                                phinze-cask/firefox-aurora
dropbox                                 picard
echofon                                 rdio
firefox                                 scrup
gmail-notifr                            size-up
google-chrome                           skype
google-notifier                         steam
hands-off                               sublime-text
istat-menus                             transmission
iterm2                                  u-torrent
keepass-x                               vlc
little-snitch                           woodhouse
macvim                                  x-quartz

Here, minecraft is a passcod-extra formula, but because it's unique across Casks, it doesn't have a prefix. On the other hand, firefox-aurora has two versions, and so both prefixes are shown.

There's possible non-intuitive behaviour when searching...

Normal:

$ brew cask search firefox                                     
firefox                                 phinze-cask/firefox-aurora
passcod-extra/firefox-aurora

Search for "a":

$ brew cask search a
adium                                   minecraft
alfred                                  nv-alt
at-monitor                              one-password
brackets                                passcod-extra/firefox-aurora
caffeine                                phinze-cask/firefox-aurora
dropbox                                 picard
echofon                                 rdio
firefox                                 scrup
gmail-notifr                            size-up
google-chrome                           skype
google-notifier                         steam
hands-off                               sublime-text
istat-menus                             transmission
iterm2                                  u-torrent
keepass-x                               vlc
little-snitch                           woodhouse
macvim                                  x-quartz

Everything's here, including skype and others which clearly don't have "a" in their names. This happens because when the search is performed, the prefixes aren't stripped off yet. So the "a" in passcod-extra and in phinze-cask match and everything is returned. But all is not bad:

Search for "phinze":

$ brew cask search phinze                                      
adium               firefox-aurora      little-snitch       skype               
alfred              gmail-notifr        macvim              steam               
at-monitor          google-chrome       nv-alt              sublime-text        
brackets            google-notifier     one-password        transmission        
caffeine            hands-off           picard              u-torrent           
dropbox             istat-menus         rdio                vlc                 
echofon             iterm2              scrup               woodhouse           
firefox             keepass-x           size-up             x-quartz

Now, only the stuff in phinze-cask is returned. That's actually quite useful.

Regexp search:

$ brew cask search ^a

Ooops, that doesn't return anything... which is perfectly normal, because neither passcod-extra nor phinze-cask (the only two prefixes there are yet) match /^a/!

Regexp search (proper):

$ brew cask search \/a
adium        alfred       at-monitor

And now it works! It matches <prefix>/a....


Might not be completely intuitive, but I'll leave it like that for the moment.

@phinze
Copy link
Contributor

phinze commented Sep 24, 2012

Thanks to some killer work by @passcod we can call this done.

@phinze phinze closed this as completed Sep 24, 2012
@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants