summaryrefslogtreecommitdiff
path: root/index.txt
blob: 26f19946b1097d40d07bdc94755896ea4599d990 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
= GIT Prompt - there is a lot more than a branch-name
 
//  To see HTML rendered web page go to:   http://volnitsky.com/project/lopti
 
:v-p: http://volnitsky.com/project
:compact-option: compact
 
 
== Basic Usage
 
image:screenshot-prompt-basic.png[basic usage]
 
Digit [red]*1* on 3rd line is `false(1)` exit code.  Host names are colored
according to config or from hostname checksum if not in config.
 
 
== GIT
 
Branch and files are colored according to state. "M" stands for master. 
 
image:screenshot-prompt-git.png[git module]
 
.Branch and Files Colors
[cols="^3,^3,12",frame="topbot",options="header"]
|================================================================
| *Branch*                 |   *File*                 | *Meaning*
| [darkblue]#dark blue#    |                          | Clean repo
| [green]#green#           |  [green]#green#          | Modified or new file. Modifications are in index but not in repo yet.
| [red]#dark red#          |  [red]#darkred#          | Modified and tracked by repo, but modifications not added to index yet.
| [blue]#light blue#       |  [blue]#light blue#      | Untracked file.
| [red]#light red#         |                          | Detached Head
| [magenta]#magenta#       |                          | In middle of doing something 
|================================================================
 
==  Subversion
...
 
== Labels
 
...
 
== Install
Download  link:git-prompt.sh[] or get it with GIT:
 
------------------
  git clone git://github.com/lvv/git-prompt.git
---------------
 
Put following command in our profile in interactive section:
 
---------------------
  . /path/to/git-prompt.sh
---------------------
 
If there are no interactivity test in your profile, then above command should be:
 
--------------------
  [[ $- == *i* ]] && . /etc/git-prompt.sh
---------------------
 
== DEPENDENCY
 
Most of dependencies (except git and svn) are probably already installed on your host. 
 
- bash  (tested with v3.2.33) 
- git  (optional)
- svn  (optional)
- sed
- tput  (terminfo)
- tty  (core utils)
- grep  
- locale  (glibc)
- id   (core utils)
 
include::../volnitsky.com/project/howto-submit-patch.txt[]
 
== TODO
 
- external config at `/etc/git-prompt.conf` and `~/.git-prompt.conf`
- always display remote hostname if login is through sshd (how to detect this?)
- new mail (howto at: `http://kikhome.net/?p=11` )
- ctrl-Z subshell indicator
- screenshots for labels and svn module
- VIM module needs to be moved out of GIT module
- make module (to show generated, stale files)
- How detect current merge?  (current method through .git/MERGE_HEAD not always works)
 
== DONE
- different host color even if they are not in config
- TO FIX: when file list is too long, git-prompt truncates it. Sometimes this truncation can be on color escape sequence.