blob: a2fbd2f00e14e4340b4a30ca51faabeeef219854 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#: * `cat` <formula>:
#: Display the source to <formula>.
module Homebrew
def cat
# do not "fix" this to support multiple arguments, the output would be
# unparsable, if the user wants to cat multiple formula they can call
# brew cat multiple times.
formulae = ARGV.formulae
raise FormulaUnspecifiedError if formulae.empty?
raise "`brew cat` doesn't support multiple arguments" if formulae.size > 1
cd HOMEBREW_REPOSITORY
exec "cat", formulae.first.path, *ARGV.options_only
end
end
|