From 6eaea78d213c47bb9d7bac5147790d18471063a8 Mon Sep 17 00:00:00 2001 From: HAYAMA Kaoru <3752189+hymkor@users.noreply.github.com> Date: Sun, 17 Aug 2025 17:25:02 +0900 Subject: [PATCH] README.md: Add description of `(quit)` --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 0e46fd0..8000f88 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,10 @@ Parameters enclosed in curly braces {...} are optional and can be omitted. - Get the value of the environment variable NAME - `(setenv "NAME" "VALUE")` - Set the value of the environment variable NAME as VALUE +- `(quit {N})` + - Terminates the Lispect process with exit code `N` when running Lispect as a command-line executable. + - `N` must be an integer between 0 and 255. If omitted, the exit code defaults to `0`. + - When Lispect is used as a library (for example, calling `lispect.RunFile` or `lispect.RunString`), the process is **not** terminated. Instead, these functions return an error of type `exit.ExitError` corresponding to the requested exit code. - `*argv*` (formerly `ARGV`, now deprecated)[^1] The list of command-line arguments. - `*program-name*` (formerly `PROGRAM-NAME`, now deprecated)[^1]