Live data from Hacker News

Facebook PathPicker

facebook.github.io

21–30 of 168 posts

Re: Facebook PathPicker

#22
post #18

This looks great. Is there a streamlined install for Ubuntu?

@andyl We are working on getting a linuxbrew recipe working. There's shouldn't be anything blocking this from working on linux systems (assuming Python 2.7 is installed).

In the meantime you can try the manual installation method listed in the README: https://github.com/facebook/pathpicker/

@itsbits Why do you say that? curious if you found anything

Re: Facebook PathPicker

#23
post #18

This looks great. Is there a streamlined install for Ubuntu?

@andyl We are working on getting a linuxbrew recipe working. There's shouldn't be anything blocking this from working on linux systems (assuming Python 2.7 is installed). In the meantime you can try the manual installation method listed in the README: https://github.com/facebook/pathpicker/ @itsbits Why do you say that? curious if you found anything

I just tried to git clone it with

    $ sudo git clone git@github.com:facebook/PathPicker.git
    Cloning into 'PathPicker'...
    Permission denied (publickey).
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
Any ideas? Thanks.

EDIT: Nevermind. It's an issue with using sudo to git. I can use my own account, but I can't do it in /usr/local.

Re: Facebook PathPicker

#24
One of the best little-known features of iTerm2 is Semantic History. Cmd-click on filenames and they will be opened by the default application (or you can configure an action to be performed). It's working directory aware and works great with all output. I connected it to Sublime and it even works with line numbers.

(Same works for URLs, with the default browser)

Re: Facebook PathPicker

#25
Some people, when confronted with a command line problem, think "I know, I'll use my mouse." Now they have two problems.

I'm joking, and this looks neat, but the optimal solution is almost certainly to keep your hands on the keyboard while in the shell.

Re: Facebook PathPicker

#26

Hey 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…

Thank you for making the mouse a thing in a keyboard driven world. As someone who grew up with gaming and learned IT as a result I never was able to fully give up on the mouse during my daily workflows. I admire people who can use VIM etc only by keyboard, but my muscle memory just says: mouse.

Thanks for establishing something that embraces this.

Re: Facebook PathPicker

#27

Hey 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…

> so I'd see a lot of (new) engineers select the text with their mouse

What did the more experienced engineers do differently?

Re: Facebook PathPicker

#28
post #27

Hey 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…

> so I'd see a lot of (new) engineers select the text with their mouse What did the more experienced engineers do differently?

A lot of the more experienced engineers had cooked up their own regexes / bash aliases / crazy combination of vim macros to handle the above, but everyone had their own one-off solution that was either hard to learn or hard to generalize. The demand was definitely there though which was part of what got us motivated to build something anyone could use and learn.

Re: Facebook PathPicker

#29

One of the best little-known features of iTerm2 is Semantic History. Cmd-click on filenames and they will be opened by the default application (or you can configure an action to be performed). It's working directory aware and works great with all output. I connected it to Sublime and it even works with line numbers. (Same works for URLs, with the default browser)

Holy crap, that's amazing. I had no idea, thanks for spreading the word.

Re: Facebook PathPicker

#30

Hey 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…

Oh wow, thanks! I was just thinking about this today - how I'm always cut-and-pasting file paths from ag (silver surfer) results at the console. One thing I noticed: FPP gets confused by filenames with multiple dots. If a file is named for example "dev_backup.ldif.gz", FPP thinks that "ldif.gz" is the entire file name.

Yep, this is where our regexes start to fall short. Mind opening a github issue for this? We can likely add another option in our "fallback" regex, but it's a fine line to draw between overmatching and undermatching.

For instance, we currently match on "add/remove" output from git status which is less than fortunate. For performance reasons we don't actually go check if each of those files exists (since sometimes you want to pipe hundreds of results into fpp [EDIT: and are using an expandrive or network mount])

Post reply on HN