File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
+ # assume the gitstatus.py is in the same directory as this script
4
+ # code thanks to http://stackoverflow.com/questions/59895
5
+ if [ -z " ${__GIT_PROMPT_DIR} " ]; then
6
+ SOURCE=" ${BASH_SOURCE[0]} "
7
+ while [ -h " ${SOURCE} " ]; do
8
+ DIR=" $( cd -P " $( dirname " ${SOURCE} " ) " && pwd ) "
9
+ SOURCE=" $( readlink " ${SOURCE} " ) "
10
+ [[ $SOURCE != /* ]] && SOURCE=" ${DIR} /${SOURCE} "
11
+ done
12
+ __GIT_PROMPT_DIR=" $( cd -P " $( dirname " ${SOURCE} " ) " && pwd ) "
13
+ fi
14
+
3
15
function git_prompt_config()
4
16
{
5
17
# Colors
@@ -34,7 +46,9 @@ function git_prompt_config()
34
46
GIT_PROMPT_CLEAN=" ${BoldGreen} ✔"
35
47
36
48
# Various variables you might want for your PS1 prompt instead
37
- local Time12a=" \@"
49
+ local Time12a=" \$ (date +%H:%M)"
50
+ # local Time12a="(\$(date +%H:%M:%S))"
51
+ # local Time12a="(\@))"
38
52
local PathShort=" \w"
39
53
40
54
PROMPT_START=" ${Yellow}${PathShort}${ResetColor} "
You can’t perform that action at this time.
0 commit comments