Man page help text similar to git

This commit is contained in:
Gautham Goli 2018-08-03 01:48:45 +05:30
parent df101dde84
commit 83e7cbe5c5
No known key found for this signature in database
GPG Key ID: 6A9ABBC284468364

View File

@ -23,6 +23,16 @@ module Homebrew
def post_initialize
@parser.on_tail("-h", "--help", "Show this message") do
puts @parser
xyz = @parser.summarize([], 8, 44, " "*8).map do |r|
if r.match?(/^\s{12}\S/)
"\n" + r.gsub(" "*12, " "*8)
elsif r.start_with?(" "*17)
r.gsub(" "*17, " "*11)
else
"\n" + r
end
end
puts xyz
exit
end
end