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 --- radar-base.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'radar-base.sh') 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 +} -- cgit v1.2.3 From 93dad96832a59d3d7f6ac6580cabf0202b387ffe Mon Sep 17 00:00:00 2001 From: Reinaldo Colina Date: Fri, 28 Aug 2015 13:55:37 -0700 Subject: Removing --minimal arg implementation - Dealing with the git: prefix will be done in a separate pull request - The new --no-remote-status arg remains --- radar-base.sh | 9 --------- 1 file changed, 9 deletions(-) (limited to 'radar-base.sh') diff --git a/radar-base.sh b/radar-base.sh index a2f5115..d019629 100755 --- a/radar-base.sh +++ b/radar-base.sh @@ -1,4 +1,3 @@ -IS_MINIMAL='--minimal' NO_REMOTE_STATUS='--no-remote-status' dot_git="" @@ -472,14 +471,6 @@ 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 -- cgit v1.2.3