News for hackers. Stuff that matters.
Re:Ask HN: Programs that saved you 100 hours? by hiq on Monday April 13, 2020 @02:34AM (#22853646)
"Based on bash history data" is an interesting point, because it highlights that you can use your history to periodically check what you do inefficiently in the terminal, and which aliases you still need to add to your config: compute some statistics on the number of 1-word and 2-word commands you use the most, and see if they are more than e.g. 4 letters.

With zsh: "history 1 | awk '{print $2}' | sort | uniq -c | sort -n"

With bash I think this should be "history" instead of "history 1".

Re:Ask HN: Programs that saved you 100 hours? by m463 on Monday April 13, 2020 @08:10AM (#22855100)
I make one change to every new .bashrc file.

I change this:

  HISTSIZE=1000
  HISTFILESIZE=2000
to:

  HISTSIZE=1000000
  HISTFILESIZE=2000000
You would be surprised how useful this one change has been, answering historical questions easily, like how to generate that rsa key, or what packages did I install for that project last year.

You can usuall answer questions with ^r instead of the man page. Or maybe:

  "history | grep -C 10 <foo>"
Re:Ask HN: Programs that saved you 100 hours? by fragmede on Monday April 13, 2020 @04:18AM (#22854041)
While we’re on the subject of shortcuts, I have `awk1` mapped to `awk '{print $1}'` and the same up to awk9. It’s not that I can’t type it but it breaks my flow for such a simple use case.
Re:Ask HN: Programs that saved you 100 hours? by Siira on Thursday April 16, 2020 @07:30AM (#22888336)
`history 200000 | awk '{print $2" "$3}' | sort | uniq -c | sort -n`