fall back on shell command behaviour for undefined variables

Signed-off-by: Ava Hahn <ava@sunnypup.io>
This commit is contained in:
Ava Apples Affine 2023-10-12 20:50:27 -07:00
parent 0babc1986a
commit c05b94e92a
5 changed files with 84 additions and 15 deletions

View file

@ -170,3 +170,27 @@ Or:
(pacman-search "xfce4")
#+END_EXAMPLE
* Implicit Load
Typically, any call to an undefined function, lambda, or symbol will result in an undefined symbol error. For example, here is a call to GCC without explicitly prepending the ~load~ function:
#+BEGIN_EXAMPLE
> (gcc myfile.c -o myfile)
** ERROR TRACEBACK
> gdb: (is an undefined symbol)
Please refactor forms and try again...
#+END_EXAMPLE
With the ~implicit load~ feature any call to an undefined function will trigger the ~load~ function as if it had been there the whole time. The above example would yield a new subprocess running GCC (assuming it is installed and accessible). This allows users to quickly type shell commands at the prompt as if they were using a standard shell. Any reference to an undefined symbol outside of where a function would be will still cause an error.
#+BEGIN_EXAMPLE
> ls -la .config
...... (redacted directory list) .....
#+END_EXAMPLE
Implicit load can be used by building relish with the following command:
#+BEGIN_EXAMPLE
cargo build -F implicit-load
#+END_EXAMPLE