Created
December 23, 2016 11:05
-
-
Save v-fox/327f4ac7ceb250af034a05bdf0717131 to your computer and use it in GitHub Desktop.
fancy prompt for zshrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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