Hey
Sorry for the necromancy, but I just came across this while cleaning my tabs.
Back in the days when Anaconda and ROS 1 were clashing I wrote something similar but a bit more general:
It is a small CLI tool to handle multiple environments (could be ROS 1 and ROS 2 but could also be multiple workspaces or anything else really).
Essentially, you can create small files of bash code that are sourced based on the currently set environment.
So, you would create an environment ros1
and add to that file the code to source your ros1 workspace and anything relevant to that.
You can also edit them later on.
When loading the terminal it will look up which environment is active and source the relevant file.
You can switch the environment for all future terminals or just the current terminal.
All commands have tab completion.