fix: REPL exit returns to shell without closing terminal
Summary
- Add
exitand:exitREPL meta-commands alongside:quitso bareexitleaves the REPL instead of being compiled as Li code - Use
repl_quit()that returns when the REPL is sourced (install scripts) - Stop
install.ps1from callingexit 0after interactive REPL on success, which closed the PowerShell session when quitting via:quit
Changes
-
scripts/lic-repl.sh-exit/:exitmeta-commands;repl_quit()for sourced mode -
scripts/install.ps1,site/install.ps1,site/cli/install.ps1- return to shell after REPL instead ofexit 0 -
li-tests/repl/run.sh- regression tests for exit meta-commands -
docs/guide/repl.md- document exit meta-commands
Test plan
-
Run li-tests/repl/run.sh- exit/:exit/:quit leave REPL cleanly -
On Windows: run install.ps1, enter REPL, type:quit- PowerShell session stays open -
On Unix: run install script, enter REPL, quit - shell remains interactive