Skip to content

Commit

Permalink
remove unused function, comment crazy output redirections
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkarns committed Nov 12, 2015
1 parent 37d7d96 commit 49bdbc0
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions bin/rbenv-update
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
}
Expand Down

0 comments on commit 49bdbc0

Please sign in to comment.