Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find file modes in console (fuzzy completion)

Is there any way to get in the console a functionality like ido find file mode for Emacs?

For those not familiar with it is a way to recuresevely find files with autocomplete functionality (with no need of TAB), I think is can be also called fuzzy completion.

You can see a video of what I'm talking about here: Find File in Emacs

like image 548
Fernando Diaz Garrido Avatar asked Mar 01 '11 12:03

Fernando Diaz Garrido


People also ask

What is fuzzy file search?

A fuzzy search is a technique that uses search algorithms to find strings that match patterns approximately. It's particularly useful for helping users find webpages without having to know exactly what they're looking for or how a word is spelled.


2 Answers

I've started work on a bash completion module to do (non-recursive) fuzzy completion. It currently works, but with a few quirks I'm trying to iron out.

https://github.com/mgalgs/fuzzy_bash_completion

Usage:

source fuzzy_bash_completion
source fuzzy_log_setup_functions

# easy-setup for many commands if you use the bash_completion package
fuzzy_replace_filedir_xspec
# or, for individual commands:
fuzzy_setup_for_command cd # set up fuzzy completion for cd

More usage info on the github page.

like image 111
mgalgs Avatar answered Sep 27 '22 19:09

mgalgs


No, there isn't. You can read up on how to extend the completion behaviour within bash here: Programmable-Completion-Builtins

like image 27
Rob Kielty Avatar answered Sep 27 '22 17:09

Rob Kielty