]> git.r.bdr.sh - rbdr/lyricli/commitdiff
Show the optional arguments
authorBen Beltran <redacted>
Fri, 19 May 2017 03:44:25 +0000 (22:44 -0500)
committerBen Beltran <redacted>
Fri, 19 May 2017 03:44:25 +0000 (22:44 -0500)
Sources/main.swift

index e4b2760e873888695e8174b42db9c84b77ca82e3..42d485588fabfcb72c064c0f8748811d9e7fe334 100644 (file)
@@ -21,6 +21,21 @@ func createParser() -> ([String:Option], CommandLineKit) {
 
     parser.addOptions(Array(flags.values))
 
 
     parser.addOptions(Array(flags.values))
 
+    parser.formatOutput = {parseString, type in
+
+        var formattedString: String
+
+        switch(type) {
+        case .About:
+            formattedString = "\(parseString) [<artist_name> <song_name>]"
+            break
+        default:
+            formattedString = parseString
+        }
+
+        return parser.defaultFormat(formattedString, type: type)
+    }
+
     return (flags, parser)
 }
 
     return (flags, parser)
 }