diff options
| author | Dan Wendorf | 2017-07-08 19:33:44 -0700 |
|---|---|---|
| committer | Dan Wendorf | 2017-09-16 10:00:06 -0700 |
| commit | acf1b278ae0c27f19e7d20a9d23c005201dc818c (patch) | |
| tree | 4b43a21c708c83a116cfc2aed712fb62f8e2b312 /Library/Homebrew/utils.rb | |
| parent | 2056cd2c90109ab410118442f0aacf73f6fb198c (diff) | |
| download | brew-acf1b278ae0c27f19e7d20a9d23c005201dc818c.tar.bz2 | |
List cask full-names
`brew cask list` supports the `--full-name` flag which will include the tap
name for casks not part of the core caskroom/cask tap. For example, if
cask "foo-beta" is installed from the caskroom/versions cask, `brew cask
list --full-name` will report the name as "caskroom/versions/foo-beta".
Diffstat (limited to 'Library/Homebrew/utils.rb')
| -rw-r--r-- | Library/Homebrew/utils.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 07e339576..3033eb4dd 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -560,3 +560,15 @@ end def shell_profile Utils::Shell.profile end + +def tap_and_name_comparison + proc do |a, b| + if a.include?("/") && !b.include?("/") + 1 + elsif !a.include?("/") && b.include?("/") + -1 + else + a <=> b + end + end +end |
