Sha256: 0389274bda55acb0dc76bfc77ae7d74c2695512ce62d5cb7119ed3061726f21c
Contents?: true
Size: 1.59 KB
Versions: 5
Compression:
Stored size: 1.59 KB
Contents
# Below are the color init strings for the basic file types. A color init # string consists of one or more of the following numeric codes: # Attribute codes: # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed # Text color codes: # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white # Background color codes: # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white m = { } ENV['LS_COLORS'].split(":").each do |e| k, v = e.split('=') m[k] = v end puts m ## ANSIname => ANSIcode LUT #ANSINAME2CODE= { "reset" => "\e[0m", "bold" => "\e[1m", # "underline" => "\e[4m", "blink" => "\e[5m", # "reverse" => "\e[7m", "invisible" => "\e[8m", # "black" => "\e[0;30m", "darkgrey" => "\e[1;30m", # "red" => "\e[0;31m", "lightred" => "\e[1;31m", # "green" => "\e[0;32m", "lightgreen" => "\e[1;32m", # "brown" => "\e[0;33m", "yellow" => "\e[1;33m", # "blue" => "\e[0;34m", "lightblue" => "\e[1;34m", # "purple" => "\e[0;35m", "magenta" => "\e[1;35m", # "cyan" => "\e[1;36m", "lightcyan" => "\e[1;36m", # "grey" => "\e[0;37m", "white" => "\e[1;37m", # "bgblack" => "\e[40m", "bgred" => "\e[41m", # "bggreen" => "\e[42m", "bgyellow" => "\e[43m", # "bgblue" => "\e[44m", "bgmagenta" => "\e[45m", # "bgcyan" => "\e[46m", "bgwhite" => "\e[47m" i,e= m['*.tga'].split(';') puts "\e[#{i}m\e[1;#{e}m prova.tga \e[0m"
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
tree.rb-0.3.13 | lib/colors.rb |
tree.rb-0.3.11 | lib/colors.rb |
tree.rb-0.3.10 | lib/colors.rb |
tree.rb-0.3.9 | lib/colors.rb |
tree.rb-0.3.8 | lib/colors.rb |