Skip to content

Instantly share code, notes, and snippets.

@v-fox
Created December 23, 2016 11:05
Show Gist options
  • Save v-fox/327f4ac7ceb250af034a05bdf0717131 to your computer and use it in GitHub Desktop.
Save v-fox/327f4ac7ceb250af034a05bdf0717131 to your computer and use it in GitHub Desktop.
fancy prompt for zshrc
export BLACK="%{"$'\033[01;30m'"%}"
export GREEN="%{"$'\033[01;32m'"%}"
export RED="%{"$'\033[01;31m'"%}"
export YELLOW="%{"$'\033[01;33m'"%}"
export BLUE="%{"$'\033[01;34m'"%}"
export BOLD="%{"$'\033[01;39m'"%}"
export NORM="%{"$'\033[00m'"%}"
if [ "`id -u`" = "0" ]; then
PROMPT="@${RED}%M${NORM} (${YELLOW}%D - %*${NORM}) [ ${BLUE}%~${NORM} ] ${RED}##${NORM} ";
else
PROMPT="${GREEN}%n${NORM}@${GREEN}%m${NORM} (${YELLOW}%*${NORM}) [ ${BLUE}%~${NORM} ] ${BLUE}%#${NORM} ";
# PS1='%n@%m (%T) [ %~ ] %# ';
PATH="${PATH}:/usr/local/sbin:/usr/sbin:/sbin"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment