feat(cli): add -l/--load switch
Post-rewrite bin/doom will accept multiple -l's, but for now will only accept one. This change was made to prepare for the documentation generator, which will live outside the repo.
This commit is contained in:
parent
0ca2e791f7
commit
5541ee1c68
1 changed files with 3 additions and 3 deletions
|
@ -86,6 +86,7 @@ purpose.")
|
||||||
((help-p ["-h" "--help"] "Same as help command")
|
((help-p ["-h" "--help"] "Same as help command")
|
||||||
(auto-accept-p ["-y" "--yes"] "Auto-accept all confirmation prompts")
|
(auto-accept-p ["-y" "--yes"] "Auto-accept all confirmation prompts")
|
||||||
(debug-p ["-d" "--debug"] "Enables on verbose output")
|
(debug-p ["-d" "--debug"] "Enables on verbose output")
|
||||||
|
(loadfile ["-l" "--load" file] "Load an elisp FILE before executing any commands")
|
||||||
(doomdir ["--doomdir" dir] "Use the private module at DIR (e.g. ~/.doom.d)")
|
(doomdir ["--doomdir" dir] "Use the private module at DIR (e.g. ~/.doom.d)")
|
||||||
(localdir ["--localdir" dir] "Use DIR as your local storage directory")
|
(localdir ["--localdir" dir] "Use DIR as your local storage directory")
|
||||||
(nocolor ["-C" "--nocolor"] "Disable colored output")
|
(nocolor ["-C" "--nocolor"] "Disable colored output")
|
||||||
|
@ -125,9 +126,8 @@ Environment variables:
|
||||||
(setenv "YES" auto-accept-p)
|
(setenv "YES" auto-accept-p)
|
||||||
(print! (info "Confirmations auto-accept enabled")))
|
(print! (info "Confirmations auto-accept enabled")))
|
||||||
(throw 'exit "__DOOMRESTART=1 $@"))
|
(throw 'exit "__DOOMRESTART=1 $@"))
|
||||||
;; TODO Rotate logs out, instead of overwriting them?
|
(when loadfile
|
||||||
(delete-file doom-cli-log-file)
|
(load (doom-path loadfile) nil t t))
|
||||||
(delete-file doom-cli-log-error-file)
|
|
||||||
(when help-p
|
(when help-p
|
||||||
(when command
|
(when command
|
||||||
(push command args))
|
(push command args))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue