Sha256: 486916169c122b3fa078bfdf97233b7939f8e7bdf7b3d01a18b41f048558f4e6

Contents?: true

Size: 736 Bytes

Versions: 6837

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,837 entries across 6,832 versions & 33 rubygems

Version Path
ory-client-0.0.1.alpha49 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
ory-client-0.0.1.alpha48 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
ory-client-0.0.1.alpha47 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
ory-client-0.0.1.alpha46 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
ory-client-0.0.1.alpha45 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
ory-client-0.0.1.alpha44 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
ory-client-0.0.1.alpha43 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
ory-client-0.0.1.alpha42 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
ory-client-0.0.1.alpha41 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
ory-client-0.0.1.alpha40 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
ory-client-0.0.1.alpha39 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
ory-client-0.0.1.alpha38 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
ory-client-0.0.1.alpha37 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
ory-client-0.0.1.alpha36 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
ory-kratos-client-0.8.2.alpha1 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
ory-client-0.0.1.alpha31 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
primary_connect_proto-0.4.0 vendor/bundle/ruby/2.6.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
primary_connect_proto-0.3.0 vendor/bundle/ruby/2.6.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
primary_connect_proto-0.2.0 vendor/bundle/ruby/2.6.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
primary_connect_proto-0.1.0 vendor/bundle/ruby/2.6.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb