Skip to main content
added 38 characters in body
Source Link
l0b0
  • 53.6k
  • 48
  • 225
  • 398

Here you goHere you go - This Works For Me (TM) in Ubuntu and a custom Linux build. It might be overkill for your case; lines 40-48 and 96-106 should be the most relevantother Linuxes (Linuxen?).

The reason for putting the exit code detection in $PS1 is that one host has a read-only $PROMPT_COMMAND set before .bashrc is read.

Here you go - This Works For Me (TM) in Ubuntu and a custom Linux build. It might be overkill for your case; lines 40-48 and 96-106 should be the most relevant.

The reason for putting the exit code detection in $PS1 is that one host has a read-only $PROMPT_COMMAND set before .bashrc is read.

Here you go - This Works For Me (TM) in Ubuntu and other Linuxes (Linuxen?).

The reason for putting the exit code detection in $PS1 is that one host has a read-only $PROMPT_COMMAND set before .bashrc is read.

added 139 characters in body
Source Link
l0b0
  • 53.6k
  • 48
  • 225
  • 398

Here you go - This Works For Me (TM) in Ubuntu and a custom Linux build. It might be overkill for your case; lines 40-48 and 96-106 should be the most relevant.

The reason for putting the exit code detection in $PS1 is that one host has a read-only $PROMPT_COMMAND set before .bashrc is read.

Here you go - This Works For Me (TM) in Ubuntu and a custom Linux build. It might be overkill for your case; lines 40-48 and 96-106 should be the most relevant.

Here you go - This Works For Me (TM) in Ubuntu and a custom Linux build. It might be overkill for your case; lines 40-48 and 96-106 should be the most relevant.

The reason for putting the exit code detection in $PS1 is that one host has a read-only $PROMPT_COMMAND set before .bashrc is read.

Source Link
l0b0
  • 53.6k
  • 48
  • 225
  • 398

Here you go - This Works For Me (TM) in Ubuntu and a custom Linux build. It might be overkill for your case; lines 40-48 and 96-106 should be the most relevant.