`find` does a lot more things than that.
Definitely. The whole Unix philosophy of each command doing one thing and being easily composable always seemed to break down in my mind when it came to find. find does a lot. similar to ripgrep, though, fd is a modern replacement that’s a bit friendlier to use.
Small programming tricks
191–200 of 210 posts
Re: Small programming tricks
#192> At a previous company, I shared a trick on slack every day with the engineering team, both technical and company-specific, and folks found them pretty useful. I would find that annoying, however to not be seen as a jerk I wouldn't say anything.
Re: Small programming tricks
#193https://www.gnu.org/software/emacs/manual/html_node/emacs/Ba...
Re: Small programming tricks
#194Earlier quoted context omitted.
(hi! I work on atuin!) yes, it's improved a lot in the last couple of years! what in particular bothered you?
Not the parent commenter, but I also tried it a year or two ago and my recollection is that I had a similar experience. I have a really long history file that dates back like a decade and if remembering correctly I tried to import it, and it made using my shell very laggy so I ended up removing it. I'm not 100% positive that I'm remembering the exact way that I started experiencing the lag though, so if I have time t…
Make sure you’re using the daemon (the install script will handle this) and you should be good to go
Very happy to help if you have any problems. Ellie at Atuin dot sh
Re: Small programming tricks
#195The thing with a lot of these tricks is that you have to get into the habit of using them. I knew `Ctrl+r` for history since I learned about the command line. I even have a nice shell integration with fzf. But I still used the up/down arrow keys for years or scrolled up when I was looking for a previous command, because I never remembered the shortcut and just took the path of least resistance to find something. Usua…
Re: Small programming tricks
#196Earlier quoted context omitted.
Not the parent commenter, but I also tried it a year or two ago and my recollection is that I had a similar experience. I have a really long history file that dates back like a decade and if remembering correctly I tried to import it, and it made using my shell very laggy so I ended up removing it. I'm not 100% positive that I'm remembering the exact way that I started experiencing the lag though, so if I have time t…
Ahh yes, we’ve done a lot of performance optimisation since then. We regularly test on >1m records and have no issues Make sure you’re using the daemon (the install script will handle this) and you should be good to go Very happy to help if you have any problems. Ellie at Atuin dot sh
Re: Small programming tricks
#197Earlier quoted context omitted.
Another one, not quite as handy but still awesome: ctrl s / ctrl-q. This freezes/unfreezes the terminal output so you can read it, without interrupting your program. Useful for very fast walls of text.
It can’t always not interrupt your program. Think about it: after you press Control S to trigger XOFF, the fast output has to be buffered in memory. That memory is certainly not unlimited. There’s no way for the program to keep outputting text. Indeed some programs (including Claude Code, at least a while ago) really don’t like it when you press Control S and let the terminal be frozen for a very long time.
Re: Small programming tricks
#198The thing with a lot of these tricks is that you have to get into the habit of using them. I knew `Ctrl+r` for history since I learned about the command line. I even have a nice shell integration with fzf. But I still used the up/down arrow keys for years or scrolled up when I was looking for a previous command, because I never remembered the shortcut and just took the path of least resistance to find something. Usua…
> But I still used the up/down arrow keys for years or scrolled up when I was looking for a previous command It's not even that bad of a habit with zsh either where it will only scroll through history matching a substring in your history, for instance if I type "rg -i" and then start pressing up arrow, it will only cycle through history entries starting with "rg -i".
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
Re: Small programming tricks
#199Earlier quoted context omitted.
Another one, not quite as handy but still awesome: ctrl s / ctrl-q. This freezes/unfreezes the terminal output so you can read it, without interrupting your program. Useful for very fast walls of text.
Oh so that is what this is for. I thought ctrl-q / ctrl-s are there as a nasty way to screw with users, who every now and then accidentally press one of these, and find their terminal frozen and no longer visibly reacting to input, for no apparent reason.
stty -ixon
Re: Small programming tricks
#200The thing with a lot of these tricks is that you have to get into the habit of using them. I knew `Ctrl+r` for history since I learned about the command line. I even have a nice shell integration with fzf. But I still used the up/down arrow keys for years or scrolled up when I was looking for a previous command, because I never remembered the shortcut and just took the path of least resistance to find something. Usua…
You just have to do it so often that you’re annoyed by it and then you learn the shortcut and then you force yourself to always do the shortcut.