Skip to content

fix: REPL exit returns to shell without closing terminal

Administrator requested to merge fix/li-repl-exit into main

Summary

  • Add exit and :exit REPL meta-commands alongside :quit so bare exit leaves the REPL instead of being compiled as Li code
  • Use repl_quit() that returns when the REPL is sourced (install scripts)
  • Stop install.ps1 from calling exit 0 after interactive REPL on success, which closed the PowerShell session when quitting via :quit

Changes

  • scripts/lic-repl.sh - exit / :exit meta-commands; repl_quit() for sourced mode
  • scripts/install.ps1, site/install.ps1, site/cli/install.ps1 - return to shell after REPL instead of exit 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

Merge request reports

Loading