Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Other uses for fzf:

- Combine it with autojump[1] and quickly navigate to any directory you've navigated to before (sorted by frequency). This is crazy helpful.

- Use it for git branch names

- Use it for ssh locations

[1] https://github.com/wting/autojump



how do I use it with autojump?


Here is the autojump function for fzf/bash

https://github.com/junegunn/fzf/wiki/examples#autojump

You'll have to comment out the j() function in /usr/share/autojump/autojump.sh


autojump -s gets you the entries in the database.

You have to parse it to extract the directories without all the metadata it spits out.

Then you probably need to write a shell function in your preferred shell to tie the pieces together, as well as assign it to a keybinding. It's not too hard.

I use xonsh for my shell, so my config probably won't help. And doing it in xonsh is probably a lot messier than doing it in Bash.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: