Search code examples
bashterminalnewlinexfce

How to add a new line before output in xfce4-terminal


I want a to add some padding to outputs in the terminal like this

prompt >> command

output

prompt >> command

I know how to add a newline after the output, by appending a '\n' before PS1. However how do I add a newline after every command I enter.

Is there any other way to achieve this padding in xfce-4 terminal


Solution

  • trap echo DEBUG
    PS1="prompt >> "
    

    trap with DEBUG will run echo to create a newline before every command