X-Git-Url: https://git.r.bdr.sh/rbdr/lyricli/blobdiff_plain/4425e9001e20e891dab7711644f83a1628788b47..47f1de79ed1d0007dbba84dc3d511528c7fed3f0:/Sources/main.swift 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 } }