diff options
| author | Shaun Jackman | 2016-08-10 13:17:26 -0400 |
|---|---|---|
| committer | Shaun Jackman | 2016-08-12 20:54:18 -0400 |
| commit | 2b847959f098414fb12600535b5f0ab584a11e40 (patch) | |
| tree | 18e469ae9d5a7caa22f0ff98004fafd33995b777 /Library/Homebrew/utils.rb | |
| parent | 33912e218e0d12e545a7319d72215e4bddc194f5 (diff) | |
| download | brew-2b847959f098414fb12600535b5f0ab584a11e40.tar.bz2 | |
oh1: Add a truncate option
Diffstat (limited to 'Library/Homebrew/utils.rb')
| -rw-r--r-- | Library/Homebrew/utils.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index f78fbfcb7..71f03c6d5 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -88,8 +88,10 @@ def ohai(title, *sput) puts sput end -def oh1(title) - title = Tty.truncate(title) if $stdout.tty? && !ARGV.verbose? +def oh1(title, options = {}) + if $stdout.tty? && !ARGV.verbose? && options.fetch(:truncate, :auto) == :auto + title = Tty.truncate(title) + end puts "#{Tty.green}==>#{Tty.white} #{title}#{Tty.reset}" end |
