Skip to content

Instantly share code, notes, and snippets.

@aaronlelevier
Created June 30, 2015 12:39
Show Gist options
  • Select an option

  • Save aaronlelevier/fe77f78e20cdd90ca267 to your computer and use it in GitHub Desktop.

Select an option

Save aaronlelevier/fe77f78e20cdd90ca267 to your computer and use it in GitHub Desktop.
my favorite bash prompt with color dirs
### shorten my bash settings ###
# If id command returns zero, you’ve root access.
if [ $(id -u) -eq 0 ];
then # you are root, set red colour prompt
PS1="\\[$(tput setaf 1)\\]\\u@\\h:\\w #\\[$(tput sgr0)\\]"
else # normal
PS1="[\\w]$ "
fi
### Dir Colors ###
export CLICOLOR=YES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment