David Blume commited on 2018-04-23 20:13:37
Showing 1 changed files, with 3 additions and 2 deletions.
... | ... |
@@ -4,10 +4,11 @@ if [[ $(uname -s) != Darwin* ]] && [ -f /etc/bashrc ]; then |
4 | 4 |
. /etc/bashrc |
5 | 5 |
fi |
6 | 6 |
|
7 |
+export PROMPT_DIRTRIM=3 |
|
7 | 8 |
if [[ -n $SSH_CLIENT ]]; then |
8 |
- export PS1='\[\e[48;5;$((!!$?*36+16));38;5;242m\]\h:\W$\[\e[0m\] ' |
|
9 |
+ export PS1='$(if [ $? -eq 0 ]; then echo -e "\[\e[32m\]\xe2\x9c\x93"; else echo -e "\[\e[31m\]\xe2\x9c\x97"; fi) \[\e[38;5;242m\]\h:\w$\[\e[0m\] ' |
|
9 | 10 |
else |
10 |
- export PS1='\[\e[48;5;$((!!$?*36+16));38;5;242m\]\W$\[\e[0m\] ' |
|
11 |
+ export PS1='$(if [ $? -eq 0 ]; then echo -e "\[\e[32m\]\xe2\x9c\x93"; else echo -e "\[\e[31m\]\xe2\x9c\x97"; fi) \[\e[38;5;242m\]\w$\[\e[0m\] ' |
|
11 | 12 |
fi |
12 | 13 |
|
13 | 14 |
set -o vi |
14 | 15 |