Fix a few small issues with sq vs. jq help and version flag handling
1 files changed, 6 insertions(+), 3 deletions(-)

M sq.scm
M sq.scm +6 -3
@@ 215,15 215,18 @@ 
           (signal 'ok))))))
 
 (define (main args)
-  (let ((opts (parse-command-line args options)))
+  (let* ((opts  (parse-command-line args options))
+         (args* (alist-ref '-- opts)))
     (when (or (assq '-h opts) (assq '--help opts))
       (print help)
       (exit))
-    (when (or (assq '-v opts) (assq '--version opts))
+    (when (assq '--version opts)
       (print version)
       (exit))
+    (when (or (member "-h" args*) (member "--help" args*))
+      (process-execute "jq" args*))
     (parameterize ((parentheses-synonyms #f))
-      (process-input (alist-ref '-- opts) opts)
+      (process-input args* opts)
       (exit (exit-status)))))
 
 (cond-expand