nit(cli): clarify comments in bin/doomscript

This commit is contained in:
Henrik Lissner 2022-06-22 19:37:27 +02:00
parent d2fbe6a0c9
commit 4dcfc37199
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -1,20 +1,18 @@
#!/usr/bin/env bash
# This is a shebang interpreter for launching emacs lisp scripts with Doom's CLI
# framework preloaded and all the metadata it needs initialized. Use it like so:
# This is a shebang interpreter for launching Emacs Lisp scripts with Doom's CLI
# framework preloaded, plus any environment variables it needs. Use it like so:
#
# #!/usr/bin/env doomscript
# (print! "Hello world!")
#
# For this to work, this file must be in your $PATH.
# For this to work (and to avoid absolute paths in your shebang line), I
# recommend having this file in your $PATH:
#
# export PATH="$HOME/.emacs.d/bin:$PATH"
#
# This can also be exploited to evaluate arbitrary elisp against Doom's CLI
# environment.
#
# This isn't used for bin/doom because of the $PATH requirement (and using
# $BASH_SOURCE to locate it would reduce its POSIX compliance). This shouldn't
# be an issue for folks writing their own CLIs, however.
# This isn't used for bin/doom because of the $PATH/absolute path requirement
# (and using $BASH_SOURCE to locate it would reduce its POSIX compliance), but
# this shouldn't be an issue for folks writing their own CLIs.
case "$EMACS" in
*term*) EMACS=emacs ;;