diff options
Diffstat (limited to 'Library/Homebrew/utils.rb')
| -rw-r--r-- | Library/Homebrew/utils.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 8a297f053..ca633c521 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -97,9 +97,13 @@ def curl *args safe_system '/usr/bin/curl', '-f#LA', HOMEBREW_USER_AGENT, *args unless args.empty? end -def puts_columns items +def puts_columns items, star_items=[] return if items.empty? + if star_items && star_items.any? + items = items.map{|item| star_items.include?(item) ? "#{item}*" : item} + end + if $stdout.tty? # determine the best width to display for different console sizes console_width = `/bin/stty size`.chomp.split(" ").last.to_i |
