diff options
| author | Jonas Pfenniger | 2011-01-01 00:49:05 +0000 |
|---|---|---|
| committer | Adam Vandenberg | 2011-03-21 22:10:39 -0700 |
| commit | c2c21edae4f71dbc64eef6e4d0b53991248f1aab (patch) | |
| tree | ebd1c5d31e915b01b7be930cd793566d9da5e1e3 /Library/Homebrew/utils.rb | |
| parent | 163c1c52d072f081f80c75ed9876e0587d0af8dd (diff) | |
| download | brew-c2c21edae4f71dbc64eef6e4d0b53991248f1aab.tar.bz2 | |
brew up: star installed formulae
When running `brew up`, if a mentioned formulae is also installed,
it will get a wildcard start at the end.
It makes it easier to see if any installed formulae is impacted.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
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 |
