Mike McQuaid 85e65f6d9c
Move some cmd to dev-cmd.
None of these made sense as end-user commands.
2020-04-14 14:29:38 +01:00

32 lines
553 B
Ruby

# frozen_string_literal: true
require "commands"
require "cli/parser"
module Homebrew
module_function
def command_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`command` <cmd>
Display the path to the file being used when invoking `brew` <cmd>.
EOS
switch :verbose
switch :debug
min_named 1
end
end
def command
command_args.parse
args.named.each do |cmd|
path = Commands.path(cmd)
odie "Unknown command: #{cmd}" unless path
puts path
end
end
end