subsh
provides ability to manage and use multiple named shell profiles, each having its own environment and history.
First run subsh init
to setup basic structure in ~/.subsh
.
To create profile run subsh create PROFILE
where PROFILE
is your desired profile name. This will create ~/.subsh/PROFILE
folder with initial filling. You can customize it by modifying ~/.subsh/PROFILE/.bashrc
and placing scripts needed for this profile at ~/.subsh/PROFILE/.bashrc.d
.
You can enter profile by running subsh enter PROFILE
. This will set PROFILE
environment variable to profile name so you can use it in command prompt.
Use subsh list
to list available profiles and subsh delete
to remove no more needed profile.
localsh
is similar to subsh
but allows to maintain only single profile locally in some folder by using per-folder .bashrc
file and .bashrc.d
folder. Comparing to subsh
where all profiles are stored in common folder in user home directory localsh
's profiles are local to directories where they were created and can be moved along with these directories.
Run localsh create
to create profile in current folder. Running at home directory is not supported because it conflicts with per-user bash setup.
Navigate to directory where profile exists and run localsh enter
to launch shell profile. PROFILE
variable will be set to (local)
name.
localsh delete
allows to erase profile data.