Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A (slightly enhanced) implementation of TextMate's cmd-T lookup functionality, in Ruby, for embedding in other projects

branch: master

Now possible to ignore file hierarchies.

For example, if there's a tmp/ directory with 100k subdirectories,
scanning can be made a lot faster by ignoring "*/tmp".
latest commit f83cbc6d89
Otto Hilska mutru authored December 04, 2009
Octocat-spinner-32 lib Now possible to ignore file hierarchies. December 04, 2009
Octocat-spinner-32 .gitignore Added support for multiple search roots to FuzzyFileFinder, passed in… October 11, 2008
Octocat-spinner-32 LICENSE initial commit October 09, 2008
Octocat-spinner-32 Manifest initial commit October 09, 2008
Octocat-spinner-32 README.rdoc initial commit October 09, 2008
Octocat-spinner-32 Rakefile initial commit October 09, 2008
Octocat-spinner-32 fuzzy_file_finder.gemspec version bump October 12, 2008
README.rdoc

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.

INSTALL:

LICENSE:

All code, documentation, and related materials in this project are released into the PUBLIC DOMAIN. Usage, modification, and distribution are allowed without restriction.

Something went wrong with that request. Please try again.