X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=plugins%2Fhomebrew%2Fhomebrew.zshrc;h=379eae923701fabdecf23f88e0cb316096c609ab;hb=83aa52fc828392e74beffe94cfb0d2c1d1f1c35c;hp=b6af123a5387cb298bce1058d92d37389b03c0d8;hpb=899e26b3159525c02a3fb8b4543e7cf93d36f9be;p=ax-zsh.git diff --git a/plugins/homebrew/homebrew.zshrc b/plugins/homebrew/homebrew.zshrc index b6af123..379eae9 100644 --- a/plugins/homebrew/homebrew.zshrc +++ b/plugins/homebrew/homebrew.zshrc @@ -52,8 +52,9 @@ function brew() { cd /tmp user="$(/bin/ls -ld "$HOMEBREW_REPOSITORY" | awk '{print $3}')" group="$(/bin/ls -ld "$HOMEBREW_REPOSITORY" | awk '{print $4}')" - [[ $# -eq 0 && -t 1 ]] \ - && echo "Running \"$real_brew_cmd\" as user \"$user:$group\" ..." + if [[ $# -eq 0 || "$1" = "doctor" || "$1" = "dr" ]]; then + echo "Running \"$real_brew_cmd\" as user \"$user:$group\" ..." + fi sudo -u "$user" -g "$group" -- sh -c "$priv_exec" ) fi