Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mdsrosa/fuzzyfinder
FuzzyFinder implemented in Ruby
https://github.com/mdsrosa/fuzzyfinder
Last synced: 2 months ago
JSON representation
FuzzyFinder implemented in Ruby
- Host: GitHub
- URL: https://github.com/mdsrosa/fuzzyfinder
- Owner: mdsrosa
- License: mit
- Created: 2015-10-06T02:11:28.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-23T18:12:54.000Z (about 9 years ago)
- Last Synced: 2024-10-12T21:50:52.285Z (4 months ago)
- Language: Ruby
- Size: 15.6 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fuzzyfinder
[![Build Status](https://travis-ci.org/mdsrosa/fuzzyfinder.svg?branch=master)](https://travis-ci.org/mdsrosa/fuzzyfinder)
[![Gem](https://img.shields.io/gem/v/fuzzyfinder.svg)]()
[![License](https://img.shields.io/badge/license-MIT-blue.svg)]()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](http://blog.amjith.com/fuzzyfinder-in-10-lines-of-python)## Installation
Add this line to your application's Gemfile:```ruby
# Add to your Gemfile
gem 'fuzzyfinder'# or install manually
gem install fuzzyfinder
```## Usage
```ruby
2.2.1 :001 > require 'fuzzy/finder'
=> true2.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](https://github.com/amjith/fuzzyfinder)Thank you Amjith.