Hacker News new | ask | show | jobs
by arrakeen 878 days ago
what kind of psychopath has a two line prompt?
8 comments

I do.

I'd like to have some usefull information about my session but also prefer when my input begins from the first column.

I like my prompt being a separator between the output of the previous cmd and the next cmd I type.
If you find that wasteful, you can use the “transient prompt” feature to only print the full prompt to the current line, but keep the command history on one line per command in the terminal.
In contrast to the minimalist philosophy, I want to have as much visual information about the active state of my session as possible. So many stories of deleted files and databases, botched git actions and server crashes due to admins/devs forgetting which folder/host they are on, or which user they are logged in as, or whether the previous command failed or not.
I don’t like my commands starting at a different column depending on which directory I’m in.
I can see arguments for both sides.

Personally, I find the extra blank line to be a useful visual separator between lines of output. Particularly useful when running commands with lots of output or 'cat'-ing files or logs.

I also can't understand the two-line prompt. I want my prompt to take as little space as possible.
I appreciate the extra context information. Displaying the user/system over ssh is pretty nice. I've also done similar in windows for network drives.
I agree with the latter point. But I use xonsh as the shell and that has a prompt which can go on the last line of the terminal and does not get repeated each time, so when you scroll back you don't all the information each time.

I use that for starship information and the prompt is just the return code p[lus a character.

Oh, that's a great feature, wish it were more widespread
It depends on a library pigments that treats the Terminal as a TUI and not just like plain shells that just treat the terminal as a coloured teletype
lot of information that'd be nicer to have at a higher level than the prompt, like the tmux or screen status bar. Be even better if a "prompt" like this could set a variable using ANSI escapes that various terminal emulators could display.