From b14a3f30331f6e1809b0df67614bdb87d45e341d Mon Sep 17 00:00:00 2001 From: Greg Meyer Date: Thu, 20 Jul 2017 11:51:48 -0400 Subject: [PATCH] make the pydf alias optional pydf is not a true replacement for df, as it cannot stat remote disks. This alias being a default is inappropriate, especially without making it very clear in the documentation --- modules/utility/init.zsh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index 101e8a41..687cb313 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -175,9 +175,13 @@ elif (( $+commands[wget] )); then alias get='wget --continue --progress=bar --timestamping' fi -# Resource Usage -if (( $+commands[pydf] )); then - alias df=pydf +if zstyle -s ':prezto:module:utility' pydf 'yes'; then + # Resource Usage + if (( $+commands[pydf] )); then + alias df=pydf + else + alias df='df -kh' + fi else alias df='df -kh' fi