 
 
 # Processing of command-line args.  Minimal on purpose.
-# Expects `<json>` string or `-i <file>`.
 # Does help with man pages for precious, precious-json.
 args = process.argv.splice(2)
-if args.length > 0
-  if args[0] is '-i'
+if args.length > 0 then switch args[0]
+
+  when '-f', '--file'
     unless args[1]?
-      console.error "Usage: precious -i <file>"
+      console.error "Usage: precious -f <file>"
       process.exit(1)
     require('fs').readFile "./#{args[1]}", "utf8", (err, data) ->
       if err



# There are several man pages, reused for help.
man = (page) ->
  require('child_process').exec "man #{page}", (err, out) ->
    if err
      console.error "Can't get: `man #{page}`."

      process.exit(1)
    else
      console.log out
      process.exit(status)


# Fill in the input with convenient niceties / default settings.
