]> git.r.bdr.sh - rbdr/lyricli/blobdiff - Sources/main.swift
Merge branch 'feature/read-song-from-command-line' into develop
[rbdr/lyricli] / Sources / main.swift
index 47720ad3a631b15d7feed0637520a729bf3c8662..e4b2760e873888695e8174b42db9c84b77ca82e3 100644 (file)
@@ -80,10 +80,14 @@ func main() {
 
     if let titleFlag = flags["title"] as? BoolOption {
         if titleFlag.value == true {
 
     if let titleFlag = flags["title"] as? BoolOption {
         if titleFlag.value == true {
-            Lyricli.printTitle()
+            Lyricli.showTitle = true
         }
     }
 
         }
     }
 
+    // Remove any flags so anyone after this gets the unprocessed values
+    let programName: [String] = [CommandLine.arguments[0]]
+    CommandLine.arguments = programName + parser.unparsedArguments
+
     Lyricli.printLyrics()
 }
 
     Lyricli.printLyrics()
 }