Live data from Hacker News

Facebook PathPicker

facebook.github.io

51–60 of 168 posts

Re: Facebook PathPicker

#52
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?

When I was there, I would literally just never close files related to what I was working on. I had editor sessions lasting months so I didn't have to reopen all of my files.

Re: Facebook PathPicker

#53
post #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.

And with this tool you do exactly that? Instead of selecting the filenames with your mouse, you keep hands on keyboard and select with arrow keys.

Re: Facebook PathPicker

#55

Earlier quoted context omitted.

@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.

Just try using git over https. You probably have your own key to github.com and the server will access deny it when accessing someone else's repo.

Re: Facebook PathPicker

#56
Is there a way of using this with instructions that take only one parameter, akin to xargs or parallel?

i.e. Instead of calling `command file1 file2 file3 ...` it would call `command file1; command file2; command file3; ...`?

Re: Facebook PathPicker

#57
post #43

Earlier 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?

I think to have usable matching you're going to have to go that way, unless you want to write custom parsing code for each command's output.

Re: Facebook PathPicker

#58
cool idea, thanks for sharing! for some reason, everything is working but the ability to move up and down, regardless of whether i use arrow keys or j/k. any ideas?

EDIT: should note i am using iTerm on a Mac

Re: Facebook PathPicker

#60

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)

I wish that I could have iTerm2 for windows (where I use conemu) and Linux (guake has similar features, but an alien ui imho)... I tend to really like tabbed console sessions, and usually have a few local and ssh sessions open at a time while working.
Post reply on HN