Live data from Hacker News

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

andrew-quinn.me

31–40 of 292 posts

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

#31
post #21

jump ( https://github.com/gsamokovarov/jump ) is something I use as I didn’t know about Alt-C. Highly recommended

I’m exactly in the same boat, after using both programs for years. Now I wonder if I can or should unlearn my j muscle memory.

how does it work, where do you use it

does not do anything useful on my mac m1

j '' '' '' '' ''

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

#32
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.

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

#34

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.

The default ctrl+r behavior doesn't allow me to scroll up through my history of matches, which is always disappointing. Often it's some random incantation I'm trying to search for that shares a prefix with other more common commands and the default ctrl+r requires me to type out far enough to be unique, which defeats the purpose of history search. Maybe I'm missing some essential behavior that I'm not familiar with.

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

#36

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.

For me (in a similar role to you) Ctrl+R is the main reason of having fzf. Quality of Life improvement is immense.

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

#37

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…

The default install script asks if you want to install key bindings and adds that to your bashrc. How did you install fzf?

Not parent but on pop-os, using sudo apt install zfz I got the same behavior, had to add it myself to .bashrc

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

#38

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…

The default install script asks if you want to install key bindings and adds that to your bashrc. How did you install fzf?

apt install? There's no way I'm integrating a core tool like that with a crude "curl | zsh" hack. How and when would it get updated? Am I expected to stick that in an Ansible playbook?

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

#40
Here's a little function that I use pretty often when I want to install a package but I'm not sure what the exact package name is. Give it a keyword and it searches apt-cache and dumps the results into fzf.

  function finstall {
      PACKAGE_NAME=$(apt-cache search $1 | fzf | cut --delimiter=" " --fields=1)
      if [ "$PACKAGE_NAME" ]; then
          echo "Installing $PACKAGE_NAME"
          sudo apt install $PACKAGE_NAME
      fi
  }
Post reply on HN