Add a new line after the output of each bash command

I am setting up my terminal.

I currently have the following:

http://d.pr/i/crBm

What I want is a new line after the output of each command, for example:

http://d.pr/i/NVX5

The only way I was able to achieve something close was to add a new line at the beginning of mine PS1. This works, but it makes me annoyed that the first time I open a bash prompt, there is a new line above the first line. Is there any other way to do this?

+4
source share
1 answer

One approach using printf:

$ printf '%s\n' * $'\n'

or better (for each team):

$ PROMPT_COMMAND="echo"
$ ls

From man bash:

  PROMPT_COMMAND
  If set, the value is executed as a command prior to issuing
  each primary prompt.
+6

All Articles