Improving shell workflows with fzf

https://seb.jambor.dev/posts/improving-shell-workflows-with-fzf/

44 points · 6 comments · view on lemmy.world

6 Comments

Deebster@programming.dev · 10 pts · 2y
function delete-branches() {
  git branch |
    grep --invert-match '\*' |
    cut -c 3- |
    fzf --multi --preview="git log {} --" |
    xargs --no-run-if-empty git branch --delete --force
}

This is really slick.

d3Xt3r@lemmy.nz · 6 pts · 2y (6 replies)

Those of you reading this might also be interested in two_percent, which is a fork of skim, which in turn is a Rust implementation of fzf. two_percent is faster, more efficient and uses less memory than fzf, which is especially noticeable with large inputs.

brenticus@lemmy.world · 4 pts · 2y

My most direct use of fzf is to search large result sets for something I can't 100% remember the name or location of, so this actually sounds nice. I've managed to get fzf to slow down a few times and... well, I'm sure as hell not organizing that folder structure.

t0mri@lemmy.ml · 1 pts · 2y
[ removed ]
learnbyexample@programming.dev · 1 pts · 2y (3 replies)

What's the difference between two_percent and skim?

d3Xt3r@lemmy.nz · 3 pts · 2y (2 replies)

It's faster and more memory efficient basically. skim also appears to have been abandoned (no updates in over an year), whereas two_percent is being actively developed.

saud@lemmy.ml · 1 pts · 2y (1 reply)
[ removed ]
d3Xt3r@lemmy.nz · 1 pts · 2y

No, you're looking at the commit log for skim. two_percent was last updated two months ago. I also had a chat with the author yesterday and they're keen to continue maintaining the fork.