/usr/lib/ruby/vendor_ruby/pry/commands/change_prompt.rb is in pry 0.10.3-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | class Pry::Command::ChangePrompt < Pry::ClassCommand
match 'change-prompt'
group 'Input and Output'
description 'Change the current prompt.'
command_options argument_required: true
banner <<-BANNER
Usage: change-prompt NAME
Change the current prompt. See list-prompts for a list of available
prompts.
BANNER
def process(prompt)
if prompt_map.key?(prompt)
_pry_.prompt = prompt_map[prompt][:value]
else
raise Pry::CommandError, "'#{prompt}' isn't a known prompt!"
end
end
private
def prompt_map
Pry::Prompt::MAP
end
Pry::Commands.add_command(self)
end
|