From 49bdbc02a79eaba6870594cae9b623c47614fb7c Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Thu, 12 Nov 2015 16:05:43 -0500 Subject: [PATCH] remove unused function, comment crazy output redirections --- bin/rbenv-update | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/bin/rbenv-update b/bin/rbenv-update index 91b4825..2ec692c 100755 --- a/bin/rbenv-update +++ b/bin/rbenv-update @@ -33,14 +33,6 @@ indent_output() { done } -pretty_output() { - if [ -n "$verbose" ]; then - indent_output - else - cat >/dev/null - fi -} - print_colored() { if [ -z "$quiet" ]; then printf "${color}%s${reset}\n" "$1" @@ -49,12 +41,16 @@ print_colored() { git() { if [ -n "$noop" ]; then + # print would-be command echo git "$@" | indent_output elif [ -n "$quiet" ]; then + # mute stdout and stderr command git "$@" &>/dev/null elif [ -n "$verbose" ]; then + # indent stdout and stderr command git "$@" 2>&1 | indent_output else + # mute stdout, indent stderr command git "$@" 2>&1 >/dev/null | indent_output fi }