aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorMarkus Reiter2017-09-17 04:03:56 +0200
committerGitHub2017-09-17 04:03:56 +0200
commitdbc4a385b9d421b1738c86b4d0ca7cc1b49b3782 (patch)
tree2f4ddf25d1b098075efd023045c92e1faadc4d78 /Library/Homebrew/utils.rb
parente537db28cb6b961deab28dc7487887dfe1e659cf (diff)
parentacf1b278ae0c27f19e7d20a9d23c005201dc818c (diff)
downloadbrew-dbc4a385b9d421b1738c86b4d0ca7cc1b49b3782.tar.bz2
Merge pull request #2878 from wendorf/brew_cask_list_full-name
List cask full-names
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb12
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