Earlier quoted context omitted.
Very cool tool. Just curious as to why directories are not selectable. I did "ls | fpp" and everything got listed (directories and files) but only the files were selectable.
Yeah, we don't match on directories since the regex would overmatch other results (we would basically have to match anything that is words with a slash). However if we added support for checking for file / directory existence we could definitely add support for that
Facebook PathPicker
71–80 of 168 posts
Re: Facebook PathPicker
#72I use fzf[0] for similar purposes. [0] https://github.com/junegunn/fzf
Yeah fzf is great -- there are a few differences since PathPicker can execute any command with the selected file(s) (rather than just write it to stdout) and runs in tmux with no issues, but fzf has great vim integration and I believe actually verifies the file matches. Glad more people are working in the productivity space though!
anycommand $(fzf)
Re: Facebook PathPicker
#73Hey guys, great tool. Just want to point out it doesn't play well with ack (a better grep) because ack does not prepend a "./" to the file list returned from "ack -l 'foo'". Any way to make it work with the following: junk/foo/bar.txt instead of just ./junk/foo/bar.txt ?
Re: Facebook PathPicker
#74Hey everyone, I'm in the main engineer on this project if anyone has questions. Facebook has a large codebase, so naturally we have a lot of long filenames and paths. It's a pain to type these out by hand, so I'd see a lot of (new) engineers select the text with their mouse before pasting it into the command line. This is pretty inefficient and I knew there had to be a better way, so a few of us started hacking on a…
I've been using Pick by Thoughtbot [1] for the same purpose, but if I understand correctly fpp will automatically extract file paths from any command without me needing to chain in awk/grep ?
Re: Facebook PathPicker
#75Re: Facebook PathPicker
#76Re: Facebook PathPicker
#77Hey everyone, I'm in the main engineer on this project if anyone has questions. Facebook has a large codebase, so naturally we have a lot of long filenames and paths. It's a pain to type these out by hand, so I'd see a lot of (new) engineers select the text with their mouse before pasting it into the command line. This is pretty inefficient and I knew there had to be a better way, so a few of us started hacking on a…
I have been thinking about a more general tool that allows you to select text in different ways from some input, and either copy the selection into your paste ring or as fpp does. I am still thinking about different selection modes and how the UI would work. Usually I see a need to either copy several full lines, or columns from a table like structure (rectangle selection) or from a regex. Looks good so far!
Re: Facebook PathPicker
#78Earlier quoted context omitted.
[pierce@plo-pro team15]$ time (find . -print0 | xargs -0 stat -f '%N' | wc -l) 4901 real 0m0.079s user 0m0.043s sys 0m0.060s
@ploxiln -- edited my comment explaining a lot of devs here use network mounts (in which case checking for existence takes a lot longer). I'd love to explore this though, either behind a config setting or eventually as the default behavior! What do you think?
You could also check in the background and update the display if the heuristic turned out wrong.
Re: Facebook PathPicker
#79Hey everyone, I'm in the main engineer on this project if anyone has questions. Facebook has a large codebase, so naturally we have a lot of long filenames and paths. It's a pain to type these out by hand, so I'd see a lot of (new) engineers select the text with their mouse before pasting it into the command line. This is pretty inefficient and I knew there had to be a better way, so a few of us started hacking on a…
This looks very cool - thank you. I've been using Pick by Thoughtbot [1] for the same purpose, but if I understand correctly fpp will automatically extract file paths from any command without me needing to chain in awk/grep ? [1] https://robots.thoughtbot.com/announcing-pick
Re: Facebook PathPicker
#80The fact that Facebook, at such a level of wealth and success, gets away with this stuff is despicable. It's also an insult to the great legacy of companies like Sun, which gave freely without strangling its beneficiaries. It says a lot about the culture and leadership at the company, but that's been well-documented...
If you're a passionate engineer at Facebook working on an open source project, please go work on it somewhere else!