diff --git a/Library/Homebrew/cmd/--prefix.rb b/Library/Homebrew/cmd/--prefix.rb index 4a5e0ba77c..fb98235dcf 100644 --- a/Library/Homebrew/cmd/--prefix.rb +++ b/Library/Homebrew/cmd/--prefix.rb @@ -1,13 +1,25 @@ -#: * `--prefix`: -#: Display Homebrew's install path. *Default:* `/usr/local` on macOS and `/home/linuxbrew/.linuxbrew` on Linux -#: -#: * `--prefix` : -#: Display the location in the cellar where is or would be installed. +require "cli_parser" module Homebrew module_function + def __prefix_args + Homebrew::CLI::Parser.new do + usage_banner <<~EOS + `--prefix` [] + + Display Homebrew's install path. *Default:* `/usr/local` on macOS and + `/home/linuxbrew/.linuxbrew` on Linux. + + If is provided, display the location in the cellar where + is or would be installed. + EOS + end + end + def __prefix + __prefix_args.parse + if ARGV.named.empty? puts HOMEBREW_PREFIX else