junegunn / fzf

:cherry_blossom: A command-line fuzzy finder
https://junegunn.github.io/fzf/
MIT License
65.54k stars 2.41k forks source link

Literal option for extended mode #24

Closed muellerj closed 10 years ago

muellerj commented 10 years ago

The behaviour in Sublime-Text, CtrlP etc. fuzzy-finders defaults to treating space-seperated chunks as exact-search patterns. If I have a directory structure like so for example

.
└── Projects
    └── asd
        ├── make.m
        └── Makefile

I would like to be able to enter pro asd make in order to get to the 2 files. In extended mode however, I need to quote the chunks individually:

search_with_apostrophes (desired behaviour, but typing apostophes is annoying)

search_without_apostrophes (no apostrophes lead to undesired behaviour)

Would it be possible to make the default behaviour in extended mode look for exact matches? Baring that, maybe a different mode -X, which has that behaviour?

junegunn commented 10 years ago

Okay, seems like a nice idea. (Let's keep it simple and not introduce "un-quoting" operator :smiley:) But it should definitely be another mode. We should not break backward compatibility. I'll let you know when it's done.

junegunn commented 10 years ago

Now you can use the new -e (or --extended-exact) option. Let me know if you run into any problem. Thanks.

muellerj commented 10 years ago

Works like a charm - Thanks :thumbsup: