Hacker News new | ask | show | jobs
by pneumic 842 days ago
At first glance, I love the idea of the prompt being in a static position, separated from the output. Surprised that this is the first time I've seen something like that.
1 comments

> At first glance, I love the idea of the prompt being in a static position, separated from the output. Surprised that this is the first time I've seen something like that.

I effectively have that by sticking newlines into my PS1 variable.

And, yes, it's because its easier to track when the prompt is always in the same place after every command.

Could you elaborate more? I'm having trouble visualizing what you mean.
> Could you elaborate more? I'm having trouble visualizing what you mean.

The standard prompt is PS1, which after every command, places the cursor at some point in the line that depends on the width of $PS1 contents.

By appending a newline to the existing PS1 variable, the cursor is always at the same point after every command - far left on the last line.

I did play with embedding the last command into the PS1 variable too, so that not only is the cursor at a constant position, but the line above it prints the last command too (!! or something like that)

Ah yeah, I do this too. The hostname and current working dir gets its own line, then on the line below I have my prompt sigil (% or $, depending on shell). What I meant was in the new Jetbrains IDE terminal, the prompt is pinned in a pane at the bottom of the window while you view your output doing its thing in the pane above.
I think the GGP is referring to how, in this new interface, the prompt is always pinned to the bottom even if you scroll the terminal - so you can scroll back through the output of, say, `rsync --help` to find what you need, without losing sight of the prompt pinned to the bottom.