Add a break(a red line) after every bash output

When using bash, I want to append a break or something else like a red line to the command output, so that I can clearly distinguish multiple command results.

Preview the effect

By default, every bash output has no gap between each other:

1660477782789

After configuration, every bash output has a red line between each other:

1660477788383

The latter is much more clear than the former.

How to make it happen

To add a red line between outputs, edit ~/.bashrc and add the following line:

PROMPT_COMMAND='echo "$(tput setaf 1)--------------------$(tput sgr0)"'

I just want a simple break

If a simple break is enough for you, it's easier. Edit ~/.bashrc and add the following line:

PROMPT_COMMAND='echo'
Posted on 2022-04-11