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

shorten DEFAULT_PROC

This commit is contained in:
fowlmouth 2011-10-27 22:38:39 -05:00
parent e8f5d55c31
commit 9cb03413de

View file

@ -66,19 +66,11 @@ class Pry
# The default prompt; includes the target and nesting level
DEFAULT_PROMPT = [
proc { |target_self, nest_level, pry|
if nest_level == 0
"[#{pry.input_array.size}] pry(#{Pry.view_clip(target_self)})> "
else
"[#{pry.input_array.size}] pry(#{Pry.view_clip(target_self)}):#{nest_level}> "
end
"[#{pry.input_array.size}] pry(#{Pry.view_clip(target_self)})#{":#{nest_level}" unless nest_level.zero?}> "
},
proc { |target_self, nest_level, pry|
if nest_level == 0
"[#{pry.input_array.size}] pry(#{Pry.view_clip(target_self)})* "
else
"[#{pry.input_array.size}] pry(#{Pry.view_clip(target_self)}):#{nest_level}* "
end
"[#{pry.input_array.size}] pry(#{Pry.view_clip(target_self)})#{":#{nest_level}" unless nest_level.zero?}* "
}
]