containers / toolbox

Tool for interactive command line environments on Linux
https://containertoolbx.org/
Apache License 2.0
2.38k stars 208 forks source link

Add a `toolbox leave` command to leave the current toolbox and get back to the host #1430

Open laolux opened 6 months ago

laolux commented 6 months ago

Is your feature request related to a problem? Please describe. This feature request is closely related to #218. Basically the issue is that when you have many terminal sessions open and accidentally close your last host terminal session, then you cannot open a new host terminal session without closing all toolbox terminal sessions first.

Describe the solution you'd like It would be great to have a toolbox leave command. Basically the inverse of toolbox enter: If you are in a toolbox, then toolbox leave will drop the current terminal session back to the host. Easy to understand and use for everyone.

Describe alternatives you've considered They are methods to avoid opening new terminal sessions in the same toolbox as the current one permanently, but it is somewhat difficult (need to put commands in your ~/.bash_profile). Also, the default behavior to open a new terminal session in the same toolbox as the current session is handy. It only becomes an issue when I accidentally close my last host terminal session and then have no way out of all toolbox terminal sessions short of closing them all.