vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I've put this in my profile: if type -p printf > /dev/null 2>&1; then red=$(printf '\e[31m') export PS1='\[\e[0;36m\]\w\[\e[01m\]\[\e[30m\]$([ $? -eq 0 ]||printf $red)\$\[\e[0m\] ' else export PS1='\[\e[0;36m\]\w\[\e[01m\]\[\e[30m\]\$\[\e[0m\] ' fi Which makes the promptstring turn red on non-zero exit of the previous command. Which catches all those programms that give zero output on error. # Han |