Merge pull request #13048 from hyuraku/repair_search_casks
repair cask's fuzzy_search in `search_casks`
This commit is contained in:
commit
b4a9182e3f
@ -34,7 +34,8 @@ module Homebrew
|
||||
results = cask_tokens.extend(Searchable)
|
||||
.search(string_or_regex)
|
||||
|
||||
results |= DidYouMean::SpellChecker.new(dictionary: cask_tokens)
|
||||
cask_names = Cask::Cask.all.map(&:full_name)
|
||||
results += DidYouMean::SpellChecker.new(dictionary: cask_names)
|
||||
.correct(string_or_regex)
|
||||
|
||||
results.sort.map do |name|
|
||||
@ -44,7 +45,7 @@ module Homebrew
|
||||
else
|
||||
cask.full_name
|
||||
end
|
||||
end
|
||||
end.uniq
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user