Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tarruda/zsh-fuzzy-match

ZLE widget for interactively finding stuff, inspired by VIM CtrlP/Command-T plugins
https://github.com/tarruda/zsh-fuzzy-match

Last synced: about 1 month ago
JSON representation

ZLE widget for interactively finding stuff, inspired by VIM CtrlP/Command-T plugins

Awesome Lists containing this project

README

        

This project alpha software and not being maintained, I don't recommend using it. Here are better alternatives:

- [fzf](https://github.com/junegunn/fzf)
- [selecta](https://github.com/garybernhardt/selecta)

##Zsh-Fuzzy-Match

Zsh-Fuzzy-Match is a ZLE widget for interactively finding stuff, inspired by Vim's [CtrlP][control-p] and [Command-T][command-t] plugins.

[control-p]: https://github.com/kien/ctrlp.vim
[command-t]: https://github.com/wincent/Command-T

###Installation

```zsh
$ git clone git://github.com/tarruda/zsh-fuzzy-match.git $HOME/.zsh-fuzzy-match
$ echo 'source $HOME/.zsh-fuzzy-match/fuzzy-match.zsh' >> $HOME/.zshrc
```

###Basic Usage

CTRL+T is the default binding to activate the widget, it can be overridden
by invoking `'bindkey [KEYS] fuzzy-match'` before sourcing the main file.

When the widget is running, type parts of a filename and it will list zsh glob
matches, which can be selected using arrows.

If you invoke the widget with an empty zle buffer, it will open the file in your
$EDITOR.

You can also start typing a command(eg: 'rm' or 'vi') and then invoke the
widget, when the filename is selected it will be appended to your command line.

###Configuration

Ignore patterns can be specified with a '.fuzzy-match-ignore' in the working
directory or '.global.fuzzy-match-ignore' in home directory.

Each line should contain a zsh-like ignore pattern, with the following remarks:

- If starts with a '/', the pattern is considered relative to the starting
directory instead of the directory currently being scanned
- If ends with a '/', the pattern is a directory-ignore pattern(it wont descend
into directories that match the pattern)
- Single line comments are allowed with '#'

####Examples

Ignore all css files inside the 'compiled' directory in the project root:

```
/compiled/*.css
```

Ignore all .min.js/.min.css files:

```
*.min.(css|js)
```

Here's a good .global.fuzzy-match-ignore:

```
/.(git|svn|bzr|hg)/ # VCS special dir
/node_modules/ # node.js dependencies directory
*.min.(js|css) # minified files
*~ # vim undo files
*.swp # vim swap files
*.pyc # python compiled
*.zwc # zsh compiled
```