facebook / PathPicker

PathPicker accepts a wide range of input -- output from git commands, grep results, searches -- pretty much anything. After parsing the input, PathPicker presents you with a nice UI to select which files you're interested in. After that you can open them in your favorite editor or execute arbitrary commands.
https://facebook.github.io/PathPicker/
MIT License
5.11k stars 283 forks source link

Don't keep the old selection if --keep-open is specified #398

Closed JonathanAquino closed 3 years ago

JonathanAquino commented 3 years ago

If --keep-open is specified, we should clear the old selection.

Motivation

I like to use ack with fpp, like this:

ack foo | fpp --keep-open

But since fpp doesn't clear the old selection, after I open a file (say, the 12th file) and close it, when fpp reopens, the 12th file is selected. So I need to go down to the 12th file and unselect it before I can choose a new file to open.

Instead, we should simply clear the old selection every time fpp reopens in --keep-open mode.

KapJI commented 3 years ago

It works, thanks!