Skip to content

Instantly share code, notes, and snippets.

@ali01
Created January 30, 2015 16:47
Show Gist options
  • Save ali01/0dc7c80eb9371147d25a to your computer and use it in GitHub Desktop.
Save ali01/0dc7c80eb9371147d25a to your computer and use it in GitHub Desktop.
zsh-prompt
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