|
|
|
|
|
by grrandalf
993 days ago
|
|
Thanks for posting. Interesting tool -- I'll take a look at this. "Saving streams" is killer. I've been "meaning to build something to solve that" for a looong time. :) :) But you did. Thanks!! https://www.marceltheshell.org/saving-and-recalling-streams ----- One feature request to think about if it doesn't exist: defining multiline functions right at the prompt, which you later export to a .py file. So I think a decent inline editor with support for arrow keys might be useful. https://www.marceltheshell.org/functions-1 This is not a showstopper obviously. The current 'import' functionality should be enough for me for now. Why inline vs. shelling out a dedicated editor: because replacing the screen will take me out of flow because I frequently refer to previous commands' output on the terminal when constructing/editing the next command. |
|
Multiline functions can be defined right now:
So all that would be needed is a way to dump them into a file. That should be doable with another function.One thing to note: You have choices beyond inline and imports for defining new functions. There is a startup file, typically in ~/.config/marcel/startup.py. You can define functions in there, or do imports. The REPL loop checks for modifications to that file, so if you change it, you pick up the changes for your next command.
For example, I just put this into my startup file:
and then without restarting marcel: