aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/help.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cmd/help.rb')
-rw-r--r--Library/Homebrew/cmd/help.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/help.rb b/Library/Homebrew/cmd/help.rb
index 449d44d46..77b562745 100644
--- a/Library/Homebrew/cmd/help.rb
+++ b/Library/Homebrew/cmd/help.rb
@@ -56,7 +56,10 @@ module Homebrew
cmd_path.read.
split("\n").
grep(/^#:/).
- map { |line| line.slice(2..-1).delete("`").sub(/^ \* /, "brew ") }.
- join("\n")
+ map do |line|
+ line.slice(2..-1).sub(/^ \* /, "#{Tty.highlight}brew#{Tty.reset} ").
+ gsub(/`(.*?)`/, "#{Tty.highlight}\\1#{Tty.reset}").
+ gsub(/<(.*?)>/, "#{Tty.em}\\1#{Tty.reset}")
+ end.join("\n")
end
end