01dcf51fdfb61e2c97f183b648692a2822f0d470
- Author
- Robby Russell <robby@planetargon.com>
- Committer
- Robby Russell <robby@planetargon.com>
- Date
Message
Merge pull request #2502 from UniIsland/patch-1
`fc -l 1` instead of `history` in zsh_stats, fixes #2501
Diff
1diff --git a/lib/functions.zsh b/lib/functions.zsh
2index aaf8a03e31e838d117ee99b076c6b5ee4fd75bb1..fda84a953907f770ab30c974ead543a72874e4f7 100644
3--- a/lib/functions.zsh
4+++ b/lib/functions.zsh
5@@ -1,5 +1,5 @@
6 function zsh_stats() {
7- history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n20
8+ fc -l 1 | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n20
9 }
10
11 function uninstall_oh_my_zsh() {