Repository: apple/swift-argument-parser (swift)

Issue:
Help doesn't show default Bool values.
I have a simple `ParsableCommand`:

```swift
struct Dragonfly: ParsableCommand {
    @Option(default: "127.0.0.1",
            help: "Hostname of the server.")
    var host: String
    
    @Option(name: [.customLong("logging"), .customShort("l")],
            default: false,
            help: "Whether logging is enabled.")
    var enableLogging: Bool
    
    @Option(default: 9999,
            help: "Port on which to run the server.")
    var port: Int
    
    
    func run() throws {
        DragonflyServer.run(host: host, port: port, enableLogging: enableLogging)
    }
}

Dragonfly.main()
```
Works great! Noticed that the customized `enableLogging` option doesn't show its default value in the help output:
```
./dragonfly -h
USAGE: dragonfly [--host <host>] [--logging <logging>] [--port <port>]

OPTIONS:
  --host <host>           Hostname of the server. (default: 127.0.0.1)
  -l, --logging <logging> Whether logging is enabled. 
  --port <port>           Port on which to run the server. (default: 9999)
  -h, --help              Show help information.
```

Intentional or bug?

Pull request:
HelpGenerator currently filters out the default values for Bools. Fixes #16 

(replaces #20 which I can't reopen)

Patch:
diff --git a/Sources/ArgumentParser/Usage/HelpGenerator.swift b/Sources/ArgumentParser/Usage/HelpGenerator.swift
index ca7dc1610..9db72229f 100644
--- a/Sources/ArgumentParser/Usage/HelpGenerator.swift
+++ b/Sources/ArgumentParser/Usage/HelpGenerator.swift
@@ -172,11 +172,7 @@ internal struct HelpGenerator {
           i += 1
           
         } else {
-          let defaultValue = arg.help.defaultValue.flatMap {
-            return $0 == "true" || $0 == "false"
-              ? nil
-              : "(default: \($0))"
-            } ?? ""
+          let defaultValue = arg.help.defaultValue.flatMap { "(default: \($0))" } ?? ""
           synopsis = arg.synopsisForHelp ?? ""
           description = [arg.help.help?.abstract, defaultValue]
             .compactMap { $0 }


Test patch:
diff --git a/Tests/UnitTests/HelpGenerationTests.swift b/Tests/UnitTests/HelpGenerationTests.swift
index 8258752bb..c887843f2 100644
--- a/Tests/UnitTests/HelpGenerationTests.swift
+++ b/Tests/UnitTests/HelpGenerationTests.swift
@@ -93,4 +93,29 @@ extension HelpGenerationTests {
 
             """)
   }
+
+  struct D: ParsableCommand {
+
+    @Option(default: "John", help: "Your name.")
+    var name: String
+
+    @Option(default: 20, help: "Your age.")
+    var age: Int
+
+    @Option(default: false, help: "Whether logging is enabled.")
+    var logging: Bool
+  }
+
+  func testHelpWithDefaultValues() {
+    AssertHelp(for: D.self, equals: """
+            USAGE: d [--name <name>] [--age <age>] [--logging <logging>]
+
+            OPTIONS:
+              --name <name>           Your name. (default: John)
+              --age <age>             Your age. (default: 20)
+              --logging <logging>     Whether logging is enabled. (default: false)
+              -h, --help              Show help information.
+
+            """)
+  }
 }