fuzzy_file_finder

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

  • Owner: jamis/fuzzy_file_finder
  • Platform:
  • License:: Other
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

= 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.

Main metrics

Overview
Name With Ownerjamis/fuzzy_file_finder
Primary LanguageRuby
Program languageRuby (Language Count: 1)
Platform
License:Other
所有者活动
Created At2008-10-09 20:49:48
Pushed At2014-07-28 03:55:03
Last Commit At2014-07-27 21:55:03
Release Count0
用户参与
Stargazers Count143
Watchers Count4
Fork Count14
Commits Count19
Has Issues Enabled
Issues Count2
Issue Open Count0
Pull Requests Count0
Pull Requests Open Count0
Pull Requests Close Count1
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private