From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Oosthoek Subject: Re: git-prompt.sh vs leading white space in __git_ps1()::printf_format Date: Wed, 28 Nov 2012 21:58:19 +0100 Message-ID: <50B67AEB.1000603@xs4all.nl> References: <20121128132033.GA10082@xs4all.nl> <50B66F41.1030305@xs4all.nl> <7vlidltpyj.fsf@alter.siamese.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Piotr Krukowiecki , git@vger.kernel.org To: Junio C Hamano X-From: git-owner@vger.kernel.org Wed Nov 28 22:12:28 2012 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tdovj-0003S1-O5 for gcvg-git-2@plane.gmane.org; Wed, 28 Nov 2012 22:12:28 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932270Ab2K1VMM (ORCPT ); Wed, 28 Nov 2012 16:12:12 -0500 Received: from smtp-vbr9.xs4all.nl ([194.109.24.29]:2656 "EHLO smtp-vbr9.xs4all.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932209Ab2K1VML (ORCPT ); Wed, 28 Nov 2012 16:12:11 -0500 X-Greylist: delayed 783 seconds by postgrey-1.27 at vger.kernel.org; Wed, 28 Nov 2012 16:12:11 EST Received: from [192.168.178.21] (simaj.xs4all.nl [83.160.71.26]) (authenticated bits=0) by smtp-vbr9.xs4all.nl (8.13.8/8.13.8) with ESMTP id qASKwKJn002842 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 28 Nov 2012 21:58:21 +0100 (CET) (envelope-from s.oosthoek@xs4all.nl) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <7vlidltpyj.fsf@alter.siamese.dyndns.org> X-Virus-Scanned: by XS4ALL Virus Scanner Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On 28/11/12 21:47, Junio C Hamano wrote: > Simon Oosthoek 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
 ', where 
 and 
>     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