From df7cb66ff92ee669ad6d5c73dcd2f22448809a5c Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Fri, 3 May 2019 19:20:45 +0200 Subject: [PATCH] build_tools/style: Make output a bit spicier. COLORS! ALL THE COLORS! Well, three! No, wait, FOUR! But only if you count "normal" as a color! [ci skip] --- build_tools/style.fish | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/build_tools/style.fish b/build_tools/style.fish index b3ae670ea..755da67bf 100755 --- a/build_tools/style.fish +++ b/build_tools/style.fish @@ -55,14 +55,16 @@ else set python_files (string match -r '^.*\.py$' -- $files) end +set -l red (set_color red) +set -l green (set_color green) +set -l blue (set_color blue) +set -l normal (set_color normal) + # Run the C++ reformatter if we have any C++ files. if set -q c_files[1] if test $git_clang_format = yes if type -q git-clang-format - echo - echo ======================================== - echo Running git-clang-format - echo ======================================== + echo === Running "$red"git-clang-format"$normal" git add $c_files git-clang-format else @@ -71,10 +73,7 @@ if set -q c_files[1] echo end else if type -q clang-format - echo - echo ======================================== - echo Running clang-format - echo ======================================== + echo === Running "$red"clang-format"$normal" for file in $c_files cp $file $file.new # preserves mode bits clang-format $file >$file.new @@ -98,10 +97,7 @@ if set -q fish_files[1] make fish_indent set PATH . $PATH end - echo - echo ======================================== - echo Running fish_indent - echo ======================================== + echo === Running "$green"fish_indent"$normal" for file in $fish_files cp $file $file.new # preserves mode bits fish_indent <$file >$file.new @@ -120,10 +116,7 @@ if set -q python_files[1] echo Please install "`black`" to style python echo else - echo - echo ======================================== - echo Running black - echo ======================================== + echo === Running "$blue"black"$normal" black $python_files end end