Implement programmable prompt (issue #09)

Replace static _PROMPT/_PROMPT2 with dynamic __prompt(exitcode)/__prompt2(exitcode)
functions. Fallback chain: __prompt() → _PROMPT → "> ". Install a default __prompt
that shows the current directory with ~ abbreviation. Track last exit code from the
REPL loop and pass it to the prompt function.
This commit is contained in:
Cormac Shannon committed 2026-03-03 23:19:09 +00:00
1 parent bbc0f24009
commit e8756d5d78
3 files changed
+179 -5

No files matched your search

+1 -2
View File
@@ -1,7 +1,6 @@
# 09 — Programmable prompt
**Status:** open
**Blocked by:** #08
**Status:** done
Users should be able to customize the shell prompt by defining a Lua function, similar to how other shells use `PS1`/`PROMPT_COMMAND`/`precmd`.