DEV Community 👩‍💻👨‍💻

Oliver Burn
Oliver Burn

Posted on

fzf is my tool discovery of 2018

This year I discovered the command-line tool fzf by accident while experimenting with Vim plugins (long story).

In the words of the website:

It's an interactive Unix filter for command-line that can be used with any list; files, command history, processes, hostnames, bookmarks, git commits, etc.

It very quickly become an indispensable tool that I use on Linux and macOS. Examples of how I use it are:

  • Search my command history.

  • Combined with z it makes it trivial to navigate around previous directories.

  • I use the following script to select an account from the file accounts.ledger before running ledger.

#!/bin/bash
account=$(sed 's/^account //' accounts.ledger | fzf)
if [[ $account != "" ]]; then
    ledger reg $account "${@}"
fi

Top comments (0)

Become a Moderator Can you help us make DEV a better place?

Fill out this survey and help us by becoming a tag moderator here at DEV.