X-Git-Url: https://git.r.bdr.sh/rbdr/lyricli/blobdiff_plain/4425e9001e20e891dab7711644f83a1628788b47..169297c8e8464ca0cf600e9e426f11d170ee169d:/Sources/main.swift?ds=sidebyside diff --git a/Sources/main.swift b/Sources/main.swift index 0ae48bc..42d4855 100644 --- a/Sources/main.swift +++ b/Sources/main.swift @@ -21,6 +21,21 @@ func createParser() -> ([String:Option], CommandLineKit) { parser.addOptions(Array(flags.values)) + parser.formatOutput = {parseString, type in + + var formattedString: String + + switch(type) { + case .About: + formattedString = "\(parseString) [ ]" + break + default: + formattedString = parseString + } + + return parser.defaultFormat(formattedString, type: type) + } + return (flags, parser) } @@ -80,7 +95,7 @@ func main() { if let titleFlag = flags["title"] as? BoolOption { if titleFlag.value == true { - Lyricli.printTitle() + Lyricli.showTitle = true } }