Re: git-prompt.sh vs leading white space in __git_ps1()::printf_format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28/11/12 21:47, Junio C Hamano wrote:
> Simon Oosthoek <s.oosthoek@xxxxxxxxx> writes:
> 
>> perhaps the point should read like this:
>> #    3a) In ~/.bashrc set PROMPT_COMMAND
>> #        To customize the prompt, provide start/end arguments
>> #        PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'
>>
>> Which would not be confusing at all, I think...
> 
> It says "to customize", so a user who just wants the default (which
> does not exist but the comment does not say so) would be left
> without instruction, no?
> 
>     In $HOME/.bashrc, PROMPT_COMMAND can be set to
>     '__git_ps1 <pre> <post>', where <pre> and <post>
>     are strings you would put in $PS1 before and after
>     the status string generated by git-prompt machinery.
>     e.g.
>         PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'
> 
> or something?
> 

Looks better than my suggestion :-)

thanks

/Simon
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]