bin/doom: source postscript instead

This way the postscript can refer to the doom script via "$0" and its
arguments via "$@" (making it easier for cli commands to rerun the last
command).
This commit is contained in:
Henrik Lissner 2020-08-18 19:15:33 -04:00
parent 394a18096e
commit 55b87b3a94
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@
:; _DOOMPOST="$_DOOMBASE/.local/.doom.sh" :; _DOOMPOST="$_DOOMBASE/.local/.doom.sh"
:; $EMACS --no-site-file --script "$0" -- "$@" :; $EMACS --no-site-file --script "$0" -- "$@"
:; CODE=$? :; CODE=$?
:; [ -x "$_DOOMPOST" ] && "$_DOOMPOST" "$0" "$@" :; [ -x "$_DOOMPOST" ] && source "$_DOOMPOST"
:; exit $CODE :; exit $CODE
;; CLI ops tend to eat a lot of memory. To speed it up, stave off the GC, but ;; CLI ops tend to eat a lot of memory. To speed it up, stave off the GC, but

View file

@ -72,7 +72,7 @@ byte-compiled from.")
(with-temp-file cache) (with-temp-file cache)
(if doom-interactive-p t (if doom-interactive-p t
(message "Restarting..." ) (message "Restarting..." )
(doom-cli-execute-lines-after "NOTANGLE=1 \"$@\"") (doom-cli-execute-lines-after "NOTANGLE=1 \"$0\" \"$@\"")
(kill-emacs 0)))))) (kill-emacs 0))))))
;;;###autoload ;;;###autoload