shell fully configurable

This commit is contained in:
Ava Apples Affine 2023-03-23 11:52:36 -07:00
parent 1ce5fd3454
commit a711b32730
Signed by: affine
GPG key ID: 3A4645B8CF806069
4 changed files with 117 additions and 29 deletions

View file

@ -395,8 +395,12 @@ Errors during configuration are non-terminal. In such a case any defaults which
*** Configuration Values
- CFG_RELISH_POSIX (default false): when true, enables POSIX style job control.
- CFG_RELISH_ENV (default true): when true, interpreter's variable table and environment variable table are kept in sync.
- CFG_RELISH_PROMPT (default (echo "λ ")): A *function* definition which is called in order to output the prompt for each loop of the REPL.
This function will be reloaded each REPL loop and will be called by the interpreter with no arguments.
- CFG_RELISH_L_PROMPT (default 'λ'): a function that is called with no arguments to output the left hand of the prompt
- CFG_RELISH_R_PROMPT (default ''): a function that is called with no arguments to output the right hand of the prompt
- CFG_RELISH_PROMPT_DELIMITER (default '>'): a function that is called with no arguments to output the delimiter separating prompt from user input
*** Prompt design
For an example of prompt design see file:snippets/mood-prompt.rls
*** Further configuration
Further configuration can be done by loading scripts that contain more functions and data to evaluate.
@ -477,12 +481,16 @@ Note: this section will not show the status of each item unless you are viewing
Note: this section only tracks the state of incomplete TODO items. Having everything on here would be cluttered.
** TODO Pre-alpha tasks
- Shell prompt is fully configurable (History, L, R, and Delim)
- paths function
- add-path function
- Shell module
- Only loadable via POSIX config var
- Overload Load function to hook into this lib
- arg processor because these are control flow
- Process launching with environment variables
- "flag" function
- "switch" function
- "with" function (load with)
- Optional form of process which allows fd redirecting
- Background processes (bg function)
- Foreground process TTY (fg function)
@ -492,6 +500,9 @@ Note: this section only tracks the state of incomplete TODO items. Having everyt
- make const all the error messages
** TODO alpha tasks
- History length configurable
- Search delim configurable
- Escape sequences in strings
- Rename to Flesh
- master branch -> main branch
- Create a dedicated community channel on matrix.sunnypup.io