kyu08 / fzf-make

A command line tool that executes make target using fuzzy finder with preview window.
MIT License
77 stars 10 forks source link
cli crates-io fuzzy-finder fzf hacktoberfest make makefile ratatui rust terminal tui
`fzf-make` is a command line tool that executes make target using fuzzy finder with preview window. ![License:MIT](https://img.shields.io/static/v1?label=License&message=MIT&color=blue&style=flat-square) [![Latest Release](https://img.shields.io/github/v/release/kyu08/fzf-make?style=flat-square)](https://github.com/kyu08/fzf-make/releases/latest) [![crates.io](https://img.shields.io/crates/v/fzf-make?style=flatflat-square)](https://crates.io/crates/fzf-make) ![Crates.io Total Downloads](https://img.shields.io/crates/d/fzf-make)

[English] [Deutsch] [Français]

🛠️ Features

👓 Prerequisites

📦 Installation

macOS

Homebrew

You don't need to install bat because fzf-make will install it automatically via Homebrew.

# install
brew install kyu08/tap/fzf-make
# update 
brew update
brew upgrade fzf-make

Arch Linux

fzf-make can be installed from the AUR using an AUR helper. For example:

paru -S fzf-make

NixOS / Nix (package manager)

fzf-make can be run from the repository (latest version)

nix run github:kyu08/fzf-make

Or from the nixpkgs (channel >= 23.05)

nix run nixpkgs#fzf-make

Note You may need to enable experimental feature. In that case, execute the following command to enable them echo "experimental-features = nix-command flakes" | tee ~/.config/nix/nix.conf

OS-independent method

Cargo

cargo install --locked fzf-make

💡 Usage

Run target using fuzzy finder

  1. Execute fzf-make in the directory include makefile(file name should be one of GNUmakefile, makefile, Makefile)
  2. Select make command you want to execute. If you type some characters, the list will be filtered. demo demo

Run target from history

  1. Execute fzf-make in the directory include makefile(file name should be one of GNUmakefile, makefile, Makefile)
  2. Press Tab to move to the history pane.
  3. Select make command you want to execute. demo

Commands Supported

Command Description
fzf-make Launch fzf-make
fzf-make --repeat / fzf-make -r / fzf-make repeat Execute last executed target
fzf-make --history / fzf-make -h / fzf-make history Launch fzf-make with the history pane focused
fzf-make --help / fzf-make help Show help
fzf-make --version / fzf-make -v / fzf-make version Show version

💻 Development

  1. Clone this repository
  2. Change the codes
  3. Run make run

To execute test, run make test(needs nextest).

nix

Or you can use nix to create a development shell with the project dependencies.

Within the repo root, execute the following command:

nix develop

👥 Contribution

🗒 Related Article(s)