From 7c172fc9a71d91c12bd14937875863c452d5c568 Mon Sep 17 00:00:00 2001 From: Diego Rabatone Oliveira Date: Wed, 21 Jun 2017 18:37:03 -0300 Subject: [PATCH] Fix #1337 by removing top alias to htop. (#1341) Fixes #1337 --- modules/utility/README.md | 8 +++----- modules/utility/init.zsh | 14 +++++--------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/modules/utility/README.md b/modules/utility/README.md index c949a66..57e3b07 100644 --- a/modules/utility/README.md +++ b/modules/utility/README.md @@ -107,11 +107,9 @@ Aliases - `df` displays free disk space using human readable units (aliases to `pydf`, if installed). - `du` displays disk usage using human readable units. - - `top` displays information about processes (aliased to `htop`, if installed). - - `topc` displays information about processes sorted by CPU usage (`htop` not - installed). - - `topm` displays information about processes sorted by RAM usage (`htop` not - installed). + - `top` displays information about processes. + - `topc` displays information about processes sorted by CPU usage. + - `topm` displays information about processes sorted by RAM usage. ### Miscellaneous diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index 33ec147..fb3de55 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -150,16 +150,12 @@ fi alias du='du -kh' -if (( $+commands[htop] )); then - alias top=htop +if [[ "$OSTYPE" == (darwin*|*bsd*) ]]; then + alias topc='top -o cpu' + alias topm='top -o vsize' else - 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 + alias topc='top -o %CPU' + alias topm='top -o %MEM' fi # Miscellaneous