Live data from Hacker News

Facebook PathPicker

facebook.github.io

111–120 of 168 posts

Re: Facebook PathPicker

#111

That is great! But when using the command, it does not work with defined bash/zsh aliases. Anyone has any idea how to do that? Say I have "alias g=git", when I use the command "g diff", the following error happens: .fbPager.sh: line 4: g: command not found

same problem here. need to make it aware of my aliases :\

Re: Facebook PathPicker

#112

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.

I'm not sure you know, but just in case, ag also has a -l flag with which it will just spit out the filenames!

Re: Facebook PathPicker

#113
post #80

Haven't we learned by now, my fellow HN readers? All of Facebook's open source "gifts" are patent Trojan horses. Go take a look at their PATENTS file before going anywhere near this stuff. The 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…

Even if this was the case (this was poor wording in the original PATENTS which has since been fixed) you are only subject to these constraints in any code you provide that includes the source code. Since this is a shell tool, that is largely irrelevant. For the same reason, you can compile and release binaries from closed source binaries using gcc even though it is licensed under GPL.

Re: Facebook PathPicker

#116
post #40

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)

Unfortunately using tmux breaks that behavior.

I run tmux and I can CMD+Click hyperlinks and filereferences with linenumbers. I just upgraded to 2.0, maybe you could try that too.

Re: Facebook PathPicker

#118

This is awesome. I wonder if any of this was Emacs inspired. A very common UX in Emacs is to list things in a buffer and directly manipulate the items to execute commands. For example, in dir-mode, you can select multiple files and rename them, or mark several files for deletion and execute it. It really is a fantastic way to bring an interactive interface into a text-based world. This looks like a cool way to bring…

Yes, when I saw the git example I immediately thought of magit for Emacs which can also jump around files and commits from within git results.

Re: Facebook PathPicker

#119

Earlier quoted context omitted.

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.

You sound like a Windows admin living in a Linux/BSD world. I struggle to do everything with Powershell, but almost everything I do has a mouse input. I use a gaming mouse for system administration - a Razer Naga Epic with the 12 thumb buttons. They're a 3x4 array; I bind them to: Row One 1. F5 2. Up arrow 3. F2 Row Two 4. Left arrow 5. Down arrow 6. Right arrow Row Three 7. Tab 8. Delete 9. Backspace Row Four 10. En…

You should use whatever works for you but this strikes me as very bizarre I have to admit. I started out with a mouse as well and I can see this being something I would have attempted if I hadn't just put my head down and forced myself to get used to keeping my hands on the keyboard.

Re: Facebook PathPicker

#120

Earlier quoted context omitted.

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.

I'm only slightly ashamed to admit I like using a mouse. I get that some people can work faster with all-keyboard controls. I use both. I also like GUIs for certain things. The only thing I don't like GUIs for is when there is some repetitive thing that I have to do 50 times a day and would require 3 or 4 clicks or menu selections - for those I'd always rather have a single command. Sometimes I make those into shell…

Might already be familiar with it, but if you aren't, you should check out sikuli script [1] for when you have a repetitive GUI task you have to perform that can't be directly scripted. I've used it to script some really complex workflows through GUI's

It's also just weird and interesting to program something to move through a GUI as fast as is possible

1: http://www.sikuli.org/

Post reply on HN