Sha256: 0102ea2bf5c43b339fe2dbe3a9ae7c2a48fc75a8fac9f64e909f4dbdf383cc55

Contents?: true

Size: 1.4 KB

Versions: 99

Compression:

Stored size: 1.4 KB

Contents

#!/usr/bin/env bash

case "$1" in
  # regular colors
  black)    tput setaf 0 ;;
  red)      tput setaf 1 ;;
  green)    tput setaf 2 ;;
  yellow)   tput setaf 3 ;;
  blue)     tput setaf 4 ;;
  magenta)  tput setaf 5 ;;
  cyan)     tput setaf 6 ;;
  white)    tput setaf 7 ;;

  # emphasized (bolded) colors
  eblack)   tput bold ; tput setaf 0 ;;
  ered)     tput bold ; tput setaf 1 ;;
  egreen)   tput bold ; tput setaf 2 ;;
  eyellow)  tput bold ; tput setaf 3 ;;
  eblue)    tput bold ; tput setaf 4 ;;
  emagenta) tput bold ; tput setaf 5 ;;
  ecyan)    tput bold ; tput setaf 6 ;;
  ewhite)   tput bold ; tput setaf 7 ;;

  # underlined colors
  ublack)   set smul unset rmul ; tput setaf 0 ;;
  ured)     set smul unset rmul ; tput setaf 1 ;;
  ugreen)   set smul unset rmul ; tput setaf 2 ;;
  uyellow)  set smul unset rmul ; tput setaf 3 ;;
  ublue)    set smul unset rmul ; tput setaf 4 ;;
  umagenta) set smul unset rmul ; tput setaf 5 ;;
  ucyan)    set smul unset rmul ; tput setaf 6 ;;
  uwhite)   set smul unset rmul ; tput setaf 7 ;;

  # background colors
  bblack)   tput setab 0 ;;
  bred)     tput setab 1 ;;
  bgreen)   tput setab 2 ;;
  byellow)  tput setab 3 ;;
  bblue)    tput setab 4 ;;
  bmagenta) tput setab 5 ;;
  bcyan)    tput setab 6 ;;
  bwhite)   tput setab 7 ;;

  # Defaults
  default)  tput setaf 9 ;;
  bdefault) tput setab 9 ;;
  none)     tput sgr0    ;;
  *)        tput sgr0    # Reset
esac

Version data entries

99 entries across 99 versions & 2 rubygems

Version Path
rvm-1.1.4 scripts/color
rvm-1.1.3 scripts/color
rvm-1.1.2 scripts/color
rvm-1.1.1 scripts/color
rvm-1.1.0 scripts/color
rvm-1.0.23 scripts/color
rvm-1.0.22 scripts/color
rvm-1.0.21 scripts/color
rvm-1.0.20 scripts/color
rvm-1.0.19 scripts/color
rvm-1.0.18 scripts/color
rvm-1.0.17 scripts/color
rvm-1.0.15 scripts/color
gemrage-1.0.0 vendor/ruby/1.8/gems/rvm-1.0.14/scripts/color
gemrage-0.4.1 vendor/ruby/1.8/gems/rvm-1.0.14/scripts/color
gemrage-0.4.0 vendor/ruby/1.8/gems/rvm-1.0.14/scripts/color
gemrage-0.3.2 vendor/ruby/1.8/gems/rvm-1.0.14/scripts/color
gemrage-0.3.1 vendor/ruby/1.8/gems/rvm-1.0.14/scripts/color
gemrage-0.3.0 vendor/ruby/1.8/gems/rvm-1.0.14/scripts/color
gemrage-0.2.0 vendor/ruby/1.8/gems/rvm-1.0.14/scripts/color