Fixed posix default foregroud color to use 39/default instead of 37/light-gray, since was very hard to see on some dark background terminals.

Added Gemfile.lock for rubygems bundle environment consistency.
This commit is contained in:
Greg Williams
2014-07-25 11:36:33 -04:00
parent 93db16b6dc
commit 47a778d606
2 changed files with 44 additions and 11 deletions

12
Gemfile.lock Normal file
View File

@ -0,0 +1,12 @@
GEM
remote: http://rubygems.org/
specs:
rake (10.3.2)
test-unit (2.4.3)
PLATFORMS
ruby
DEPENDENCIES
rake
test-unit (= 2.4.3)

View File

@ -61,6 +61,26 @@ class ColourCommandLine
end
def posix_colour(colour)
# ANSI Escape Codes - Foreground colors
# | Code | Color |
# | 39 | Default foreground color |
# | 30 | Black |
# | 31 | Red |
# | 32 | Green |
# | 33 | Yellow |
# | 34 | Blue |
# | 35 | Magenta |
# | 36 | Cyan |
# | 37 | Light gray |
# | 90 | Dark gray |
# | 91 | Light red |
# | 92 | Light green |
# | 93 | Light yellow |
# | 94 | Light blue |
# | 95 | Light magenta |
# | 96 | Light cyan |
# | 97 | White |
case colour
when :black then 30
when :red, :failure then 31
@ -69,9 +89,10 @@ class ColourCommandLine
when :blue, :narrative then 34
when :purple, :magenta then 35
when :cyan, :output then 36
when :white, :default_white, :default then 37
when :white, :default_white then 37
when :default then 39
else
30
39
end
end