Skip to content

Instantly share code, notes, and snippets.

@fmiopensource
Created November 11, 2009 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fmiopensource/232106 to your computer and use it in GitHub Desktop.
Save fmiopensource/232106 to your computer and use it in GitHub Desktop.
def putsc(text, color='y')
code = case color
when 'y' then 33
when 'r' then 31
when 'g' then 32
end
printf "\033[#{code}m#{text}\033[0m\n\n"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment