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
logstash-filter-cache-redis-0.1.0 vendor/bundle/jruby/1.9/gems/pry-0.10.4-java/lib/pry/commands/change_prompt.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/pry-0.10.4/lib/pry/commands/change_prompt.rb
tdiary-5.0.5 vendor/bundle/gems/pry-0.10.4/lib/pry/commands/change_prompt.rb
logstash-filter-csharp-0.1.0 vendor/bundle/jruby/2.3.0/gems/pry-0.10.4-java/lib/pry/commands/change_prompt.rb
logstash-filter-htmlentities-0.1.0 vendor/bundle/jruby/1.9/gems/pry-0.10.4-java/lib/pry/commands/change_prompt.rb
logstash-output-icinga-1.0.0 vendor/jruby/1.9/gems/pry-0.10.4-java/lib/pry/commands/change_prompt.rb
lazy_record-0.2.1 vendor/bundle/gems/pry-0.10.4/lib/pry/commands/change_prompt.rb
lazy_record-0.2.0 vendor/bundle/gems/pry-0.10.4/lib/pry/commands/change_prompt.rb
lazy_record-0.1.9 vendor/bundle/gems/pry-0.10.4/lib/pry/commands/change_prompt.rb
lazy_record-0.1.8 vendor/bundle/gems/pry-0.10.4/lib/pry/commands/change_prompt.rb
lazy_record-0.1.7 vendor/bundle/gems/pry-0.10.4/lib/pry/commands/change_prompt.rb
lazy_record-0.1.6 vendor/bundle/gems/pry-0.10.4/lib/pry/commands/change_prompt.rb
lazy_record-0.1.4 vendor/bundle/gems/pry-0.10.4/lib/pry/commands/change_prompt.rb
tdiary-5.0.4 vendor/bundle/gems/pry-0.10.4/lib/pry/commands/change_prompt.rb
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/pry-0.10.4/lib/pry/commands/change_prompt.rb
logstash-filter-zabbix-0.1.2 vendor/bundle/jruby/1.9/gems/pry-0.10.4-java/lib/pry/commands/change_prompt.rb
lazy_record-0.1.3 vendor/bundle/gems/pry-0.10.4/lib/pry/commands/change_prompt.rb
lazy_record-0.1.2 vendor/bundle/gems/pry-0.10.4/lib/pry/commands/change_prompt.rb
lazy_record-0.1.1 vendor/bundle/gems/pry-0.10.4/lib/pry/commands/change_prompt.rb
lazy_record-0.1.0 vendor/bundle/gems/pry-0.10.4/lib/pry/commands/change_prompt.rb