0.0
No commit activity in last 3 years
No release in over 3 years
Matches partial string entries from a list of strings.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.7
>= 3.0.0, ~> 3.0
 Project Readme

fuzzyfinder

Build Status Gem License

Fuzzy Finder implemented in Ruby. Matches partial string entries from a list of strings. Works similar to fuzzy finder in SublimeText, Atom and Vim's Ctrl-P plugin.

How does it work

See Amjith Ramanujam's blog post describing the algorithm: http://blog.amjith.com/fuzzyfinder-in-10-lines-of-python

Installation

Add this line to your application's Gemfile:

# Add to your Gemfile
gem 'fuzzyfinder'

# or install manually
gem install fuzzyfinder

Usage

2.2.1 :001 > require 'fuzzy/finder'
 => true

2.2.1 :002 > Fuzzy::Finder.find('user', ['api_user.doc', 'user_doc.doc', 'django_migrations.py', 'migrations.py'])
 => ["user_doc.doc", "api_user.doc"]

2.2.1 :003 > Fuzzy::Finder.find('djm', ['api_user.doc', 'user_doc.doc', 'django_migrations.py', 'migrations.py'])
 => ["django_migrations.py"]

2.2.1 :004 > Fuzzy::Finder.find('mig', ['api_user.doc', 'user_doc.doc', 'django_migrations.py', 'migrations.py'])
 => ["migrations.py", "django_migrations.py"]

Contributing

  1. Fork it ( https://github.com/mdsrosa/fuzzyfinder/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Inspired by

Amjith Ramanujam's implementation

Thank you Amjith.