Open NogginBops opened 1 month ago
Did you see this part of the documentation? If not, where did you look? What did you search for?
https://numbat.dev/doc/cli-customization.html#custom-functions-constants-units
I don't want to have the file be in some modules folder. I want to be able to load any file anywhere on my computer. Like loading files in prolog repl or similar.
I could see utility in a command that loads the contents of a file not necessarily in a modules folder. It would make it easier to use the cli as a REPL while developing a script, without cluttering the namespace with each new project or having to update configurations or environment variables for each.
When writing F# code, I frequently do something similar by loading scripts into fsi to experiment with the outputs of the functions I wrote. Currently I often do the same in Numbat by copy and pasting definitions manually.
Okay. So basically the counterpart to the save
command. Sounds reasonable.
I started working on this feature but was not sure how to call the new command. Maybe load
as the opposite of save
or just run
possibly?
I started working on this feature but was not sure how to call the new command. Maybe
load
as the opposite ofsave
or justrun
possibly?
I like load
. Maybe hold off from doing too much work on commands until this discussion is resolved. Also note that there is another commands-PR (#590)
It's very handy for testing and development to be able to load functions specified in a file into an interactive session.
This might be possible using modules (?), but the documentation around modules is very lacking and it's very unclear how you would load a file in the REPL environment.