Sha256: 100b7b236e88f7c32b815372053721e4f3bebc95bde38b7250113f97cc688264

Contents?: true

Size: 616 Bytes

Versions: 159

Compression:

Stored size: 616 Bytes

Contents

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

Version data entries

159 entries across 152 versions & 35 rubygems

Version Path
pry-0.10.0-java lib/pry/commands/change_prompt.rb
pry-0.10.0.rc1 lib/pry/commands/change_prompt.rb
pry-0.10.0.rc1-i386-mswin32 lib/pry/commands/change_prompt.rb
pry-0.10.0.rc1-i386-mingw32 lib/pry/commands/change_prompt.rb
pry-0.10.0.rc1-x64-mingw32 lib/pry/commands/change_prompt.rb
pry-0.10.0.rc1-java lib/pry/commands/change_prompt.rb
pry-0.10.0.pre4 lib/pry/commands/change_prompt.rb
pry-0.10.0.pre4-i386-mswin32 lib/pry/commands/change_prompt.rb
pry-0.10.0.pre4-i386-mingw32 lib/pry/commands/change_prompt.rb
pry-0.10.0.pre4-x64-mingw32 lib/pry/commands/change_prompt.rb
pry-0.10.0.pre4-java lib/pry/commands/change_prompt.rb
pry-0.10.0.pre3 lib/pry/commands/change_prompt.rb
pry-0.10.0.pre3-i386-mswin32 lib/pry/commands/change_prompt.rb
pry-0.10.0.pre3-i386-mingw32 lib/pry/commands/change_prompt.rb
pry-0.10.0.pre3-java lib/pry/commands/change_prompt.rb
pry-0.10.0.pre2 lib/pry/commands/change_prompt.rb
pry-0.10.0.pre2-universal-mswin32 lib/pry/commands/change_prompt.rb
pry-0.10.0.pre2-universal-mingw32 lib/pry/commands/change_prompt.rb
pry-0.10.0.pre2-java lib/pry/commands/change_prompt.rb