58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
# File 'lib/bio/shell/irb.rb', line 58
def setup_irb
IRB.conf[:AP_NAME] = 'bioruby'
$_ = Bio::Shell.colors
IRB.conf[:PROMPT][:BIORUBY_COLOR] = {
:PROMPT_I => "bio#{$_[:ruby]}ruby#{$_[:none]}> ",
:PROMPT_S => "bio#{$_[:ruby]}ruby#{$_[:none]}%l ",
:PROMPT_C => "bio#{$_[:ruby]}ruby#{$_[:none]}+ ",
:RETURN => " ==> %s\n"
}
IRB.conf[:PROMPT][:BIORUBY] = {
:PROMPT_I => "bioruby> ",
:PROMPT_S => "bioruby%l ",
:PROMPT_C => "bioruby+ ",
:RETURN => " ==> %s\n"
}
if Bio::Shell.config[:color]
IRB.conf[:PROMPT_MODE] = :BIORUBY_COLOR
else
IRB.conf[:PROMPT_MODE] = :BIORUBY
end
end
|