Live data from Hacker News

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

andrew-quinn.me

71–80 of 292 posts

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

#72
I don't think this article goes far enough into what a game-changer fzf can be.

Combined with some clever "preview" functions, and a pop-up terminal function (which, that part is admittedly harder than it ought to be) it can be an across the board a better general purpose script menu creator than most command line AND GUI tools, namely due to

- instant previews AND

- the ability to either arrow up and down OR fuzzy type what you want.

For me, it renders, e.g. "select in" and "case" functions in Bash completely obsolete. At any time, if I want quick selection of anything that can be a list, my first thought is, can I do this with fzf?

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

#74
post #59

Earlier quoted context omitted.

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

Pretty much par for the course, Linux distributions don't do per user configuration of tools beyond appending to PATH or setting some essential environment variables using scripts in in /etc/profile.d/. They will most certainly not mess with login scripts.

Yeah sure, that makes sense. I'm surprised that the .deb doesn't install the stuff from `$upstream/shell` into `/usr/share/fzf` though. That's the sort of thing `/usr/share/$prog` is intended for.

Then it would just be (in bash anyway):

   source /usr/share/fzf/keybindings.bash

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

#75

I love fuzzy shell history. Game changer in terms of shell productivity. I use atuin[0] instead of fzf as I find the experience a bit nicer and it has history backups built in (disclaimer, I am a maintainer) Some of our users still prefer fzf because they are used to how it fuzzy finds, but we're running an experiment with skim[1] which allows us to embed the fuzzy engine without much overhead - hopefully giving them…

Something I've always wanted from my shell history is to be able to record relative filepaths as their absolute equivalent in the history, is that supported in atuin?. If you do a lot of data munging on the CLI, you end up with a lot of commands like `jq 'complicated_selector' data.json`, which if I want to remember the selector is good, but if I want to remember which data I ran it on is not so good. I could do it with better filenames but that would involve thinking ahead. I also run into this a lot trying to remember exactly which local file has been uploaded to s3 by looking at shell history.

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

#77
post #57

I love fuzzy shell history. Game changer in terms of shell productivity. I use atuin[0] instead of fzf as I find the experience a bit nicer and it has history backups built in (disclaimer, I am a maintainer) Some of our users still prefer fzf because they are used to how it fuzzy finds, but we're running an experiment with skim[1] which allows us to embed the fuzzy engine without much overhead - hopefully giving them…

I wanted to like atuin. The idea is great. But it just could not match the instant search that ctrl-r with fzf offers sadly. There is always a noticeable delay that annoyed me and made me revert back to fzf for search. For me another issue was that I needed to do more keystrokes for the same behaviour (search a previously ran command and execute it). Fuzzy shell history search is just one of those mind-blowing things…

I also had a rather noticeable delay when launching atuin. As it turns out, this was because it checked for an update every time it launched! You can disable that update check: add a ` update_check = false` to your `~/.config/atuin/config.toml` [1]. That made the delay pretty much disappear for me.

[1]: https://atuin.sh/docs/config/#update_check

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

#78
post #50

I’ve never used fzf before and live in a shell all day, but the capabilities shown in the article doesn’t seem very useful to me. Am I missing something? For Ctrl+R, how many times are people running similar variants of commands that they 1) don’t know what they typed and 2) didn’t think to simplify their workflow to not be running duplicated commands? For Alt+C, are peoples’ file and directory layouts such a mess th…

Regarding Ctrl+R: Forget fzf for a moment and ask if you ever use it or some similar history command. If you do, then fzf is automatically a better interface than the default one.

If you don't, then yes, I use it all the time to find the exact command I typed in a few weeks ago. I'm not going to memorize all the options I passed in, etc.

For Alt+C: Useful even if you organize things very well. I'm in my home directory. I have /home/me/media/video/youtube/channel_name. I want to go in there. That's a lot of typing (even with Tab autocompletion). When I can just press Alt+C and type perhaps 4 characters of the channel name and I'm instantly in that directory. Do this 100 times over for different directories and the benefits become obvious. In the past I would put convenient symlinks to get to deeper directories quickly, and I now realize that approach is just a hack due to a poor navigation interface.

Post reply on HN