Add return code validation to .ps1
This commit is contained in:
parent
25759d9a4d
commit
1fdc598871
10
.ps1
10
.ps1
|
@ -6,6 +6,14 @@ NC='\[\033[00m\]'
|
|||
GREEN='\[\033[01;32m\]'
|
||||
YELLOW='\[\033[01;33m\]'
|
||||
BLUE='\[\033[01;34m\]'
|
||||
RED='\[\033[01;31m\]'
|
||||
|
||||
PS1="${GREEN}\u@\h${NC}:${BLUE}\w${YELLOW}\$(__git_ps1 ' [%s]')${NC} \$ "
|
||||
SMILEY="${GREEN}:)${NC}"
|
||||
FROWNY="${RED}:(${NC}"
|
||||
SELECT="if [ \$? = 0 ]; then echo \"${SMILEY}\"; else echo \"${FROWNY}\"; fi"
|
||||
|
||||
GIT_BRANCH="$(__git_ps1 ' [%s]')"
|
||||
|
||||
|
||||
PS1="${GREEN}\u@\h${NC}:${BLUE}\w${NC} \`${SELECT}\`${YELLOW}\$(__git_ps1 ' [%s]')${NC} \$ "
|
||||
|
||||
|
|
Loading…
Reference in New Issue