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

Support for git diffs #413

Open Jasha10 opened 2 years ago

Jasha10 commented 2 years ago

In git diffs, there are sometimes lines that look like this:

index f80b65d..c8f438a 100644
--- a/tests/test_signature_parsing.py
+++ b/tests/test_signature_parsing.py
@@ -317,7 +317,7 @@ def expects_int(x: int) -> int:

fpp picks up on the path a/tests/test_signature_parsing.py, but that path has a prefix a/ that is not desired (i.e. tests/test_signature_parsing.py would be prefered).

I wonder: what is the best way for me (as a user) to handle this use-case? I.e. I would like to perform some processing of the selected path(s), e.g. using sed, before passing the paths to a command or opening with an editor.