# HG changeset patch # User Oleksandr Gavenko # Date 1453128471 -7200 # Node ID 8a961df3ec333273a1047e321e1139299995bc0a # Parent b1ace79cf017186d19cd27f3ae1e60670ac566f4 Include error code into PS1. Use \r trick even without colors. diff -r b1ace79cf017 -r 8a961df3ec33 .bashrc --- a/.bashrc Mon Jan 18 01:18:55 2016 +0200 +++ b/.bashrc Mon Jan 18 16:47:51 2016 +0200 @@ -9,11 +9,11 @@ . ~/.env fi -PS1='\nbash# ' +PS1='\n================================================================\r$?|\u@\h \w \nbash# ' PS2='> ' case "$TERM" in xterm*|eterm-color|screen|linux) - PS1='\n\033[36m================================================================\r\033[31m\u\033[35m@\h\033[0m\033[36m \w \n\[\033[1m\033[31m\]bash#\[\033[0m\] ' + PS1='\n\033[36m================================================================\r$?|\033[31m\u\033[35m@\h\033[0m\033[36m \w \n\[\033[1m\033[31m\]bash#\[\033[0m\] ' PS2='\[\033[32m\]> \[\033[0m\]' ;; esac