3 ms·
"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
by hiq 7y ago
"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".
- fragmede 7y agoWhile 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.
- m463 7y agoI 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>"
- Siira 7y ago`history 200000 | awk '{print $2" "$3}' | sort | uniq -c | sort -n`