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…
I use https://watchexec.github.io/ for this, which looks similar. Anyone who tried both and knows which one is better?
Fzf – a command-line fuzzy finder
71–80 of 93 posts
Re: Fzf – a command-line fuzzy finder
#72ripgrep[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
#73ripgrep[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.
For those that haven't tried yet, and want an entry point, I'd highly recommend you play around with the 'fzf' key bindings and completion scripts for zsh[0] to see what's possible. A little app of mine[1] also has an example of what one might call the minimal viable hot key script for you (note: for skim or 'sk', a 'fzf' Rust clone).
[0]: https://github.com/junegunn/fzf/tree/master/shell [1]: https://github.com/kimono-koans/httm
Re: Fzf – a command-line fuzzy finder
#74Earlier quoted context omitted.
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.
Re: Fzf – a command-line fuzzy finder
#75Fzf 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
#76I can totally see why fzf is a great utility and is indeed very cool but I don't see real value other than as a Vim plugin for Ctrl-P. For a Ctrl-R replacement in the terminal, it never sticked with me, because getting more than 1 results was distracting. Also, if I'm in a directory and want to open a file in vim that I'm not sure of its location, I do `vim` and then Ctrl-P. I tried to incorporate it a few times in m…
Re: Fzf – a command-line fuzzy finder
#77I have been really inspired by 'fzf' recently. Wrote a fun little ZFS utility[0] which I intended to just script with 'fzf', but have since found skim[1], or 'sk', and now use it both as my sole fuzzy finder app (because it's supposed to be interactive and it's faster!), and as a library for my little utility. I like them both for making fun zsh key bindings, so, so easy. [0]: https://github.com/kimono-koans/httm [1]…
Re: Fzf – a command-line fuzzy finder
#78I have been really inspired by 'fzf' recently. Wrote a fun little ZFS utility[0] which I intended to just script with 'fzf', but have since found skim[1], or 'sk', and now use it both as my sole fuzzy finder app (because it's supposed to be interactive and it's faster!), and as a library for my little utility. I like them both for making fun zsh key bindings, so, so easy. [0]: https://github.com/kimono-koans/httm [1]…
Do you have a source for the faster claim? I read back when I was investigating that fzf was still faster despite the Go vs Rust performance debate.
But I suppose I'd ask -- faster how?
The linked benchmark really doesn't mean much to me. As an interactive app I judged it on how it felt latency-wise at the CLI. So, I would just try to scroll page-up while find was feeding in the files in my home directory. fzf would sometimes stall on my system (again not scientific) and would occasionally junk up the terminal when it got fed something strange. This could be a problem with fzf or it could have been a problem with how I was using it.
On the other hand, sk at the CLI has been rock solid and very fast. skim as a library needs better docs and has a few other teething issues, but I'm using skim right now, because it feels faster, and because I use it as a library, there is some mental continuity between the two. Recognize and respect fzf in this space, it's just sk is doing it better for me, for now.
Re: Fzf – a command-line fuzzy finder
#79Earlier quoted context omitted.
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.
I think you have to really love the idea of creating an app/script or hot key for a work flow to really start to enjoy using 'fzf'. And for most, I get it, it's "Where to start? Ugh, looks like work." For those that haven't tried yet, and want an entry point, I'd highly recommend you play around with the 'fzf' key bindings and completion scripts for zsh[0] to see what's possible. A little app of mine[1] also has an e…
git log --oneline | fzf
and interactively fuzz your way to the commit you're looking for. Having the ability to just update live with backspace when the search isn't matching makes a tremendous difference.Re: Fzf – a command-line fuzzy finder
#80Earlier quoted context omitted.
It can be useful to let you (fuzzily) pick from a list of things to execute a command. I use it to interact with git, i.e.: - checkout local git branch from curated list of branches fed through fzf - cherry pick commits from the previous (@{-1}) branch, using fzf + preview showing each commit's "diff" - pick recent SHA to git revert - pick files changed from {master,main,blead} - pick files currently uncommitted
Oh jeez, those are great examples. Thanks. I only use it in neovim (telescope), this post and your comment have inspired me to start trying it on the command line.