Sha256: 486916169c122b3fa078bfdf97233b7939f8e7bdf7b3d01a18b41f048558f4e6

Contents?: true

Size: 736 Bytes

Versions: 6790

Compression:

Stored size: 736 Bytes

Contents

# frozen_string_literal: true

class Pry
  class Command
    class ShellMode < Pry::ClassCommand
      match 'shell-mode'
      group 'Input and Output'
      description 'Toggle shell mode. Bring in pwd prompt and file completion.'

      banner <<-'BANNER'
        Toggle shell mode. Bring in pwd prompt and file completion.
      BANNER

      def process
        state.disabled ^= true

        if state.disabled
          state.prev_prompt = pry_instance.prompt
          pry_instance.prompt = Pry::Prompt[:shell]
        else
          pry_instance.prompt = state.prev_prompt
        end
      end
    end

    Pry::Commands.add_command(Pry::Command::ShellMode)
    Pry::Commands.alias_command 'file-mode', 'shell-mode'
  end
end

Version data entries

6,790 entries across 6,786 versions & 31 rubygems

Version Path
cybrid_api_bank_ruby-0.123.149 vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb
cybrid_api_id_ruby-0.123.149 vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb
cybrid_api_organization_ruby-0.123.149 vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb
cybrid_api_bank_ruby-0.123.148 vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb
cybrid_api_id_ruby-0.123.148 vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb
cybrid_api_organization_ruby-0.123.148 vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb
cybrid_api_bank_ruby-0.123.147 vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb
cybrid_api_organization_ruby-0.123.147 vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb
cybrid_api_id_ruby-0.123.147 vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb
ory-client-1.16.2 vendor/bundle/ruby/3.1.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb
avalara_sdk-24.12.2 vendor/bundle/ruby/2.7.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
cybrid_api_bank_ruby-0.123.145 vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb
cybrid_api_organization_ruby-0.123.145 vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb
cybrid_api_id_ruby-0.123.145 vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb
cybrid_api_bank_ruby-0.123.144 vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb
cybrid_api_id_ruby-0.123.144 vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb
cybrid_api_organization_ruby-0.123.144 vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb
ory-client-1.16.1 vendor/bundle/ruby/3.1.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb
ory-client-1.16.0 vendor/bundle/ruby/3.1.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb
cybrid_api_bank_ruby-0.123.143 vendor/bundle/ruby/3.3.0/gems/pry-0.14.2/lib/pry/commands/shell_mode.rb