Live data from Hacker News

How FZF and ripgrep improved my workflow

medium.com

11–20 of 89 posts

Re: How FZF and ripgrep improved my workflow

#11
post #7

I can't really fault both of these tools at all. They have good defaults and are easy to configure and are well documented. Of course they are very performant too, but if you take the time to configuring your wildignore, learn how to use find's and rgrep's flags (maybe script some of this with shell or vimscript if necessary) you can get close to the performance of these tools and define your own usability if needed.…

Not to argue with you as I see where you're coming from (all things being equal I too usually go with the defaults) but the argument about "not having to install and setup additional tools...on lots of different machines" is very weak in these days of: git clone https://gitlab.com/myaccount/mydotfiles followed by an optional: ./deploy_stuff_if_required which for me I have working on any number of linux boxes as well…

Note that not every machine I SSH into has git installed or provides me with permission to install it.

Disclaimer: I recently made one of these "dotfiles" repositories anyways, to take of that what you will.

Re: How FZF and ripgrep improved my workflow

#12
post #7

I can't really fault both of these tools at all. They have good defaults and are easy to configure and are well documented. Of course they are very performant too, but if you take the time to configuring your wildignore, learn how to use find's and rgrep's flags (maybe script some of this with shell or vimscript if necessary) you can get close to the performance of these tools and define your own usability if needed.…

Not to argue with you as I see where you're coming from (all things being equal I too usually go with the defaults) but the argument about "not having to install and setup additional tools...on lots of different machines" is very weak in these days of: git clone https://gitlab.com/myaccount/mydotfiles followed by an optional: ./deploy_stuff_if_required which for me I have working on any number of linux boxes as well…

If you are allowed to git clone random repositories and execute binaries from them (presumably pulling more random dependencies) then I'm going to say you do not (or should not) manage what most people expect when "lots of different machines" is what is said.

Re: How FZF and ripgrep improved my workflow

#13
I also use fzf as git branch picker :)

In my fish_user_key_bindings.fish (but surely adaptable to other shells), I bind it to Alt+G:

    function fish_user_key_bindings
        bind \eg 'test -d .git; and git checkout (string trim -- (git branch | fzf)); and commandline -f repaint'
        bind \eG 'test -d .git; and git checkout (string trim -- (git branch --all | fzf)); and commandline -f repaint'
    end
This goes neatly with fzf's default Alt+C binding to navigate to a directory: Alt+C -> go to a git repo, followed by Alt+G -> pick a branch

Re: How FZF and ripgrep improved my workflow

#14

Earlier quoted context omitted.

Not to argue with you as I see where you're coming from (all things being equal I too usually go with the defaults) but the argument about "not having to install and setup additional tools...on lots of different machines" is very weak in these days of: git clone https://gitlab.com/myaccount/mydotfiles followed by an optional: ./deploy_stuff_if_required which for me I have working on any number of linux boxes as well…

Note that not every machine I SSH into has git installed or provides me with permission to install it. Disclaimer: I recently made one of these "dotfiles" repositories anyways, to take of that what you will.

Assuming it's hosted on something like GitHub, you can just as easily download a zip/tarball of the repository instead.

Re: How FZF and ripgrep improved my workflow

#15

Earlier quoted context omitted.

Note that not every machine I SSH into has git installed or provides me with permission to install it. Disclaimer: I recently made one of these "dotfiles" repositories anyways, to take of that what you will.

Assuming it's hosted on something like GitHub, you can just as easily download a zip/tarball of the repository instead.

A copy is, so I can grab my bashrc if I need it. However, it’s still impossible to install things on certain systems…

Re: How FZF and ripgrep improved my workflow

#16
Been using linux for 15 years and I never found any use case for all these fancy grep/ctrl+r/find replacements.

Honestly I just feel like the authors of these tools were just too lazy to learn grep/find/cut/tr/bash/awk/etc and decided to implement everything in their own toy program, which always

The list of "features" in the article lead me to the same conclusion

> no need of googling the right command

Yeah right but if you spent time learning the existing tools you would not have to google it. And this new tool should require time to accomodate too.

> no need to look around for the right line in the output

I feel like the author just don't understand the unix philosophy. Instead of having 1 tool with a quadrillion options, you just have to incrementally plug and use all the available tools that are already part of linux distributions since dozens of years. You don't need to "find the right line in the output", you just grep/cut/awk the output, after some time it becomes second nature / muscle memory.

Re: How FZF and ripgrep improved my workflow

#17
post #16

Been using linux for 15 years and I never found any use case for all these fancy grep/ctrl+r/find replacements. Honestly I just feel like the authors of these tools were just too lazy to learn grep/find/cut/tr/bash/awk/etc and decided to implement everything in their own toy program, which always The list of "features" in the article lead me to the same conclusion > no need of googling the right command Yeah right bu…

> I feel like the author just don't understand the unix philosophy.

The unix philosophy isn't magically better and faster than other software philosophies

Re: How FZF and ripgrep improved my workflow

#18
Fuzzy down selection (fzf) is the big win. In Emacs that would be Helm of swiper. Instead of local completion (tab tab tab ;) do a global search, and narrow down interactively using fuzzy selection. It's really a different experience, a bit disconcerting at first (tab built into muscle memory), but it quickly becomes a one way change. No way I'd let go of fuzzy selection now.

The connection with ripgrep is that fuzzy selection works well when getting all the possible candidates is fast. And ripgrep (or sd) is good for that. So there's a connection, but the big change is really moving to fuzzy down selection. When dealing with large context it really makes a difference in productivity in my experience, because it helps a lot discoverability in a smooth and efficient way.

For a GUI alternative to fzf, one can look at rofi.

Re: How FZF and ripgrep improved my workflow

#19

I also use fzf as git branch picker :) In my fish_user_key_bindings.fish (but surely adaptable to other shells), I bind it to Alt+G: function fish_user_key_bindings bind \eg 'test -d .git; and git checkout (string trim -- (git branch | fzf)); and commandline -f repaint' bind \eG 'test -d .git; and git checkout (string trim -- (git branch --all | fzf)); and commandline -f repaint' end This goes neatly with fzf's defau…

That is extremely useful (and for fish, which I don't usually see), thank you!

Re: How FZF and ripgrep improved my workflow

#20

Earlier quoted context omitted.

Note that not every machine I SSH into has git installed or provides me with permission to install it. Disclaimer: I recently made one of these "dotfiles" repositories anyways, to take of that what you will.

Assuming it's hosted on something like GitHub, you can just as easily download a zip/tarball of the repository instead.

Its not the technical capability.

Yes, you could download random scripts from the internet and execute them, and you'll probably get into trouble once an auditor checks your system.

Not a nice experience. Would not recommend.

Post reply on HN