{"thread":{"id":"39588","subject":"[PATCH] git-prompt.sh: Document GIT_PS1_STATESEPARATOR","startedAt":"2015-06-10T17:19:24Z","lastAt":"2015-06-16T14:27:56Z","messageCount":3,"participants":["Joe Cridge","SZEDER Gábor"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"263513","messageId":"1433956764-38130-1-git-send-email-joe.cridge@me.com","threadId":"39588","inReplyTo":null,"subject":"[PATCH] git-prompt.sh: Document GIT_PS1_STATESEPARATOR","fromName":"Joe Cridge","fromEmail":"joe.cridge@me.com","sentAt":"2015-06-10T17:19:24Z","receivedAt":"2015-06-10T17:19:24Z","isPatch":true,"sender":{"key":"joe.cridge@me.com","avatar":null},"body":"The environment variable GIT_PS1_STATESEPARATOR can be used to set the\nseparator between the branch name and the state symbols in the prompt.\n\nAt present the variable is not mentioned in the inline documentation which\nmakes it difficult for the casual user to identify.\n\nSigned-off-by: Joe Cridge <joe.cridge@me.com>\n---\n contrib/completion/git-prompt.sh | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh\nindex f18aedc..366f0bc 100644\n--- a/contrib/completion/git-prompt.sh\n+++ b/contrib/completion/git-prompt.sh\n@@ -66,6 +66,10 @@\n #     git           always compare HEAD to @{upstream}\n #     svn           always compare HEAD to your SVN upstream\n #\n+# You can change the separator between the branch name and the above\n+# state symbols by setting GIT_PS1_STATESEPARATOR. The default separator\n+# is SP.\n+#\n # By default, __git_ps1 will compare HEAD to your SVN upstream if it can\n # find one, or @{upstream} otherwise.  Once you have set\n # GIT_PS1_SHOWUPSTREAM, you can override it on a per-repository basis by\n-- \n2.4.2\n"},{"id":"263928","messageId":"20150616153238.Horde.tGSXailmVRSmoEen3NAoPw4@webmail.informatik.kit.edu","threadId":"39588","inReplyTo":"1433956764-38130-1-git-send-email-joe.cridge@me.com","subject":"Re: [PATCH] git-prompt.sh: Document GIT_PS1_STATESEPARATOR","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2015-06-16T13:32:38Z","receivedAt":"2015-06-16T13:32:38Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"\nQuoting Joe Cridge <joe.cridge@me.com>:\n> The environment variable GIT_PS1_STATESEPARATOR can be used to set the\n> separator between the branch name and the state symbols in the prompt.\n>\n> At present the variable is not mentioned in the inline documentation which\n> makes it difficult for the casual user to identify.\n\nThanks, makes sense.\n\n> Signed-off-by: Joe Cridge <joe.cridge@me.com>\n> ---\n>  contrib/completion/git-prompt.sh | 4 ++++\n>  1 file changed, 4 insertions(+)\n>\n> diff --git a/contrib/completion/git-prompt.sh  \n> b/contrib/completion/git-prompt.sh\n> index f18aedc..366f0bc 100644\n> --- a/contrib/completion/git-prompt.sh\n> +++ b/contrib/completion/git-prompt.sh\n> @@ -66,6 +66,10 @@\n>  #     git           always compare HEAD to @{upstream}\n>  #     svn           always compare HEAD to your SVN upstream\n>  #\n> +# You can change the separator between the branch name and the above\n> +# state symbols by setting GIT_PS1_STATESEPARATOR. The default separator\n> +# is SP.\n\nThis is not a specification of a protocol or file or input/output  \nformat, where we formally use SP and LF.  Perhaps we could spell out  \nSP as a space here, for the sake of the \"casual user\"?\n\n> +#\n>  # By default, __git_ps1 will compare HEAD to your SVN upstream if it can\n>  # find one, or @{upstream} otherwise.  Once you have set\n>  # GIT_PS1_SHOWUPSTREAM, you can override it on a per-repository basis by\n> --\n> 2.4.2\n"},{"id":"263945","messageId":"0C3610F1-72BD-4C70-A1B9-9F352E7084BE@me.com","threadId":"39588","inReplyTo":"20150616153238.Horde.tGSXailmVRSmoEen3NAoPw4@webmail.informatik.kit.edu","subject":"Re: [PATCH] git-prompt.sh: Document GIT_PS1_STATESEPARATOR","fromName":"Joe Cridge","fromEmail":"joe.cridge@me.com","sentAt":"2015-06-16T14:27:56Z","receivedAt":"2015-06-16T14:27:56Z","isPatch":true,"sender":{"key":"joe.cridge@me.com","avatar":null},"body":"Quoting SZEDER Gábor <szeder@ira.uka.de>:\n>> diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh\n>> index f18aedc..366f0bc 100644\n>> --- a/contrib/completion/git-prompt.sh\n>> +++ b/contrib/completion/git-prompt.sh\n>> @@ -66,6 +66,10 @@\n>> #     git           always compare HEAD to @{upstream}\n>> #     svn           always compare HEAD to your SVN upstream\n>> #\n>> +# You can change the separator between the branch name and the above\n>> +# state symbols by setting GIT_PS1_STATESEPARATOR. The default separator\n>> +# is SP.\n> \n> This is not a specification of a protocol or file or input/output format, where we formally use SP and LF.  Perhaps we could spell out SP as a space here, for the sake of the \"casual user\"?\n\nYes, I agree. Would it also be worth changing lines 25 and 29?\n\n@@ 18,12 @@\n#    3b) Alternatively, for a slightly faster prompt, __git_ps1 can\n#        be used for PROMPT_COMMAND in Bash or for precmd() in Zsh\n#        with two parameters, <pre> and <post>, which are strings\n#        you would put in $PS1 before and after the status string\n#        generated by the git-prompt machinery.  e.g.\n#        Bash: PROMPT_COMMAND='__git_ps1 \"\\u@\\h:\\w\" \"\\\\\\$ \"'\n#          will show username, at-sign, host, colon, cwd, then\n#          various status string, followed by dollar and SP, as\n#          your prompt.\n#        ZSH:  precmd () { __git_ps1 \"%n\" \":%~$ \" \"|%s\" }\n#          will show username, pipe, then various status string,\n#          followed by colon, cwd, dollar and SP, as your prompt."}]}