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:
@@ -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`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user