- function exitstatus {
- EXITSTATUS="$?"
- BOLD="\[\033[1m\]"
- RED="\[\033[1;31m\]"
- GREEN="\[\e[32;1m\]"
- BLUE="\[\e[34;1m\]"
- OFF="\[\033[m\]"
- PROMPT="[\u@\h ${BLUE}\W${OFF}"
- if [ "${EXITSTATUS}" -eq 0 ]
- then
- PS1="${PROMPT} ${BOLD}${GREEN}:)${OFF} ]\$ "
- else
- PS1="${PROMPT} ${BOLD}${RED}:(${OFF} ]\$ "
- fi
- PS2="${BOLD}>${OFF} "
- }
- PROMPT_COMMAND=exitstatus
Untitled
Posted by Anonymous on Tue 3rd Mar 2015 20:08
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.