Created
          August 18, 2023 09:59 
        
      - 
      
- 
        Save refactor/8a1aaef9769845e6d74953acae619cd2 to your computer and use it in GitHub Desktop. 
    bash error prompt
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | PS1="\$(\ | |
| EXIT=\"\$?\" ; \ | |
| RED=\"\[\e[31m\]\" ; \ | |
| WHITE=\"\[\e[0m\]\" ; " | |
| PS1+="\ | |
| endchar=\"\\$\${WHITE}\" ; \ | |
| if [ \"\$EXIT\" -eq 0 ]; then \ | |
| endchar=\"\${WHITE}\$endchar\" ; \ | |
| else \ | |
| endchar=\"\${RED}[\$(errno \${EXIT})] \$endchar\";\ | |
| fi ; " | |
| PS1+="echo \"${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \$endchar \" )" | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment