summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Bandera <claudio.bandera@kit.edu>2015-09-17 18:27:40 +0200
committerClaudio Bandera <claudio.bandera@kit.edu>2015-09-17 18:27:40 +0200
commitd73b8d0697a4e7fdeb65e1b13ec6d3020d8efed9 (patch)
tree38cb16fca88c76dbd5b01e257095796e93120c24
parent5adc604fc1b0c11af8a85928e2a7d756fc5ad776 (diff)
downloadgit-sonar-d73b8d0697a4e7fdeb65e1b13ec6d3020d8efed9.tar.gz
git-sonar-d73b8d0697a4e7fdeb65e1b13ec6d3020d8efed9.zip
Added documentation for stash feature.
-rw-r--r--README.md19
-rwxr-xr-xgit-radar3
2 files changed, 22 insertions, 0 deletions
diff --git a/README.md b/README.md
index 1538681..77eb8cc 100644
--- a/README.md
+++ b/README.md
@@ -148,6 +148,13 @@ Prompt | Meaning
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`.
+### Stash status
+The prompt will show you whether and how many stashes you have stored.
+
+Prompt | Meaning
+---------------------------|---------------
+![git:(master) 1≡] | We have one stash
+
**Bash**
```bash
export PS1="$PS1\$(git-radar --bash --fetch --no-remote-status) "
@@ -467,6 +474,18 @@ tracked by git.
It is unset by `GIT_RADAR_COLOR_CHANGES_RESET` which you can set if you want
a different background colour to return to.
+##### Colouring the stash status
+
+**GIT_RADAR_COLOR_STASH='[colour code]'**
+```
+git:(my-branch) 1≡
+ ^
+```
+The colour to use for the lines that indicates how many stashes you have stored.
+
+It is unset by `GIT_RADAR_COLOR_STASH_RESET` which you can set if you want
+a different background colour to return to.
+
## License
Git Radar is licensed under the MIT license.
diff --git a/git-radar b/git-radar
index 67b8460..a8dd72e 100755
--- a/git-radar
+++ b/git-radar
@@ -30,6 +30,7 @@ if [[ -z $@ ]]; then
_conflicted_them="\033[1;33mT\033[0m"
_ahead_master="\xF0\x9D\x98\xAE \033[1;32m←\033[0m"
_local_diverged="\033[1;33m⇵\033[0m"
+ _stash="\033[1;33m≡\033[0m"
echo "git-radar - a heads up display for git"
echo ""
echo "examples:"
@@ -51,6 +52,8 @@ if [[ -z $@ ]]; then
echo " # rebase complete, our rewritten commits now need pushed up"
printf " $_git$_ahead_master 3 $_my_branch$_endgit"
echo " # origin/my-branch is up to date with master and has our 3 commits waiting merge"
+ printf " $_git$_master$_endgit 3$_stash"
+ echo " # You have 3 stashes stored"
echo ""
echo "usage:"