Sha256: 0c832d58a9ec57e64774e4f380b4e7e55baf6d58221d65741a77b47cfc5c20eb

Contents?: true

Size: 575 Bytes

Versions: 16

Compression:

Stored size: 575 Bytes

Contents

You can create a custom command in pry to reuse fast in any session.

Start simply dropping it on your `.pryrc`:

```ruby
Pry::Commands.block_command "fast", "Fast search" do |expression, file|
  require "fast"
	files = Fast.ruby_files_from(file || '.')
  files.each do |f|
     results = Fast.search_file(expression, f)
		 next if results.nil? || results.empty?
     output.puts Fast.highlight("# #{f}")

     results.each do |result|
       output.puts Fast.highlight(result)
     end
  end
end
```

And use it in the console:

```pry
fast '(def match?)' lib/fast.rb
```

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ffast-0.2.2 docs/pry-integration.md
ffast-0.2.0 docs/pry-integration.md
ffast-0.1.9 docs/pry-integration.md
ffast-0.1.8 docs/pry-integration.md
ffast-0.1.7 docs/pry-integration.md
ffast-0.1.6 docs/pry-integration.md
ffast-0.1.5 docs/pry-integration.md
ffast-0.1.4 docs/pry-integration.md
ffast-0.1.3 docs/pry-integration.md
ffast-0.1.2 docs/pry-integration.md
ffast-0.1.1 docs/pry-integration.md
ffast-0.1.0 docs/pry-integration.md
ffast-0.0.9 docs/pry-integration.md
ffast-0.0.8 docs/pry-integration.md
ffast-0.0.7 docs/pry-integration.md
ffast-0.0.6 docs/pry-integration.md