summaryrefslogtreecommitdiffstats
path: root/README.md
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 /README.md
parentfd2c201c69ebfd077d6f7be5d09bcdbb147acc59 (diff)
downloadgit-sonar-637b5d5534469ebb15826139e1b3df12a1cc9309.tar.gz
git-sonar-637b5d5534469ebb15826139e1b3df12a1cc9309.zip
issue-17: Add arguments to make the prompt shorter
Diffstat (limited to 'README.md')
-rw-r--r--README.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/README.md b/README.md
index d4bd3dd..f126a21 100644
--- a/README.md
+++ b/README.md
@@ -102,6 +102,19 @@ Prompt | Meaning
![git:(m 4 → my-branch)] | There are 4 commits on `origin/master` that aren't on `origin/my-branch`
![git:(m 1 ⇄ 2 my-branch)] | `origin/master` and `origin/my-branch` have diverged, we'll need to rebase or merge
+If you don't rely on this status, you can always hide this part of the prompt by calling git-radar with `--no-remote-status`.
+
+**Bash**
+```bash
+export PS1="$PS1\$(git-radar --bash --fetch --no-remote-status) "
+```
+(note: the `\` escaping the `$` is important)
+
+**Zsh**
+```zsh
+export PROMPT="$PROMPT$(git-radar --zsh --fetch --no-remote-status) "
+```
+
### (Optional) Auto-fetch repos
Ensuring your refs are up to date I found can be a pain. To streamline this
@@ -124,6 +137,21 @@ export PS1="$PS1\$(git-radar --bash --fetch)"
export PROMPT="$PROMPT$(git-radar --zsh --fetch) "
```
+### (Optional) Minimal mode
+
+If you wish to keep the length of your prompt shorter, you can call git-radar with `--minimal` which will render the new prompt without the `git:` part
+
+**Bash**
+```bash
+export PS1="$PS1\$(git-radar --bash --fetch --minimal) "
+```
+(note: the `\` escaping the `$` is important)
+
+**Zsh**
+```zsh
+export PROMPT="$PROMPT$(git-radar --zsh --fetch --minimal) "
+```
+
## License
Git Radar is licensed under the MIT license.