https://github.com/hauntedhost/fzf-ex
Fuzzy Elixir module search
https://github.com/hauntedhost/fzf-ex
Last synced: 8 months ago
JSON representation
Fuzzy Elixir module search
- Host: GitHub
- URL: https://github.com/hauntedhost/fzf-ex
- Owner: hauntedhost
- Created: 2024-06-11T18:28:25.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-20T17:19:30.000Z (almost 2 years ago)
- Last Synced: 2024-06-21T11:24:55.211Z (almost 2 years ago)
- Language: Shell
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fzf-ex
fzf-ex is a command-line fuzzy finder for all module names in an Elixir Mix project. It's powered by [fzf](https://github.com/junegunn/fzf) and [bat](https://github.com/sharkdp/bat).

https://github.com/hauntedhost/fzf-ex/assets/81008/b7611b23-9998-4ef2-be00-2023074c9056
## Installation
1. Ensure that [fzf](https://github.com/junegunn/fzf) and [bat](https://github.com/sharkdp/bat) are installed:
```
brew install fzf bat
```
2. Clone repo to `~/.fzf-ex`
```shell
git clone https://github.com/hauntedhost/fzf-ex.git ~/.fzf-ex
```
3. Add PATH to `.zshrc` or `.bashrc`, etc
```shell
PATH="~/.fzf-ex:$PATH"
```
4. (Optional) Bind CTRL+S to launch search
```shell
# ~/.zshrc
run-fzf-ex() {
echo ""
fzf-ex
echo "\n"
zle reset-prompt
}
zle -N run-fzf-ex
bindkey '^S' run-fzf-ex
```
```shell
# ~/.bashrc (untested)
run_fzf_ex() {
echo ""
fzf-ex
echo -e "\n"
PS1="$PS1"
}
bind -x '"\C-s": run_fzf_ex'
```
## Usage
In the root of any Elixir Mix project press your bind key from step #3 above, or manually run:
```shell
$ fzf-ex
```
On the first run it will create the index. After 24 hours it will prompt you to reindex. You can reindex manually anytime with:
```shell
$ fzf-index
```