]> git.r.bdr.sh - rbdr/lyricli/blobdiff - Sources/main.swift
Include makefile for easier building
[rbdr/lyricli] / 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)
 }