Live data from Hacker News

So you've installed `fzf` – now what?

andrew-quinn.me

161–170 of 292 posts

Re: So you've installed `fzf` – now what?

#162

I love fuzzy shell history. Game changer in terms of shell productivity. I use atuin[0] instead of fzf as I find the experience a bit nicer and it has history backups built in (disclaimer, I am a maintainer) Some of our users still prefer fzf because they are used to how it fuzzy finds, but we're running an experiment with skim[1] which allows us to embed the fuzzy engine without much overhead - hopefully giving them…

If that's your use case, here's another game changer (one line bashrc change to make bash_history changes immediately, rather than upon shell exit, e.g. when you end your tmux session): https://web.archive.org/web/20090815205011/http://www.cuberi...

Meta question : do you keep the archive.org link of the article in your favorite or did you manually look up the link before posting? Or maybe an extension that does that automatically?

Re: So you've installed `fzf` – now what?

#163

I love fuzzy shell history. Game changer in terms of shell productivity. I use atuin[0] instead of fzf as I find the experience a bit nicer and it has history backups built in (disclaimer, I am a maintainer) Some of our users still prefer fzf because they are used to how it fuzzy finds, but we're running an experiment with skim[1] which allows us to embed the fuzzy engine without much overhead - hopefully giving them…

If that's your use case, here's another game changer (one line bashrc change to make bash_history changes immediately, rather than upon shell exit, e.g. when you end your tmux session): https://web.archive.org/web/20090815205011/http://www.cuberi...

Thank you!! Why on earth isn't that the default. It always seemed weird that with multiple bash windows open, the commands from most of them weren't added to the history.

Re: So you've installed `fzf` – now what?

#164

Earlier quoted context omitted.

If that's your use case, here's another game changer (one line bashrc change to make bash_history changes immediately, rather than upon shell exit, e.g. when you end your tmux session): https://web.archive.org/web/20090815205011/http://www.cuberi...

Thank you!! Why on earth isn't that the default. It always seemed weird that with multiple bash windows open, the commands from most of them weren't added to the history.

My guesses are that it's on-close so you can follow the per-shell history slightly easier (rather than it being interleaved from multiple shells?), or reducing disk writes?

Re: So you've installed `fzf` – now what?

#165

Am I the only one that tried fzf as a replacement to the default Ctrl+R behavior, then switched back? I'm perfectly satisfied with the default Ctrl+R functionality, to the point that fzf seemed to add visual clutter without any value. I guess I was never let down by inverse search. Context: I'm using Linux and doing SWE and SRE work, and constantly live in the terminal.

It's inconceivable to me that someone could prefer the default behavior, but to each their own :)

Re: So you've installed `fzf` – now what?

#166
post #137

I'd never heard of fzf before! It looks like there's a lot of cool stuff you can do with it, but honestly, I think it's worth it even just to replace the frustrating ctrl+R search in bash, which I use a lot, but constantly dislike. I feel like with a lot of these kinds of tools, if I have to actually actively use them, I forget that they exist ('z'[0] ended up being like this for me) and eventually remove them, but s…

https://xkcd.com/1053/

Re: So you've installed `fzf` – now what?

#167

Fantastic article. I was exactly in the situation the article describes, I installed it, then, didn't find a use case. But that's because Ubuntu doesn't come with completion enabled by default. You have to add in your bashrc: if [ -e /usr/share/doc/fzf/examples/key-bindings.bash ]; then source /usr/share/doc/fzf/examples/key-bindings.bash fi The fzf and ubuntu docs don't mention you have to. Couldn't find easily how…

This enables the C-r / M-c / C-t key bindings, but there's also a completion.bash file. This enables the "**" completion trigger, which can contextually complete paths, envvar names or PIDs in commands. (See "Fuzzy completion for bash and zsh" in fzf's readme [1]). Similarly, you can add to your .bashrc:

    if [ -e /usr/share/doc/fzf/examples/completion.bash ]; then
      source /usr/share/doc/fzf/examples/completion.bash
    fi
/usr/share/doc/fzf/README.Debian explains this, as well as the setup for zsh, fish and vim.

[1]: https://github.com/junegunn/fzf#fuzzy-completion-for-bash-an...

Re: So you've installed `fzf` – now what?

#169

I love fuzzy shell history. Game changer in terms of shell productivity. I use atuin[0] instead of fzf as I find the experience a bit nicer and it has history backups built in (disclaimer, I am a maintainer) Some of our users still prefer fzf because they are used to how it fuzzy finds, but we're running an experiment with skim[1] which allows us to embed the fuzzy engine without much overhead - hopefully giving them…

If that's your use case, here's another game changer (one line bashrc change to make bash_history changes immediately, rather than upon shell exit, e.g. when you end your tmux session): https://web.archive.org/web/20090815205011/http://www.cuberi...

FWIW I get a 503 on that URL. Any chance someone can give me that magic one-liner?

Re: So you've installed `fzf` – now what?

#170
post #89

Interesting, I'm of the first kind, who uninstalled it quickly. I use ctrl-r a lot, though I have no issue remembering exact portions of the commands, but that may just be me. I'll give it another try. In the same vein as ripgrep (rg), I recommand the author (and everybody else) to give fd-find (fd) a try as a replacement to find. It's much, much faster (multithreaded search), and has better defaults to use from the…

[deleted]
Post reply on HN