Live data from Hacker News

Fzf – a command-line fuzzy finder

github.com

21–30 of 93 posts

Re: Fzf – a command-line fuzzy finder

#21
Fzf was life changing when I first stumbled on it. Even cooler was the rabbit hole it led me down. Through fzf I discovered fd, bat, delta, and rg.

That first exposure to fzf brought the biggest change to my workflow in years.

Re: Fzf – a command-line fuzzy finder

#23
post #17

Earlier quoted context omitted.

It’s great how scriptable it is. E.g. it’s relatively easy to use it with kubectl to to browse and inspect k8s resources. Any command where you might be generating a long list of items you then want to select from can probably benefit from being piped into fzf.

Have started using kubectl lately, and would be interested to know how you use fzf. I’m finding I have to do a lot to copying and pasting of pod names in between commands.

You can do a fair amount of stuff with k9s, which is a nice tool.

But if you need to to do something more specialized you can pipe the output of a kubectl command into fzf and then use the ‘describe’ sub command on the selected item returned by fzf. Basically when you need to interact in someway then run a command on the output fzf can be great.

Re: Fzf – a command-line fuzzy finder

#24

ripgrep[1] is usually mentioned in the same breath. I use them both daily. Truly indispensable. [1] https://github.com/BurntSushi/ripgrep

Seconded. Fzf didn't stick with me, but Ripgrep I use a dozen times an hour. It's incredibly fast, and mostly does exactly what I want.

Re: Fzf – a command-line fuzzy finder

#25
Another wonderful tool is "entr". It just runs a program when files change.

It's incredible.

I use it 20-40 times an hour to do very fast Dev/DevOps development:

- "run Pytest when Python files change" - "I forgot how to use ps, run my-ps.sh when it changes and show me the output" - "rebuild all these Kubernetes resources when I edit the YAML files" - "run fast lint, then unit test Python files, then invoke one and show me the results"

Link: https://jvns.ca/blog/2020/06/28/entr/

Re: Fzf – a command-line fuzzy finder

#27

Another wonderful tool is "entr". It just runs a program when files change. It's incredible. I use it 20-40 times an hour to do very fast Dev/DevOps development: - "run Pytest when Python files change" - "I forgot how to use ps, run my-ps.sh when it changes and show me the output" - "rebuild all these Kubernetes resources when I edit the YAML files" - "run fast lint, then unit test Python files, then invoke one and s…

Wow! Thanks

Re: Fzf – a command-line fuzzy finder

#28

If you still don't know how useful fzf is, you should start with integrating fzf and ctrl+r (reverse search).

How do you do this, by the way? I used sudo apt install fzf and then realized I still have to set up the ctrl-r part.

I think I installed it differently on other systems previously, and those installs took care of the integration for me.

Re: Fzf – a command-line fuzzy finder

#30

If you still don't know how useful fzf is, you should start with integrating fzf and ctrl+r (reverse search).

How do you do this, by the way? I used sudo apt install fzf and then realized I still have to set up the ctrl-r part. I think I installed it differently on other systems previously, and those installs took care of the integration for me.

Try installing it from the source into eg. ~/.fzf and run ~/.fzf/install (if I remember correctly). It will offer to add bindings for ctrl-r etc. to the shell's rc file. Easy to update, just run git pull in ~/.fzf and install again.
Post reply on HN