Defines aliases for ANSI coloured output. Default colours can be overridden
by defining a GHERKIN_COLORS
variable in your shell, very much
like how you can tweak the familiar POSIX command ls
with
$LSCOLORS: linux-sxs.org/housekeeping/lscolors.html
The colours that you can change are:
defaults to yellow
defaults to yellow
defaults to yellow,bold
defaults to grey
defaults to grey,bold
defaults to red
defaults to red,bold
defaults to green
defaults to green,bold
defaults to cyan
defaults to cyan,bold
defaults to cyan
defaults to cyan,bold
defaults to grey
defaults to cyan
For instance, if your shell has a black background and a green font (like the “Homebrew” settings for OS X' Terminal.app), you may want to override passed steps to be white instead of green. Examples:
export GHERKIN_COLORS="passed=white" export GHERKIN_COLORS="passed=white,bold:passed_arg=white,bold,underline"
(If you're on Windows, use SET instead of export). To see what colours and effects are available, just run this in your shell:
ruby -e "require 'rubygems'; require 'term/ansicolor'; puts Term::ANSIColor.attributes"
Although not listed, you can also use grey
# File lib/cucumber/gherkin/formatter/ansi_escapes.rb, line 87 def reset "\e[0m" end
# File lib/cucumber/gherkin/formatter/ansi_escapes.rb, line 91 def up(n) "\e[#{n}A" end