Description
Description of the new feature/enhancement
This request is for multi-layer support in a terminal. This would be used for CLI-based wizards, menus, tools (think htop), etc. without disturbing the root command line.
This is not panes or tabs, which open additional terminal processes. Each layer in the terminal would be part of the same command line process. It would be like using layers in a photo/drawing editor, but with CLI.
Example:
- PowerShell starts in the default layer (layer 0). This is just the normal terminal.
- A multi-layer aware wizard/menu/tool could then request a new layer from the runspace.
a. This would be layer X (i.e. layer 1 if run from the root/default layer).
b. The wizard/menu/tool would run in layer 1.
c. Layer 1 would be a separate thread in the same process where the console/terminal is running. Like a ThreadJob…or something along those lines.
d. While the wizard is running the user only sees Layer 1, while Layer 0 lurks inactive/deactivated in the background.
- The wizard completes, Layer 1 is closed, returning any objects needed back to layer 0 in the process.
- User continues in Layer 0 (default), right where they left off. The default console is undisturbed by the wizard.
Proposed technical implementation details (optional)
I have no idea how this would work. I only know it would be awesome 😊
I assume that PowerShell would need to know about layers to use them. I would assume changes to both PowerShell and terminal are needed. Or maybe not, if PowerShell can do all of this virtually.
If each layer is just a text buffer that's swapped in and out of the process that displays terminal/console to the user then it could be cross-platform, cross-terminal/console. Maybe… I don't know for sure. Just a thought.