summaryrefslogtreecommitdiffstats
path: root/radar-base.sh
diff options
context:
space:
mode:
authorReinaldo Colina <rcolina@pingidentity.com>2015-08-27 12:14:13 -0700
committerReinaldo Colina <rcolina@pingidentity.com>2015-08-27 12:14:13 -0700
commit637b5d5534469ebb15826139e1b3df12a1cc9309 (patch)
treeceb0d013f13603998946e43795fa4b8408e4af6e /radar-base.sh
parentfd2c201c69ebfd077d6f7be5d09bcdbb147acc59 (diff)
downloadgit-sonar-637b5d5534469ebb15826139e1b3df12a1cc9309.tar.gz
git-sonar-637b5d5534469ebb15826139e1b3df12a1cc9309.zip
issue-17: Add arguments to make the prompt shorter
Diffstat (limited to '')
-rwxr-xr-xradar-base.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/radar-base.sh b/radar-base.sh
index b7074d8..a2f5115 100755
--- a/radar-base.sh
+++ b/radar-base.sh
@@ -1,3 +1,6 @@
+IS_MINIMAL='--minimal'
+NO_REMOTE_STATUS='--no-remote-status'
+
dot_git=""
cwd=""
remote=""
@@ -469,3 +472,17 @@ zsh_color_remote_commits() {
printf %s "$remote"
}
+
+show_git_label() {
+ if [[ $@ == *$IS_MINIMAL* ]]; then
+ return 1 # don't show the git label
+ fi
+ return 0
+}
+
+show_remote_status() {
+ if [[ $@ == *$NO_REMOTE_STATUS* ]]; then
+ return 1 # don't show the git remote status
+ fi
+ return 0
+}