I have this:
$ any_command
any_command: command not found
But i need this:
$ any_command
any_command: command not found
What add to PS1?
I have this:
$ any_command
any_command: command not found
But i need this:
$ any_command
any_command: command not found
What add to PS1?
You can use trap
command for this with DEBUG
signal:
trap 'echo' DEBUG
This will print a newline before any command output.
$ any_command
bash: any_command: command not found
$
Or:
$ date
Tue Sep 29 17:51:38 EDT 2015
$
The GNU Bash Manual contains a section on prompting. The newline escape is probably what you're looking for. For example:
export PS1='\n$ '
Alternatively, you can simply add an echo before or after your command. For example:
$ echo; echo foo
foo
You can automate the extra echo (or other screen output) with the Bash shell's PROMPT_COMMAND variable. The PROMPT_COMMAND isn't limited to just prompting, but it can certainly be leveraged to do what you want in this case. For example:
# call echo before issuing PS1
export PROMPT_COMMAND='echo'
# print the equals sign 80 times before issuing PS1
export PROMPT_COMMAND="printf '=%.0s' {1..80}"