docs(cli): add more exit! usecases

This commit is contained in:
Henrik Lissner 2022-06-19 22:01:28 +02:00
parent da74525cbc
commit 7862a9e15d
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -1571,12 +1571,19 @@ example:
This reruns the current command with two new switches. This reruns the current command with two new switches.
(exit! \"emacs -nw FILE\") (exit! \"emacs -nw FILE\")
Opens Emacs on FILE Opens Emacs on FILE
(exit! \"emacs\" \"-nw\" \"FILE\")
Opens Emacs on FILE, but each argument is escaped (and nils are ignored).
(exit! t) or (exit! nil) (exit! t) or (exit! nil)
A safe way to simply abort back to the shell with exit code 0 A safe way to simply abort back to the shell with exit code 0
(exit! 42) (exit! 42)
Abort to shell with an explicit exit code. Abort to shell with an explicit exit code.
(exit! context) (exit! context)
Restarts the current session, but with context (a `doom-cli-context' struct). Restarts the current session, but with context (a `doom-cli-context' struct).
(exit! :pager [FILES...])
Invoke $DOOMPAGER (or less) on the output of this session. If ARGS are given, launch the pager on those
(exit! :pager? [FILES...])
Same as :pager, but does so only if output is longer than the terminal is
tall.
See `doom-cli--restart' for implementation details." See `doom-cli--restart' for implementation details."
(doom-cli--exit (flatten-list args) doom-cli--context)) (doom-cli--exit (flatten-list args) doom-cli--context))