Skip to content

Commit

Permalink
lib: clean up zsh_stats function
Browse files Browse the repository at this point in the history
  • Loading branch information
mcornella authored and shlomif committed Oct 15, 2020
1 parent 8fb17dc commit 5c481d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/functions.zsh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
function zsh_stats() {
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
fc -l 1 \
| awk '{ CMD[$2]++; count++; } END { for (a in CMD) print CMD[a] " " CMD[a]*100/count "% " a }' \
| grep -v "./" | sort -nr | head -n20 | column -c3 -s " " -t | nl
}

function uninstall_oh_my_zsh() {
Expand Down

0 comments on commit 5c481d8

Please sign in to comment.