|
@@ -4,10 +4,11 @@
|
4
|
4
|
#
|
5
|
5
|
# command line arguments
|
6
|
6
|
#
|
7
|
|
-usage="Usage: $0 [-p | output for prompt]"
|
8
|
|
-while getopts "hp" options; do
|
|
7
|
+usage="Usage: $0 [-p | output for prompt] [-s | short output]"
|
|
8
|
+while getopts "hps" options; do
|
9
|
9
|
case $options in
|
10
|
10
|
p ) PROMPT="True";;
|
|
11
|
+ s ) SHORT="True";;
|
11
|
12
|
h ) echo $usage
|
12
|
13
|
exit 0
|
13
|
14
|
;;
|
|
@@ -75,6 +76,9 @@ fi
|
75
|
76
|
if [[ $PROMPT ]]; then
|
76
|
77
|
# print status
|
77
|
78
|
echo -e "$git_status_color├──$COLOR_GREEN($git_branch)$git_status_color - $git_status_text - $COLOR_CYAN$git_url$COLOR_WHITE"
|
|
79
|
+elif [[ $SHORT ]]; then
|
|
80
|
+ echo -n -e "$COLOR_GREEN($git_branch)$git_status_color - $git_status_text $COLOR_WHITE"
|
|
81
|
+ exit 0
|
78
|
82
|
else
|
79
|
83
|
# print status and
|
80
|
84
|
echo -e "$git_status_color┌───┤ $git_status_text ├────────────────────────────────────────────────────────────────"
|