From 55b87b3a94d65104841ca0b36b03ed9ed4d49597 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 18 Aug 2020 19:15:33 -0400 Subject: [PATCH] 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). --- bin/doom | 2 +- modules/config/literate/autoload.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/doom b/bin/doom index 3a9907e99..6f7588309 100755 --- a/bin/doom +++ b/bin/doom @@ -7,7 +7,7 @@ :; _DOOMPOST="$_DOOMBASE/.local/.doom.sh" :; $EMACS --no-site-file --script "$0" -- "$@" :; CODE=$? -:; [ -x "$_DOOMPOST" ] && "$_DOOMPOST" "$0" "$@" +:; [ -x "$_DOOMPOST" ] && source "$_DOOMPOST" :; exit $CODE ;; CLI ops tend to eat a lot of memory. To speed it up, stave off the GC, but diff --git a/modules/config/literate/autoload.el b/modules/config/literate/autoload.el index dac6f05ef..7f22c3f7e 100644 --- a/modules/config/literate/autoload.el +++ b/modules/config/literate/autoload.el @@ -72,7 +72,7 @@ byte-compiled from.") (with-temp-file cache) (if doom-interactive-p t (message "Restarting..." ) - (doom-cli-execute-lines-after "NOTANGLE=1 \"$@\"") + (doom-cli-execute-lines-after "NOTANGLE=1 \"$0\" \"$@\"") (kill-emacs 0)))))) ;;;###autoload