From 933c61b8f1af64e745260f3c92d32fa08399688d Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Sun, 22 Feb 2015 21:42:11 -0500 Subject: [PATCH] [Fix #776] Support GNU top --- modules/utility/init.zsh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index 491af6a..8d3b3b4 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -146,8 +146,13 @@ alias du='du -kh' if (( $+commands[htop] )); then alias top=htop else - alias topc='top -o cpu' - alias topm='top -o vsize' + if [[ "$OSTYPE" == darwin*|*bsd* ]]; then + alias topc='top -o cpu' + alias topm='top -o vsize' + else + alias topc='top -o %CPU' + alias topm='top -o %MEM' + fi fi # Miscellaneous