diff --git a/giti b/giti index 160431a..2c80c80 100755 --- a/giti +++ b/giti @@ -4,10 +4,11 @@ # # command line arguments # -usage="Usage: $0 [-p | output for prompt]" -while getopts "hp" options; do +usage="Usage: $0 [-p | output for prompt] [-s | short output]" +while getopts "hps" options; do case $options in p ) PROMPT="True";; + s ) SHORT="True";; h ) echo $usage exit 0 ;; @@ -75,6 +76,9 @@ fi if [[ $PROMPT ]]; then # print status echo -e "$git_status_color├──$COLOR_GREEN($git_branch)$git_status_color - $git_status_text - $COLOR_CYAN$git_url$COLOR_WHITE" +elif [[ $SHORT ]]; then + echo -n -e "$COLOR_GREEN($git_branch)$git_status_color - $git_status_text $COLOR_WHITE" + exit 0 else # print status and echo -e "$git_status_color┌───┤ $git_status_text ├────────────────────────────────────────────────────────────────"