gitstring and color codes.
Prior to enable colors in non-pcmode, refactor
__git_ps1() and __git_ps1_colorize_gitstring().
Eduardo R. D'Avila (3):
t9903: add tests for git-prompt pcmode
git-prompt.sh: refactor colored prompt code
git-prompt.sh: enable color prompt in non-pcmode
contrib
to build gitstring in
__git_ps1_colorize_gitstring() and __git_ps1().
Leave in __git_ps1_colorize_gitstring() only logic
to set color codes.
Signed-off-by: Eduardo R. D'Avila erdav...@gmail.com
---
26 59 contrib/completion/git-prompt.sh
6 6 t/t9903-bash-prompt.sh
contrib
The use of colors in a prompt is only possible in
pcmode (using the variable PROMPT_COMMAND).
Enable color prompt in non-pcmode (using the variable
PS1) for both Bash and ZSH.
Signed-off-by: Eduardo R. D'Avila erdav...@gmail.com
---
15 9 contrib/completion/git-prompt.sh
19 0
git-prompt.sh lacks tests for PROMPT_COMMAND mode.
Add tests for:
* pcmode prompt without colors
* pcmode prompt with colors for bash
* pcmode prompt with colors for zsh
Having these tests enables an upcoming refactor in
a safe way.
Signed-off-by: Eduardo R. D'Avila erdav...@gmail.com
---
250
git-prompt.sh lacks tests for PROMPT_COMMAND mode.
Add tests for:
* pcmode prompt without colors
* pcmode prompt with colors for bash
* pcmode prompt with colors for zsh
Having these tests enables an upcoming refactor in
a safe way.
Signed-off-by: Eduardo R. D'Avila erdav...@gmail.com
---
254
in
__git_ps1_colorize_gitstring() and __git_ps1().
Leave in __git_ps1_colorize_gitstring() only logic
to set color codes.
Signed-off-by: Eduardo R. D'Avila erdav...@gmail.com
---
26 59 contrib/completion/git-prompt.sh
6 6 t/t9903-bash-prompt.sh
contrib/completion/git-prompt.sh | 85
The use of colors in a prompt is only possible in
pcmode (using the variable PROMPT_COMMAND).
Enable color prompt in non-pcmode (using the variable
PS1) for both Bash and ZSH.
Signed-off-by: Eduardo R. D'Avila erdav...@gmail.com
---
15 9 contrib/completion/git-prompt.sh
19 0
The use of colors in a prompt is only possible in
pcmode (using the variable PROMPT_COMMAND).
Enable color prompt in non-pcmode (using the variable
PS1) for both Bash and ZSH.
Signed-off-by: Eduardo R. D'Avila erdav...@gmail.com
---
15 9 contrib/completion/git-prompt.sh
19 0
git-prompt.sh lacks tests for PROMPT_COMMAND mode.
Add tests for:
* pcmode prompt without colors
* pcmode prompt with colors for bash
* pcmode prompt with colors for zsh
Having these tests enables an upcoming refactor in
a safe way.
Signed-off-by: Eduardo R. D'Avila erdav...@gmail.com
---
254
in
__git_ps1_colorize_gitstring() and __git_ps1().
Leave in __git_ps1_colorize_gitstring() only logic
to set color codes.
Signed-off-by: Eduardo R. D'Avila erdav...@gmail.com
---
26 59 contrib/completion/git-prompt.sh
contrib/completion/git-prompt.sh | 85
1 file changed, 26
Do not print a duplicate clean color code when there
is no other indicators other than the current branch
in colored prompt.
Signed-off-by: Eduardo R. D'Avila erdav...@gmail.com
---
1 1 contrib/completion/git-prompt.sh
6 6 t/t9903-bash-prompt.sh
contrib/completion/git
-control.git/228308 .
Some of the patches could still be used, so I'm
reposting them with an additional one to add some
missing information in usage comments.
Eduardo R. D'Avila (4):
t9903: add tests for git-prompt pcmode
git-prompt.sh: refactor colored prompt code
git-prompt.sh: do
Mention that the command below is needed for prompt
in ZSH with PS1:
setopt PROMPT_SUBST
Make it clear that colored prompt is only available
in PROMPT_COMMAND mode.
Signed-off-by: Eduardo R. D'Avila erdav...@gmail.com
---
5 4 contrib/completion/git-prompt.sh
contrib/completion/git
2013/6/23 SZEDER Gábor sze...@ira.uka.de:
I'm wary of relying on tput's availability. It's part of ncurses,
which is an essential package in many (most? all?) linux distros, but
I don't know how it is with other supported platforms. So I think
we'd have to stick to the hard-coded escape
2013/6/24 SZEDER Gábor sze...@ira.uka.de:
This patch series will conflict with Eduardo's work on refactoring the
colorizing function, and the conflict is not trivial. Although there
are still some open questions left with that series (using tput, zsh
tests), those won't affect the conflicts
://thread.gmane.org/gmane.comp.version-control.git/228566
[2] http://article.gmane.org/gmane.comp.version-control.git/228705
[3] http://article.gmane.org/gmane.comp.version-control.git/228707
[4] http://thread.gmane.org/gmane.comp.version-control.git/228851
Eduardo R. D'Avila (5):
t9903: add tests
git-prompt.sh lacks tests for PROMPT_COMMAND mode.
Add tests for:
* pcmode prompt without colors
* pcmode prompt with colors for bash
* pcmode prompt with colors for zsh
Having these tests enables an upcoming refactor in
a safe way.
Signed-off-by: Eduardo R. D'Avila erdav...@gmail.com
---
254
in
__git_ps1_colorize_gitstring() and __git_ps1().
Leave in __git_ps1_colorize_gitstring() only logic
to set color codes.
Signed-off-by: Eduardo R. D'Avila erdav...@gmail.com
---
26 59 contrib/completion/git-prompt.sh
contrib/completion/git-prompt.sh | 85
1 file changed, 26
-off-by: Eduardo R. D'Avila erdav...@gmail.com
---
1 114 t/t9903-bash-prompt.sh
t/t9903-bash-prompt.sh | 115 +
1 file changed, 1 insertion(+), 114 deletions(-)
diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh
index 6a88778
Do not print a duplicate clean color code when there
is no other indicators other than the current branch
in colored prompt.
Acked-by: SZEDER Gábor sze...@ira.uka.de
Signed-off-by: Eduardo R. D'Avila erdav...@gmail.com
---
1 1 contrib/completion/git-prompt.sh
4 4 t/t9903
available
in PROMPT_COMMAND/precmd mode.
With-suggestions-by: SZEDER Gábor sze...@ira.uka.de
Signed-off-by: Eduardo R. D'Avila erdav...@gmail.com
---
15 11 contrib/completion/git-prompt.sh
contrib/completion/git-prompt.sh | 26 +++---
1 file changed, 15 insertions(+), 11
Hi Junio,
The merged result is ok!
Thanks,
Eduardo
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
22 matches
Mail list logo