I currently have my bash PS1 set to something like this:
PS1="\[\`if [[ \$? = "0" ]]; then echo '\e[32m\h\e[0m'; else echo '\e[31m\h\e[0m' ; fi\`:\w\n\$ "
How can I make it show the absolute path instead of the relative one (e.g. /home/dave/dir instead of ~/dir)?
/home/dave/dirand~/dirare both absolute paths, the second uses an abbreviation for your home directory. A relative path is a path that is relative to your current directory (e.g.../dir) rather than starting at root (/). – Doug Harris Oct 22 '10 at 13:38