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