Merge pull request #15146 from ZhongRuoyu/completions-short-desc

This commit is contained in:
Carlo Cabrera 2023-04-04 20:29:16 +08:00 committed by GitHub
commit 845506ba02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -203,7 +203,7 @@ module Commands
if (cmd_parser = Homebrew::CLI::Parser.from_cmd_path(path))
if short
cmd_parser.description.split(".").first
cmd_parser.description.split(/\.(?>\s|$)/).first
else
cmd_parser.description
end