From 55bf34d2972214d38d4662b1bfd420faf53fa229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boris=20Bu=CC=88gling?= Date: Mon, 30 Nov 2015 14:24:25 +0100 Subject: [PATCH 1/2] Enclose argument names inside [] in --help --- Sources/ArgumentDescription.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ArgumentDescription.swift b/Sources/ArgumentDescription.swift index 8fd2b63..150651f 100644 --- a/Sources/ArgumentDescription.swift +++ b/Sources/ArgumentDescription.swift @@ -249,7 +249,7 @@ class Help : ErrorType, CustomStringConvertible { let options = descriptors.filter { $0.type == ArgumentType.Option } if let command = command { - let args = arguments.map { $0.name } + let args = arguments.map { "[\($0.name)]" } let usage = ([command] + args).joinWithSeparator(" ") output.append("Usage:") From c79f3b2cb0d25d6429f1ed98d6d9687100ae9c59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boris=20Bu=CC=88gling?= Date: Tue, 19 Jan 2016 16:07:38 +0100 Subject: [PATCH 2/2] Use <> instead of [] --- Sources/ArgumentDescription.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ArgumentDescription.swift b/Sources/ArgumentDescription.swift index 150651f..b10d6af 100644 --- a/Sources/ArgumentDescription.swift +++ b/Sources/ArgumentDescription.swift @@ -249,7 +249,7 @@ class Help : ErrorType, CustomStringConvertible { let options = descriptors.filter { $0.type == ArgumentType.Option } if let command = command { - let args = arguments.map { "[\($0.name)]" } + let args = arguments.map { "<\($0.name)>" } let usage = ([command] + args).joinWithSeparator(" ") output.append("Usage:")