git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-prompt.sh: Document GIT_PS1_STATESEPARATOR

From
JCJoe Cridge <joe.cridge@me.com>
Date
Jun 10, 2015, 17:19 UTC
Message-ID
<1433956764-38130-1-git-send-email-joe.cridge@me.com>

The environment variable GIT_PS1_STATESEPARATOR can be used to set the separator between the branch name and the state symbols in the prompt.

At present the variable is not mentioned in the inline documentation which makes it difficult for the casual user to identify.

Signed-off-by: Joe Cridge <joe.cridge@me.com>
---
 contrib/completion/git-prompt.sh | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index f18aedc..366f0bc 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -66,6 +66,10 @@
 #     git           always compare HEAD to @{upstream}
 #     svn           always compare HEAD to your SVN upstream
 #
+# You can change the separator between the branch name and the above
+# state symbols by setting GIT_PS1_STATESEPARATOR. The default separator
+# is SP.
+#
 # By default, __git_ps1 will compare HEAD to your SVN upstream if it can
 # find one, or @{upstream} otherwise.  Once you have set
 # GIT_PS1_SHOWUPSTREAM, you can override it on a per-repository basis by
-- 
2.4.2
Next: SZEDER Gábor
Message 1 of 3 in “git-prompt.sh: Document GIT_PS1_STATESEPARATOR”
  1. git-prompt.sh: Document GIT_PS1_STATESEPARATORJoe Cridge, Jun 10, 2015
  2. SZEDER GáborJun 16, 2015
  3. Joe CridgeJun 16, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.