Re:Ask HN: Programs that saved you 100 hours? (2022 edition)
by alexchantavy on Tuesday December 20, 2022 @01:41PM
(#34070271)
From that perspective, using Ctrl+R and Ctrl+S for reverse-i-search in a shell saves me so much time from writing commands especially big Kubernetes ones.
[ Parent
| on HN ]
Re:Ask HN: Programs that saved you 100 hours? (2022 edition)
by 5e92cb50239222b on Tuesday December 20, 2022 @02:08PM
(#34070765)
Add fzf to get fuzzy search for your history. I reuse long complicated commands all the time by pressing Ctrl+R and then typing the first letters of a few words I remember using.
https://github.com/junegunn/fzf
It's also useful to remove duplicate commands and store infinite history. Add this to ~/.bashrc:
export HISTFILESIZE=
export HISTSIZE=
export HISTCONTROL=ignoredups
Re:Ask HN: Programs that saved you 100 hours? (2022 edition)
by dllthomas on Tuesday December 20, 2022 @02:32PM
(#34071202)
Changing HISTFILE by context has been a huge win, keeping commands from generic system administration or different projects from getting in the way as I search back through my history to do a thing again.
Re:Ask HN: Programs that saved you 100 hours? (2022 edition)
by namuol on Tuesday December 20, 2022 @01:44PM
(#34070309)
Cmd/Ctrl-F in general is probably the biggest invisible time-saver if you can count UX patterns.
Re:Ask HN: Programs that saved you 100 hours? (2022 edition)
by eftepede on Tuesday December 20, 2022 @02:07PM
(#34070763)
Try fzf for history management, it's a life changer.
Re:Ask HN: Programs that saved you 100 hours? (2022 edition)
by hedora on Tuesday December 20, 2022 @01:48PM
(#34070388)
The 'history' command is helpful the 1% of the time Ctrl-R and Ctrl-S fail you.
Re:Ask HN: Programs that saved you 100 hours? (2022 edition)
by bobbob1921 on Tuesday December 20, 2022 @02:12PM
(#34070832)
Bash alias. And my large bash_alias file
Re:Ask HN: Programs that saved you 100 hours? (2022 edition)
by msluyter on Tuesday December 20, 2022 @02:47PM
(#34071429)
You can also add a comment for searchability, as in:
> big hairy command with --lots --of arguments # foobar
Then you can search for 'foobar' via fzf or whatnot.
Re:Ask HN: Programs that saved you 100 hours? (2022 edition)
by jmiserez on Tuesday December 20, 2022 @05:49PM
(#34073943)
Give hstr a try: https://github.com/dvorka/hstr
It's saved me countless hours over the years as it's just so much better than regular CTRL-R. I also find it to work better than fzf.