Re: [PATCH 1/2] git-prompt.sh: strip unnecessary space in prompt string
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 13, 2013, 13:58 UTC
- Message-ID
- <7vvc6noubf.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20130513111143.GU2331@goldbirke>
SZEDER Gábor <szeder@ira.uka.de> writes:
Show 13 quoted lines
> On Mon, May 13, 2013 at 01:05:51PM +0200, SZEDER Gábor wrote: >> On Mon, May 13, 2013 at 03:43:43PM +0530, Ramkumar Ramachandra wrote: >> > If we can agree that it's just a matter of taste, we should both be >> > able to have what we want. Any suggestions on how to make this >> > configurable? >> >> The same way we make other things configurable in the prompt: specify >> the GIT_PS1_HIDESTATESEPARATOR or something similar variable to strip >> that space from the prompt. > > Or perhaps better yet: use a variable, e.g. GIT_PS1_STATESEPARATOR or > whatever, to specify what should separate the branch name from the > repo state, defaulting to a space to keep the current behavior.
Why just a single knob for that SP?
If you restructure the code to formulate "gitstring" to call a shell function to do so, people can override it and come up with whatever format they want to use, no?