I was ruminating about adding "sessions" to marcel, in the last blog post. It's done! They're called workspaces, not sessions.
A workspace:
Has its own startup script. I found that I was growing a large startup script (~/.config/marcel/startup.py), with imports and functions and database access configurations useful in different projects. Now I can have a workspace per project, and each workspace's startup script has only the definitions needed for that project.
Has its own command history. Wading through a command history is easier if you only have the commands relevant to your project.
Persists environment variables. This is the most significant improvement. If you use a workspace, then any variables you define are saved between sessions. I found that I would spend some time playing with a complex pipeline, perfecting it, and then writing it down in a notes file for later use. With workspaces, I just assign it to a variable, and it's always present when I use the same workspace. This is also useful for saving streams between sessions. (If you don't use a workspace, then environment variables are not saved.)
I've added a page to the tutorial describing workspaces. Read more about them here.
Comments