dotfiles/.ps1

20 lines
424 B
PowerShell
Raw Normal View History

2021-05-19 11:46:36 +02:00
#!/bin/bash
NC='\[\033[00m\]'
GREEN='\[\033[01;32m\]'
YELLOW='\[\033[01;33m\]'
BLUE='\[\033[01;34m\]'
2021-05-19 12:15:47 +02:00
RED='\[\033[01;31m\]'
2021-05-19 11:46:36 +02:00
2021-05-19 12:15:47 +02:00
SMILEY="${GREEN}:)${NC}"
FROWNY="${RED}:(${NC}"
SELECT="if [ \$? = 0 ]; then echo \"${SMILEY}\"; else echo \"${FROWNY}\"; fi"
GIT_BRANCH="$(__git_ps1 ' [%s]')"
2023-03-09 10:19:04 +01:00
export PROMPT_DIRTRIM=2
2021-05-19 10:27:37 +02:00
# actually export PS1
PS1="${GREEN}\u@\h${NC}:${BLUE}\w${YELLOW}\$(__git_ps1 ' [%s]')${NC} \`${SELECT}\` \$ "
2021-05-19 08:46:57 +02:00