search: handle name@v.v formulae.

Before this change:
```
~> brew search openssl@1.1
openssl@1.1 ✔
==> Did you mean to perform a regular expression search?
==> Surround your query with /slashes/ to search by regex.
```
This commit is contained in:
Dominyk Tiller 2016-08-25 20:40:26 +01:00
parent 24be5c4a39
commit ab203a749f
No known key found for this signature in database
GPG Key ID: FE19AEFCF658C6F6

View File

@ -83,7 +83,7 @@ module Homebrew
end
if $stdout.tty?
metacharacters = %w[\\ | ( ) [ ] { } ^ $ * + ? .]
metacharacters = %w[\\ | ( ) [ ] { } ^ $ * + ?]
bad_regex = metacharacters.any? do |char|
ARGV.any? do |arg|
arg.include?(char) && !arg.start_with?("/")