Sha256: a85b7b843147f8e67e16828c068a3b7a792177fe3fc402f4d441ac24c82ad841

Contents?: true

Size: 719 Bytes

Versions: 24

Compression:

Stored size: 719 Bytes

Contents

class Pry
  class Command::GemOpen < Pry::ClassCommand
    match 'gem-open'
    group 'Gems'
    description 'Opens the working directory of the gem in your editor.'
    command_options :argument_required => true

    banner <<-'BANNER'
      Usage: gem-open GEM_NAME

      Change the current working directory to that in which the given gem is
      installed, and then opens your text editor.

      gem-open pry-exception_explorer
    BANNER

    def process(gem)
      Dir.chdir(Rubygem.spec(gem).full_gem_path) do
        Pry::Editor.new(_pry_).invoke_editor(".", 0, false)
      end
    end

    def complete(str)
      Rubygem.complete(str)
    end
  end

  Pry::Commands.add_command(Pry::Command::GemOpen)
end

Version data entries

24 entries across 24 versions & 8 rubygems

Version Path
dadapush_client-1.0.1 vendor/bundle/ruby/2.3.0/gems/pry-0.11.3/lib/pry/commands/gem_open.rb
xaiml-0.1.3 vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_open.rb
xaiml-0.1.2 vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_open.rb
xaiml-0.1.1 vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_open.rb
xaiml-0.1.0 vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/gem_open.rb
monero_wallet_gen-0.1.0 vendor/bundle/ruby/2.3.0/gems/pry-0.11.3/lib/pry/commands/gem_open.rb
sb_prime_table-0.1.1 vendor/bundle/ruby/2.4.0/gems/pry-0.11.3/lib/pry/commands/gem_open.rb
sb_prime_table-0.1.0 vendor/bundle/ruby/2.4.0/gems/pry-0.11.3/lib/pry/commands/gem_open.rb
comiditaULL-0.1.1 vendor/bundle/ruby/2.3.0/gems/pry-0.11.2/lib/pry/commands/gem_open.rb
comidita_ull-0.1.1 vendor/bundle/ruby/2.3.0/gems/pry-0.11.2/lib/pry/commands/gem_open.rb
comidita_ull-0.1.0 vendor/bundle/ruby/2.3.0/gems/pry-0.11.2/lib/pry/commands/gem_open.rb
pry-0.11.3 lib/pry/commands/gem_open.rb
pry-0.11.3-java lib/pry/commands/gem_open.rb
pry-0.11.2 lib/pry/commands/gem_open.rb
pry-0.11.2-java lib/pry/commands/gem_open.rb
tdiary-5.0.6 vendor/bundle/gems/pry-0.11.0/lib/pry/commands/gem_open.rb
pry-0.11.1 lib/pry/commands/gem_open.rb
pry-0.11.1-java lib/pry/commands/gem_open.rb
pry-0.11.0 lib/pry/commands/gem_open.rb
pry-0.11.0-java lib/pry/commands/gem_open.rb