Git Product home page Git Product logo

ff's Introduction

fuzzy-find: fuzzy completion for finding files

ff searches a directory tree with basic fuzzy-completion. I wrote it because find -name "blah" only scans filenames (not their parent directories), and regular expressions for fuzzy completion are cumbersome.

Searching for "aeiou" will print any paths that match the RE .*a.*e.*i.*o.*u.*.

By default, ff searches recursively from the current directory, but its search root can be set with the -r option.

ff query strings are not regular expressions - characters such as '.' and '-' match literally. Any sections enclosed in '/'s will be required to match within the same path element, and the consecutive match character (default '=') toggles exact matching. (I chose '=' because it doesn't mean anything in basic REs and it's unshifted on most keyboards.)

See also: compound-completion

Installation

Just run make. I mean, it's one C file. The makefile is just ff: ff.c. Copy ff somewhere in your path.

Example

ff aeiou matches both ~/and/the/first/one/used.txt and ~/after_the_furious_ultimatum.txt, because the characters 'a', 'e', 'i', 'o', and 'u' appear sequentially.

ff a/e/i/o/u only matches ~/and/the/first/one/used.txt, since the /s force each vowel to appear in its own directory element.

ff ae=iou= would only match ~/after_the_furious_ultimatum.txt, since it matches an 'a', then an 'e', then the =s specify a consecutive "iou" string.

Usage

ff [-diltR] [-c char] [-n count] [-r root] query
-c CHAR   char to toggle Consecutive match (default: '=')
-d        show Dotfiles
-D        only show directories
-h        print this Help
-i        case-Insensitive search
-l        follow Links (warning: no cycle detection)
-t        run Tests and exit
-r ROOT   set search Root (default: .)
-R        don't recurse subdirectories

Build Status

Build Status

ff's People

Contributors

joshmoore avatar silentbicycle avatar sw17ch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ff's Issues

Tagged version

I'd like to submit a formula for fuzzy-find to Homebrew (mxcl/homebrew), but they require all submitted formulae to have tagged releases. Would it be possible to tag a stable version of fuzzy-find?

double '/'s between paths

Under some conditions (mainly, following the root directory), extra '/'s get inserted in the path, leading to paths like "/home/scott//tmp/...". While generally harmless, this is a bit annoying.

Man page?

Hi there. Thanks for making this. It's SOOOOOOOOOPER useful and has already become part of my typical workflow.

I was wondering it, perchance, you could include a proper man page in the future (even if it just contains the information in the README. I install the utility via Homebrew on Mac OS X and I'm always surprised when I type 'man CMD' for a Homebrew installed utility and get an error. That's especially true of the ones I use quite often.

Thanks much for your work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.