Rewrite doom-doctor
- Use message library instead of reinventing the wheel - Fix -d/--debug support for `bin/doom doctor` - Add indent and autofill support to print! and format! - Add doom-message-backend for forcing format! to use a specific backend - Phase out anaphoric when! macro in doctor scripts, it was hardly used
This commit is contained in:
parent
51a28249bd
commit
9bea168cc1
5 changed files with 144 additions and 103 deletions
3
bin/doom
3
bin/doom
|
@ -4,7 +4,8 @@
|
|||
":"; VERSION=$($EMACS --version | head -n1)
|
||||
":"; [[ $VERSION == *\ 2[0-2].[0-1].[0-9] ]] && { echo "You're running $VERSION"; echo "That version is too old to run Doom. Check your PATH"; echo; exit 2; }
|
||||
":"; DOOMBASE=$(dirname "${BASH_SOURCE:-${(%):-%x}}")/..
|
||||
":"; [[ $1 == doc || $1 == doctor ]] && { cd "$DOOMBASE"; exec $EMACS --script bin/doom-doctor; exit 0; }
|
||||
":"; [[ $1 == -d || $1 == --debug ]] && { shift; export DEBUG=1; }
|
||||
":"; [[ $1 == doc || $1 == doctor ]] && { cd "$DOOMBASE"; shift; exec $EMACS --script bin/doom-doctor "$@"; exit 0; }
|
||||
":"; [[ $1 == run ]] && { cd "$DOOMBASE"; shift; exec $EMACS -q --no-splash -l bin/doom "$@"; exit 0; }
|
||||
":"; exec $EMACS --script "$0" -- $@
|
||||
":"; exit 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue