Merge branch 'add-gitstatus.sh'

* add-gitstatus.sh:
  aks: added gitstatus.sh, and configured it in gitprompt.sh

Conflicts:
	README.md
	gitstatus.sh
master
Alan Stebbens 12 years ago
commit d7cd692f7a
  1. 5
      README.md
  2. 4
      gitstatus.sh

@ -7,6 +7,8 @@ In particular the branch name, difference with remote branch, number of files st
(an original idea from this [blog post][]). (an original idea from this [blog post][]).
`gitstatus.sh` added by [AKS](http://github.com/aks).
## Examples ## Examples
The prompt may look like the following: The prompt may look like the following:
@ -57,7 +59,8 @@ The symbols are as follows:
currently you have to tweak it in the ``gitprompt.sh`` currently you have to tweak it in the ``gitprompt.sh``
3. You can define ``prompt_callback`` function to tweak your prompt dynamicly 3. You can define ``prompt_callback`` function to tweak your prompt dynamicly
4. The current git repo information is obtained by the script `gitstatus.sh` or 4. The current git repo information is obtained by the script `gitstatus.sh` or
`gitstatus.py`. Both scripts do the same thing. `gitstatus.py`. Both scripts do the same thing, but the bash script is a tad
bit more quick, and is used by default.
```sh ```sh
function prompt_callback { function prompt_callback {

@ -1,5 +1,9 @@
#/bin/bash #/bin/bash
# -*- coding: UTF-8 -*- # -*- coding: UTF-8 -*-
# gitstatus.sh -- produce the current git repo status on STDOUT
# Functionally equivalent to 'gitstatus.py', but written in bash (not python).
#
# Alan K. Stebbens <aks@stebbens.org> [http://github.com/aks]
# change those symbols to whatever you prefer # change those symbols to whatever you prefer
declare -a symbols declare -a symbols

Loading…
Cancel
Save