From 637b5d5534469ebb15826139e1b3df12a1cc9309 Mon Sep 17 00:00:00 2001 From: Reinaldo Colina Date: Thu, 27 Aug 2015 12:14:13 -0700 Subject: issue-17: Add arguments to make the prompt shorter --- prompt.bash | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'prompt.bash') diff --git a/prompt.bash b/prompt.bash index a3fe420..1e79cd9 100755 --- a/prompt.bash +++ b/prompt.bash @@ -1,11 +1,18 @@ #! /usr/bin/env bash dot="$(cd "$(dirname "$0")"; pwd)" +git_label="" +args=$@ source "$dot/radar-base.sh" if is_repo; then - printf " \x01\033[1;30m\x02git:(\x01\033[0m\x02" - bash_color_remote_commits + if show_git_label $args; then + git_label="git:" + fi + printf " \x01\033[1;30m\x02$git_label(\x01\033[0m\x02" + if show_remote_status $args; then + bash_color_remote_commits + fi readable_branch_name bash_color_local_commits printf "\x01\033[1;30m\x02)\x01\033[0m\x02" -- cgit v1.2.3