From ae55f6868fa8dd2c66ffbf4ecd7348b8daf18b36 Mon Sep 17 00:00:00 2001 From: Nick Lockwood Date: Sat, 4 Aug 2018 08:46:11 +0100 Subject: [PATCH] Only print non-default options using inferoptions --- Sources/CommandLine.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/CommandLine.swift b/Sources/CommandLine.swift index d6612a81..61c72b2d 100644 --- a/Sources/CommandLine.swift +++ b/Sources/CommandLine.swift @@ -409,9 +409,10 @@ func processArguments(_ args: [String], in directory: String) -> ExitCode { break } } + let arguments = commandLineArguments(for: options, excludingDefaults: true) print("options inferred from \(filesParsed)/\(filesChecked) files in \(time)") print("") - print(commandLineArguments(for: options).map({ "--\($0.key) \($0.value)" }).joined(separator: " ")) + print(arguments.map { "--\($0.key) \($0.value)" }.joined(separator: " ")) print("") return .ok }