]> arthur.barton.de Git - ax-zsh.git/blob - default_plugins/std_functions/std_functions.zshrc
New "std_functions" default plugin
[ax-zsh.git] / default_plugins / std_functions / std_functions.zshrc
1 # AX-ZSH: Alex' Modular ZSH Configuration
2 # std_functions: Setup standard ("common") functions
3
4 function take() {
5         mkdir -p "$@" && cd "${@:$#}"
6 }
7
8 function zsh_stats() {
9         fc -l 1 \
10         | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' \
11         | grep -v "./" | column -c3 -s " " -t | sort -nr | nl -w 3 -s ": " | head -n20
12 }