mirror of
https://github.com/roswell/roswell.git
synced 2026-09-10 07:16:17 -04:00
'ros config' only accept with subcommand form.
This commit is contained in:
parent
98144e99e3
commit
05bbe15342
|
|
@ -49,16 +49,13 @@ exec ros +R +Q -m roswell -L sbcl-bin -- $0 "$@"
|
|||
(loop for i in conf
|
||||
do (format *error-output* "~A=~A~%" (first i) (third i))
|
||||
finally (format *error-output* "~%Possible subcommands:~%set~%show~%")) 0)
|
||||
((= 1 len)
|
||||
(setf conf (unconfig conf (first argv)))
|
||||
((and (equal (first argv) "unset") (= 2 len))
|
||||
(setf conf (unconfig conf (second argv)))
|
||||
(save-config path conf) 0)
|
||||
((and (equal (first argv) "set") (= 3 len))
|
||||
(setf conf (config conf (second argv) (third argv)))
|
||||
(save-config path conf) 0)
|
||||
((and (equal (first argv) "show") (= 2 len))
|
||||
(format t "~A~%" (or (third (find (second argv) conf :test 'equal :key #'first)) "")) 0)
|
||||
((= 2 len)
|
||||
(setf conf (config conf (first argv) (second argv)))
|
||||
(save-config path conf) 0)
|
||||
(t 1))))
|
||||
;;; vim: set ft=lisp lisp:
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ Example:
|
|||
"Interface to roswell C binary."
|
||||
(roswell:roswell (if val
|
||||
`("config" "set" ,item ,val) ;; set
|
||||
`("config" ,item)) :string t) ;; unset
|
||||
`("config" "unset" ,item)) :string t) ;; unset
|
||||
val)
|
||||
|
||||
(defun list% (&rest params)
|
||||
|
|
|
|||
Loading…
Reference in a new issue