Append a newline to your shell prompt
The default shell prompt (for Ubuntu 20) looks like this:
If you add a newline around the end of the
PS1 defintion, your shell will start looking like this (after re-running
Why do this?
- More screen width for a one-liner. You can write longer commands before you get disrupted by line-wrapping. Especially useful if you’re using Termux.
- Easier to read the prompt. Your eyes naturally capture text above&below the line you’re working on, so you get to see more without shifting attention.
- It’s an extremely simple thing to do. It’s cumbersome and potentially disruptive to install
$your_favourite_shell_themeevery time you touch a remote machine, whereas adding
.bashrctakes about ten seconds in a text editor.