3 ms·
My most frustrating thing is when you use a command that doesn't output a newline and the next prompt becomes messed up when you use line editing commands. Its
by bawolff 2y ago
My most frustrating thing is when you use a command that doesn't output a newline and the next prompt becomes messed up when you use line editing commands.
Its not clear what the solution would be. My pet solution would be to have a control character that is only a newline if the previous character was not a newline, which you could put un $PROMPT
- scintill76 2y agoI believe fish shell solves this by inserting a visible "⏎" character at the end of the line and moving to the beginning of the next line for the prompt.
- db48x 2y agoif [[ "${TERM}" != "dumb" ]] || [[ $- == *i* ]]; then PROMPT_COMMAND='printf "⏎%$((COLUMNS-1))s\\r"'$'\n'"$PROMPT_COMMAND" fi
- bawolff 2y agoThanks! This has been life changing for me.