https://github.com/jamis/fuzzy_file_finder
A (slightly enhanced) implementation of TextMate's cmd-T lookup functionality, in Ruby, for embedding in other projects
https://github.com/jamis/fuzzy_file_finder
Last synced: 7 months ago
JSON representation
A (slightly enhanced) implementation of TextMate's cmd-T lookup functionality, in Ruby, for embedding in other projects
- Host: GitHub
- URL: https://github.com/jamis/fuzzy_file_finder
- Owner: jamis
- License: other
- Created: 2008-10-09T20:49:48.000Z (over 17 years ago)
- Default Branch: master
- Last Pushed: 2014-07-28T03:55:03.000Z (almost 12 years ago)
- Last Synced: 2025-06-20T10:01:19.990Z (12 months ago)
- Language: Ruby
- Homepage:
- Size: 141 KB
- Stars: 143
- Watchers: 4
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- License: LICENSE
Awesome Lists containing this project
README
= FuzzyFileFinder
FuzzyFileFinder is a (somewhat improved) implementation of TextMate's "cmd-T" functionality. It allows you to search for a file by specifying a pattern of characters that appear in that file's name. Unlike TextMate, FuzzyFileFinder also lets you match against the file's directory, so you can more easily scope your search.
== FEATURES:
* Quickly search directory trees for files
* Avoids accidentally scanning huge directories by implementing a ceiling (default 10,000 entries)
* Simple highlighting of matches to discover how a pattern matched
== SYNOPSIS:
In a nutshell:
require 'fuzzy_file_finder'
finder = FuzzyFileFinder.new
finder.search "app/blogcon" do |match|
puts "[%5d] %s" % [match[:score] * 10000, match[:highlighted_path]]
end
matches = finder.find("app/blogcon").sort_by { |m| [-m[:score], m[:path] }
matches.each do |match|
puts "[%5d] %s" % [match[:score] * 10000, match[:highlighted_path]]
end
See FuzzyFileFinder for more documentation, and links to further information.
== LICENSE:
All code, documentation, and related materials in this project are released into the PUBLIC DOMAIN. Usage, modification, and distribution are allowed without restriction.