1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Merge pull request #1388 from pry/493-color-prompt

helpers/text: respect RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE
This commit is contained in:
Kyrylo Silin 2015-03-05 13:17:13 +02:00
commit 9515c1899a

View file

@ -18,11 +18,11 @@ class Pry
COLORS.each_pair do |color, value|
define_method color do |text|
"\033[0;#{30+value}m#{text}\033[0m"
"\001\033[0;#{30+value}m\002#{text}\001\033[0m\002"
end
define_method "bright_#{color}" do |text|
"\033[1;#{30+value}m#{text}\033[0m"
"\001\033[1;#{30+value}m\002#{text}\001\033[0m\002"
end
end
@ -98,4 +98,3 @@ class Pry
end
end
end