dotfiles/.ps1

20 lines
424 B
PowerShell

#!/bin/bash
NC='\[\033[00m\]'
GREEN='\[\033[01;32m\]'
YELLOW='\[\033[01;33m\]'
BLUE='\[\033[01;34m\]'
RED='\[\033[01;31m\]'
SMILEY="${GREEN}:)${NC}"
FROWNY="${RED}:(${NC}"
SELECT="if [ \$? = 0 ]; then echo \"${SMILEY}\"; else echo \"${FROWNY}\"; fi"
GIT_BRANCH="$(__git_ps1 ' [%s]')"
export PROMPT_DIRTRIM=2
# actually export PS1
PS1="${GREEN}\u@\h${NC}:${BLUE}\w${YELLOW}\$(__git_ps1 ' [%s]')${NC} \`${SELECT}\` \$ "