So i'm customizing my PS1-Bash-Prompt at the moment and found the iPython way of displaying in- and output pretty neat.
As you can see, i have my PS1-Prompt configured to look (almost) like the iPython-Input Prompt.
PS1="\n[\t] \e[1m\e[38;5;196m\u@\H\e[0m in \e[1m\e[38;5;196m\w\e[0m\n\e[92mIn [\e[1m\#\e[0m] \$ "
However i can't figure out how to display an Output-Prompt in Bash!
What i'm actually looking for is a way to display a message and increment a counter, whenever a command returns an output to stdout (being able to customize stderr-output would also be nice).
Can someone tell me if and how this can be achieved? Is there a good argument against my idea?
\[
\]
pairs, otherwise line editing falls apart badly.\e[...m
as a sequence that doesn't move the cursor.\u
and friends are unrelated to this and should not be enclosed.