I'd like to arrange the console so the current command prompt always stays at the top, while previously executed commands and their output appear underneath it in descending order. Ideally, each new command would be added below the prompt, with older commands remaining farther down. Is this possible with PowerShell, the terminal, or a custom prompt configuration?
4 Answers
This is mainly controlled by the terminal emulator rather than PowerShell itself. A terminal’s screen buffer is designed for normal bottom-up scrolling, so achieving this layout would likely require a custom terminal emulator or a heavily customized shell interface.
You could experiment with Get-History, the PowerShell profile, and PSReadLine. For example, the prompt function could display recent history each time a command finishes. However, the screen would become difficult to follow because output and history would constantly be redrawn rather than forming a simple linear transcript. A terminal UI with separate areas for the prompt, output, and history would be a cleaner approach.
If the main goal is quickly finding earlier prompts, shell integration is a better solution than reversing the entire layout. Modern terminals can mark prompt locations and let you jump between them with a shortcut, so you can move directly to the previous or next command instead of scrolling through the buffer.
A prompt function can technically send cursor-control escape sequences to move the cursor to the top of the screen. In practice, this causes problems: progress indicators and command output can overwrite the prompt, and previous text may not be cleared correctly. It might work for a limited display that redraws after every command, but it would be fragile in a normal terminal.

That makes sense. I’ll probably avoid reinventing the whole terminal unless I find an existing emulator that already supports it.