From c97363522f19c2c98b8312241f1fdd5473858429 Mon Sep 17 00:00:00 2001 From: Roald Ruiter Date: Thu, 18 Jun 2020 15:06:43 +0200 Subject: [PATCH] Improved formatting of console message. --- src/TcBlack/Program.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/TcBlack/Program.cs b/src/TcBlack/Program.cs index 0e2884c..b72ee02 100644 --- a/src/TcBlack/Program.cs +++ b/src/TcBlack/Program.cs @@ -13,19 +13,22 @@ static void Main(string[] args) Parser.Default.ParseArguments(args) .WithParsed(o => { - string files = string.Join("\n", o.Filenames); + string files = string.Join( + "\n", + o.Filenames.Select(filename => $" - {filename}").ToArray() + ); if (o.Safe) { Console.WriteLine( - $"Formatting file(s) in safe mode:\n{files}\n" + $"\nFormatting file(s) in safe mode:\n{files}\n" ); SafeFormat(o); } else { Console.WriteLine( - $"Formatting file(s) in fast non-safe mode:\n{files}\n" + $"\nFormatting file(s) in fast non-safe mode:\n{files}\n" ); try {