functions.zsh 417 B

1234567891011121314151617
  1. function zsh_stats() {
  2. 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
  3. }
  4. function uninstall_oh_my_zsh() {
  5. /usr/bin/env ZSH=$ZSH /bin/sh $ZSH/tools/uninstall.sh
  6. }
  7. function upgrade_oh_my_zsh() {
  8. /usr/bin/env ZSH=$ZSH /bin/sh $ZSH/tools/upgrade.sh
  9. }
  10. function take() {
  11. mkdir -p $1
  12. cd $1
  13. }