[PATCH/RFC 0/3] enable color prompt in non-pcmode

2013-06-16 Thread Eduardo R. D'Avila
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

[PATCH/RFC 2/3] git-prompt.sh: refactor colored prompt code

2013-06-16 Thread Eduardo R. D'Avila
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

[PATCH/RFC 3/3] git-prompt.sh: enable color prompt in non-pcmode

2013-06-16 Thread Eduardo R. D'Avila
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

[PATCH/RFC 1/3] t9903: add tests for git-prompt pcmode

2013-06-16 Thread Eduardo R. D'Avila
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

[PATCH v2 1/3] t9903: add tests for git-prompt pcmode

2013-06-17 Thread Eduardo R. D'Avila
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

[PATCH v2 2/3] git-prompt.sh: refactor colored prompt code

2013-06-17 Thread Eduardo R. D'Avila
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

[PATCH 3/3] git-prompt.sh: enable color prompt in non-pcmode

2013-06-17 Thread Eduardo R. D'Avila
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

[PATCH v2 3/3] git-prompt.sh: enable color prompt in non-pcmode

2013-06-17 Thread Eduardo R. D'Avila
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

[PATCH 1/4] t9903: add tests for git-prompt pcmode

2013-06-20 Thread Eduardo R. D'Avila
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

[PATCH 2/4] git-prompt.sh: refactor colored prompt code

2013-06-20 Thread Eduardo R. D'Avila
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

[PATCH 3/4] git-prompt.sh: do not print duplicate clean color code

2013-06-20 Thread Eduardo R. D'Avila
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

[PATCH 0/4] git-prompt: cleaning and improvement

2013-06-20 Thread Eduardo R. D'Avila
-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

[PATCH 4/4] git-prompt.sh: add missing information in comments

2013-06-20 Thread Eduardo R. D'Avila
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

Re: [PATCH 2/4] git-prompt.sh: refactor colored prompt code

2013-06-24 Thread Eduardo R. D'Avila
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

Re: [PATCHv3 00/16] bash prompt speedup

2013-06-24 Thread Eduardo R. D'Avila
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

[PATCH v2 0/5] git-prompt: cleaning and improvement

2013-06-25 Thread Eduardo R. D'Avila
://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

[PATCH v2 1/5] t9903: add tests for git-prompt pcmode

2013-06-25 Thread Eduardo R. D'Avila
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

[PATCH v2 2/5] git-prompt.sh: refactor colored prompt code

2013-06-25 Thread Eduardo R. D'Avila
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

[PATCH v2 3/5] t9903: remove redundant tests

2013-06-25 Thread Eduardo R. D'Avila
-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

[PATCH v2 4/5] git-prompt.sh: do not print duplicate clean color code

2013-06-25 Thread Eduardo R. D'Avila
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

[PATCH v2 5/5] git-prompt.sh: add missing information in comments

2013-06-25 Thread Eduardo R. D'Avila
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

Re: [PATCH v2 0/5] git-prompt: cleaning and improvement

2013-06-27 Thread Eduardo R. D'Avila
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