From c3116390943548333d81b9786005616c5991ec09 Mon Sep 17 00:00:00 2001 From: Chirag Jain Date: Fri, 23 Jan 2015 14:49:52 +0530 Subject: [PATCH] Fixed topc & topm aliases for Linux & Mac --- modules/utility/init.zsh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index fb99d902..0d3bd8fe 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -146,8 +146,15 @@ alias du='du -kh' if (( $+commands[htop] )); then alias top=htop else - alias topc='top -o %CPU' - alias topm='top -o %MEM' + if [[ "$OSTYPE" == "darwin"* ]]; then + # Mac OS X + alias topc='top -o cpu' + alias topm='top -o vsize' + else + # Linux or Cygwin + alias topc='top -o %CPU' + alias topm='top -o %MEM' + fi fi # Miscellaneous