Commit 725208db authored by Eric Timmons's avatar Eric Timmons
Browse files

Reenable config info command

parent c46e70ed
......@@ -24,5 +24,5 @@
(define-cli-command (("config" "info") *config-info-ui*) (arguments options)
(format *stdout* "Config directories: ~A~%~%" *clpm-config-directories*)
(format *stdout* "Current configuration:~%~A~%---~%" (with-output-to-string (s) (print-config s)))
(format *stdout* "Current configuration:~%~A~%" (with-output-to-string (s) (print-config s)))
t)
......@@ -7,7 +7,7 @@
(:use #:cl
#:clpm/cli/bundle
;;#:clpm/cli/client
;;#:clpm/cli/config
#:clpm/cli/config
#:clpm/cli/context
#:clpm/cli/entry
#:clpm/cli/install
......
......@@ -540,7 +540,7 @@ variables, then the config file, then the default config."
(let ((*print-pretty* t)
(*print-case* :downcase))
(pprint-logical-block (stream values :prefix "(" :suffix ")")
(format stream "(table ~{~S~^ ~})" path)
(format stream "(~{~S~^ ~})" path)
(pprint-exit-if-list-exhausted)
(pprint-newline :mandatory stream)
(loop
......@@ -558,13 +558,10 @@ variables, then the config file, then the default config."
(dolist (sub-table tables)
(print-table (cdr sub-table) (car sub-table) stream))))
;; (defun print-config (stream)
;; "Print the configuration to ~stream~."
;; (format stream "(version \"0.2\")~%~%")
;; (maphash (lambda (k v)
;; (assert (hash-table-p v))
;; (print-table v (list k) stream))
;; *config*))
(defun print-config (stream)
"Print the configuration to ~stream~."
(format stream "(version \"0.2\")~%~%")
(print-table (config-value) nil stream))
(uiop:register-clear-configuration-hook 'clear-global-config)
(uiop:register-image-restore-hook 'load-global-config)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment