has a side-effect because color is not possible in
non-pc mode, even if GIT_PS1_SHOWCOLORHINTS is defined. (Non-pc mode
with GIT_PS1_SHOWCOLORHINTS defined would make the detached HEAD not be
shown neither in red nor within parenthesis).
Regards,
Eduardo R. D'Avila
--
To unsubscribe from this l
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
lored prompt is only available
in PROMPT_COMMAND/precmd mode.
With-suggestions-by: SZEDER Gábor
Signed-off-by: Eduardo R. D'Avila
---
15 11 contrib/completion/git-prompt.sh
contrib/completion/git-prompt.sh | 26 +++---
1 file changed, 15 insertions(+), 11 deletions
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
Signed-off-by: Eduardo R. D'Avila
---
1 1 contrib/completion/git-prompt.sh
4 4 t/t9903-bash-prompt.sh
contrib/compl
After refactoring __git_ps1_colorize_gitstring, codepaths for bash and zsh
became mostly common and tests for bash and zsh became redundant.
Remove tests for zsh. Keep one minimal test that stress the difference
in codepaths for bash and zsh.
Suggested-by: SZEDER Gábor
Signed-off-by: Eduardo R
__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
---
26 59 contrib/completion/git-prompt.sh
contrib/completion/git-prompt.sh | 85
1 file changed, 26 insertions(+
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
---
254 0 t/
d.
Thanks,
Eduardo
[1] http://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
2013/6/24 SZEDER Gábor :
> 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 between the two
2013/6/23 SZEDER Gábor :
> 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 sequences as a fal
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
---
5 4 contrib/completion/git-prompt.sh
contrib/completion/git-prompt.s
-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.
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
---
1 1 contrib/completion/git-prompt.sh
6 6 t/t9903-bash-prompt.sh
contrib/completion/git-prompt.sh | 2
__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
---
26 59 contrib/completion/git-prompt.sh
contrib/completion/git-prompt.sh | 85
1 file changed, 26 insertions(+
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
---
254 0 t/
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
---
15 9 contrib/completion/git-prompt.sh
19 0 t/t9903
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
---
15 9 contrib/completion/git-prompt.sh
19 0 t/t9903
__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
---
26 59 contrib/completion/git-prompt.sh
6 6 t/t9903-bash-prompt.sh
contrib/completion/git-prompt.sh
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
---
254 0 t/
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
---
250 0 t/
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
---
15 9 contrib/completion/git-prompt.sh
19 0 t/t9903
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
---
26 59 contrib/completion/git-prompt.sh
6 6 t/t9903-bash-prompt.sh
contrib/completio
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
co
23 matches
Mail list logo