                                   (println "print-exception-trace is set to:" @print-exception-trace))
                             :short-info "Enable/Disable Printing of Full Exception Traces"
                             :long-info "When set to false (default), only the exception message will be printed when an exception occurs. When set to true, the full traces of exceptions will be printed."}
-            :_sleep {:fn (fn [duration] (sleep duration))
+            :_sleep {:fn (fn [duration] (utils/sleep duration))
                      :short-info "Sleep for n milliseconds."
                      :long-info "Pause the UI thread for n milliseconds. One use case for this is unit testing of CLIs with asynchronous interaction."}}
      :print-exception-trace (fn [] @print-exception-trace)}))

    (fn [m k]
      (let [f (get-in opts [:cmds k :fn])
            args (cond
                   (symbol? f) (map-quote-vec (get-defn-arglists (eval `(var ~f))))
                   (and (list? f)
                        (= 'fn (first f))) (:args (get-fn-arglists f))
                   :default nil)]
        (if (and
              (not (nil? args))

  (cond
    (and
      (instance? Exception arg)
      ((:print-exception-trace opts))) (strace/print-cause-trace arg)
    (instance? Exception arg) (utils/println-err (.getMessage arg))
    :default (utils/println-err (str arg))))

(def cli-default-options
  {:allow-eval false
