Skip to content

Commit

Permalink
refactor(echo_in_color): remove dependency on tput
Browse files Browse the repository at this point in the history
  • Loading branch information
marian13 committed Sep 21, 2022
1 parent aca88a9 commit ec0e599
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ def run(command)

##
# NOTE: Prints original command in bold blue color.
# https://stackoverflow.com/a/69648792/12201472
#
system %(echo "$(tput bold)\e[34m#{command}\e[0m$(tput sgr0)")
system %(echo "\033[1;34m#{command}\033[0m")

##
# NOTE: Actually executes the command.
Expand Down
3 changes: 2 additions & 1 deletion shell/commands/rk
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ echo

##
# NOTE: Prints original command in bold blue color.
# https://stackoverflow.com/a/69648792/12201472
#
echo -e "$(tput bold)\e[34mbundle exec rake $@\e[0m$(tput sgr0)"
echo -e "\033[1;34mbundle exec rake $@\033[0m"

##
# NOTE: Actually executes the command.
Expand Down

0 comments on commit ec0e599

Please sign in to comment.