Earlier quoted context omitted.
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!
The fact that it just outputs to stdout means you can run any command with output from fzf as well. Just anycommand $(fzf)
Facebook PathPicker
91–100 of 168 posts
Re: Facebook PathPicker
#92Re: Facebook PathPicker
#93I have a similar workflow already that may be of use to vim users. I pipe file lists (from grep etc) into vim (using a '-' to tell vim to read from stdin): grep -nri searchterm * | vim - You can then use 'gF' over a file name to open the file in question (and be taken to the right line number if specified in the form somefile.txt:42). You can use ' gF' to open the file in a new tab, or ' F' to open the file in a spli…
Re: Facebook PathPicker
#94Hey 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.
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. Enter
11. Spacebar
12. ESC
I can do the work of 2-3 admins, and I'm faster than poorly-written scripts.Re: Facebook PathPicker
#95But 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
Re: Facebook PathPicker
#96Earlier quoted context omitted.
@rmc we have a dependency on a bash script as well, since we need to redirect stdin to tty input and such. So getting the bash file to distribute with PIP and symlink as well was slightly complicated. I only recently realized that the entire program could be ported over to python (the stdin redirection is supported in python as well) but I still think homebrew is slightly more popular than having pip installed, espec…
pip would probably be a lot better from a cross-platform perspective then something really obscure like linuxbrew.
Re: Facebook PathPicker
#97Earlier quoted context omitted.
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
I think if you added the ability to traverse directories, that would take this tool to the next level. I kind of expected the tool to be similar to NERD Tree or Vim's explorer, which would be incredibly useful.
Re: Facebook PathPicker
#98As an alternative, I usually just run ag to search files inside Emacs, and use Emacs to navigate the results.
Re: Facebook PathPicker
#99Dozens of cool utilities like this are created every week and launched at Show HN, but without "Facebook" in their names you need at least 10 of them to get the many points this thread has gathered.
Same goes for Google, but you could argue that it's for a reason. FB/Google have a reputation to uphold and they strive to make sure their name isn't associated with subpar stuff. Plus, they have a lot of brilliant developers to work on this stuff. In the end of the day, it's largely about knowing which of these cool utilities have a better chance of being usable and well thought-out, as nobody wants to spend time on…
Re: Facebook PathPicker
#100However, he authors/documentation seem to be confused about bash vs shell. In the documentation these terms seems to be used interchangeably. In the code, the main script depends on bash directly (and for it to be installed in a very particular place) but does not seem to use any bash-specific features. However, the script it launches at the end is launched via "sh" which is not bash, so if there're bash specific features in it it would fail.
"PathPicker should work with most Bash environments" -- what does that even mean?