diff options
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/brew.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/brew.rb b/Library/brew.rb index 98a4bfbaa..dd73954b7 100755 --- a/Library/brew.rb +++ b/Library/brew.rb @@ -33,7 +33,7 @@ begin trap("INT", std_trap) # restore default CTRL-C handler empty_argv = ARGV.empty? - help_regex = /(-h$|--help$|--usage$|-\?$|^help$)/ + help_flag_list = %w[-h --help --usage -? help] help_flag = false internal_cmd = true cmd = nil @@ -41,7 +41,7 @@ begin ARGV.dup.each_with_index do |arg, i| if help_flag && cmd break - elsif arg =~ help_regex + elsif help_flag_list.include? arg help_flag = true elsif !cmd cmd = ARGV.delete_at(i) |
