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-kratos-client-0.7.5.alpha2 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
mx-platform-ruby-0.4.0 vendor/bundle/ruby/2.6.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
mx-platform-ruby-0.3.2 vendor/bundle/ruby/2.6.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
mx-platform-ruby-0.3.1 vendor/bundle/ruby/2.6.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/pry-0.14.1/lib/pry/commands/shell_mode.rb
passbase-1.3.0 vendor/bundle/ruby/2.7.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
pry-0.14.1-java lib/pry/commands/shell_mode.rb
pry-0.14.1 lib/pry/commands/shell_mode.rb
mfk_openapi_ruby_client-1.0.0 vendor/bundle/ruby/2.7.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
pry-0.14.0-java lib/pry/commands/shell_mode.rb
pry-0.14.0 lib/pry/commands/shell_mode.rb
qiita_org-0.1.35 gems/ruby/2.7.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
qiita_org-0.1.34 gems/ruby/2.7.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
qiita_org-0.1.33 gems/ruby/2.7.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
qiita_org-0.1.32 gems/ruby/2.7.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
qiita_org-0.1.31 gems/ruby/2.7.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
qiita_org-0.1.30 gems/ruby/2.7.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
qiita_org-0.1.29 gems/ruby/2.7.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
passbase-1.2.0 vendor/bundle/ruby/2.7.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb
qiita_org-0.1.28 gems/ruby/2.7.0/gems/pry-0.13.1/lib/pry/commands/shell_mode.rb