PathPicker

Command-line tool (fpp) that parses piped output for file paths, shows a curses selector, and opens the selected files in $EDITOR or runs a command on them.

install· Homebrew

PathPicker is a command-line tool, invoked as fpp, that reads the output of another program from stdin and extracts entries that look like file paths. It then shows the extracted paths in a curses-based selector UI, where you pick the files you want. Typical inputs are git status, git grep "FooBar", grep -r "FooBar" ., git diff HEAD~1 --stat, hg status, find . -iname "*.js" and arc inlines, each piped into fpp.

After selection, you can open the files in your $EDITOR or enter an arbitrary command to run against them. By default the selected files are appended to the command prefix (for example a git checkout run on the chosen files). If the files need to go in the middle of a command, use the $F token, as in cat $F | wc -l. By default only paths that exist on the filesystem are selectable; the --no-file-checks (-nfc) flag disables this, which is useful for picking deleted files from git status.

Rather than using a parser per program, PathPicker treats all input as noisy text and extracts candidates with regular expressions. The README notes a known limitation: single-word filenames with no extension and no directory prefix (like test) will not match. It is implemented as a bash script plus small Python modules and requires Python 3. Bash is fully supported, zsh is supported without some features such as alias expansion in command line mode, and csh, fish and rc are supported in recent versions. tmux users can add the tmux-fpp plugin to run it on the last stdout. Developers who regularly copy paths out of grep, git or find output are the intended users.

Installation

# via Homebrew
brew install fpp

Alternatives & related tools

add a badge to your README

Maintain PathPicker? Show that it's featured on trmn. The badge links back to this page.

Featured on trmn
Markdown
[![Featured on trmn](https://www.trmn.sh/badge/pathpicker.svg)](https://www.trmn.sh/tools/pathpicker?utm_source=badge)
HTML
<a href="https://www.trmn.sh/tools/pathpicker?utm_source=badge"><img src="https://www.trmn.sh/badge/pathpicker.svg" alt="Featured on trmn" height="20"></a>