* Junio C Hamano [2012-12-26 12:32:20 -0800]:
> The point of the above two was that __git_ps1 does not have to set
> PS1 as long as the insn says user to use PROMPT_COMMAND that sets
> PS1 himself, exactly as illustrated above. In other words, replace
> the last PS1=... in the "prompt command" m
Junio C Hamano writes:
> But as I said, there probably is a reason why that approach does not
> work, that is why I said...
>
>>> I have a feeling that I am missing something major, though...
In any case, this was more like "if we were doing this from scratch"
conversation.
I think PROMPT_COMMA
Simon Oosthoek writes:
>> Every time I looked at this line, I wondered why '*' state is
>> "bad". Does a user go into any "bad" state by having a dirty
>> working tree? Same for untracked ($u) and detached. These are all
>> perfectly normal part of a workflow, so while choice of red may be
>>
Simon Oosthoek writes:
> The problem with doing it in pre-post is when inside non-git
> directories. You want to avoid any gitstring output, including the
> brackets, when not inside a repository.
Ah, Ok, that is probably what I missed.
>> Or we could go the other way and drop "pre/post" string
* Junio C Hamano [2012-12-26 11:45:48 -0800]:
> Simon Oosthoek writes:
>
> > The optional third parameter when __git_ps1 is used in
> > PROMPT_COMMAND mode as format string for printf to further
> > customize the way the git status string is embedded in the
> > user's PS1 prompt.
> >
> > Signed
Simon Oosthoek writes:
> The optional third parameter when __git_ps1 is used in
> PROMPT_COMMAND mode as format string for printf to further
> customize the way the git status string is embedded in the
> user's PS1 prompt.
>
> Signed-off-by: Simon Oosthoek
> ---
Thanks.
If we do not care about
The optional third parameter when __git_ps1 is used in
PROMPT_COMMAND mode as format string for printf to further
customize the way the git status string is embedded in the
user's PS1 prompt.
Signed-off-by: Simon Oosthoek
---
contrib/completion/git-prompt.sh | 32 --
7 matches
Mail list logo