Created
January 30, 2015 16:47
-
-
Save ali01/0dc7c80eb9371147d25a to your computer and use it in GitHub Desktop.
zsh-prompt
This file contains 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
setopt prompt_percent prompt_subst | |
autoload colors zsh/terminfo | |
colors | |
for color in RED GREEN YELLOW BLUE MAGENTA WHITE BLACK CYAN; do | |
eval CL_$color='%{$fg[${(L)color}]%}' | |
eval CL_BOLD_$color='%{$fg_bold[${(L)color}]%}' | |
done | |
CL_RESET="%{${reset_color}%}"; | |
PR_PREFIX="${CL_RED}λ${CL_RESET}" | |
PR_USERNAME="%n" | |
PR_HOSTNAME="%m" | |
PR_RET="%(?..[${CL_RED}%?${CL_RESET}])" | |
PR_PWD="%~" | |
if [[ `hostname -s` != "alive-macbookpro" ]] | |
then | |
export PS1="${PR_PREFIX} ${PR_HOSTNAME}${PR_RET}: " | |
else | |
export PS1="${PR_PREFIX} " | |
fi | |
export RPS1='[$PR_PWD]' | |
export PS2='%_>' # default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment