oh1: Add a truncate option
This commit is contained in:
parent
33912e218e
commit
2b847959f0
@ -88,8 +88,10 @@ def ohai(title, *sput)
|
|||||||
puts sput
|
puts sput
|
||||||
end
|
end
|
||||||
|
|
||||||
def oh1(title)
|
def oh1(title, options = {})
|
||||||
title = Tty.truncate(title) if $stdout.tty? && !ARGV.verbose?
|
if $stdout.tty? && !ARGV.verbose? && options.fetch(:truncate, :auto) == :auto
|
||||||
|
title = Tty.truncate(title)
|
||||||
|
end
|
||||||
puts "#{Tty.green}==>#{Tty.white} #{title}#{Tty.reset}"
|
puts "#{Tty.green}==>#{Tty.white} #{title}#{Tty.reset}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user