aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
authorXu Cheng2015-09-13 17:23:17 +0800
committerXu Cheng2015-09-13 17:23:17 +0800
commite21bb27c2ecb66ad5001c6fd29fcd3382c25666d (patch)
tree01a1b57e19ebf66cd66dbbedaa5d1b637319841a /Library/Homebrew/formula.rb
parentf001cdf777f4ce3d4a6967925307361f3d01d313 (diff)
downloadbrew-e21bb27c2ecb66ad5001c6fd29fcd3382c25666d.tar.bz2
Formula: add alias_full_names
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index a9fdb7c14..36eb41b5a 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -1026,7 +1026,13 @@ class Formula
# an array of all aliases
# @private
def self.aliases
- @aliases ||= (core_aliases + tap_aliases).uniq.sort
+ @aliases ||= (core_aliases + tap_aliases.map { |name| name.split("/")[-1] }).uniq.sort
+ end
+
+ # an array of all aliases, , which the tap formulae have the fully-qualified name
+ # @private
+ def self.alias_full_names
+ @alias_full_names ||= core_aliases + tap_aliases
end
def self.[](name)