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:
commit
9515c1899a
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue