From: "Eduardo R. D'Avila" <erdavila@gmail.com>
To: git@vger.kernel.org
Cc: felipe.contreras@gmail.com, artagnon@gmail.com,
s.oosthoek@xs4all.nl, gitster@pobox.com, szeder@ira.uka.de,
"Eduardo R. D'Avila" <erdavila@gmail.com>
Subject: [PATCH 4/4] git-prompt.sh: add missing information in comments
Date: Thu, 20 Jun 2013 23:25:29 -0300 [thread overview]
Message-ID: <8fcf64a70e63761f3982e1be05be0a2bb1fb68bf.1371780085.git.erdavila@gmail.com> (raw)
In-Reply-To: <cover.1371780085.git.erdavila@gmail.com>
In-Reply-To: <cover.1371780085.git.erdavila@gmail.com>
Mention that the command below is needed for prompt
in ZSH with PS1:
setopt PROMPT_SUBST
Make it clear that colored prompt is only available
in PROMPT_COMMAND mode.
Signed-off-by: Eduardo R. D'Avila <erdavila@gmail.com>
---
5 4 contrib/completion/git-prompt.sh
contrib/completion/git-prompt.sh | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index 70515cc..3ab2a69 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -13,10 +13,10 @@
# 3a) Change your PS1 to call __git_ps1 as
# command-substitution:
# Bash: PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
-# ZSH: PS1='[%n@%m %c$(__git_ps1 " (%s)")]\$ '
+# ZSH: setopt PROMPT_SUBST ; PS1='[%n@%m %c$(__git_ps1 " (%s)")]\$ '
# the optional argument will be used as format string.
-# 3b) Alternatively, if you are using bash, __git_ps1 can be
-# used for PROMPT_COMMAND with two parameters, <pre> and
+# 3b) Alternatively, if you are using Bash or ZSH, __git_ps1 can
+# be used for PROMPT_COMMAND with two parameters, <pre> and
# <post>, which are strings you would put in $PS1 before
# and after the status string generated by the git-prompt
# machinery. e.g.
@@ -78,7 +78,8 @@
#
# If you would like a colored hint about the current dirty state, set
# GIT_PS1_SHOWCOLORHINTS to a nonempty value. The colors are based on
-# the colored output of "git status -sb".
+# the colored output of "git status -sb" and are available only when
+# using __git_ps1 for PROMPT_COMMAND.
# __gitdir accepts 0 or 1 arguments (i.e., location)
# returns location of .git repo
--
1.8.3.1.487.g28387b2
next prev parent reply other threads:[~2013-06-21 2:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-21 2:25 [PATCH 0/4] git-prompt: cleaning and improvement Eduardo R. D'Avila
2013-06-21 2:25 ` [PATCH 1/4] t9903: add tests for git-prompt pcmode Eduardo R. D'Avila
2013-06-22 13:06 ` SZEDER Gábor
2013-06-22 16:32 ` Eduardo D'Avila
2013-06-23 7:39 ` Junio C Hamano
2013-06-24 16:21 ` SZEDER Gábor
2013-06-21 2:25 ` [PATCH 2/4] git-prompt.sh: refactor colored prompt code Eduardo R. D'Avila
2013-06-22 14:37 ` Øystein Walle
2013-06-22 16:45 ` Eduardo D'Avila
2013-06-23 14:51 ` SZEDER Gábor
2013-06-25 1:21 ` Eduardo R. D'Avila
2013-06-21 2:25 ` [PATCH 3/4] git-prompt.sh: do not print duplicate clean color code Eduardo R. D'Avila
2013-06-22 13:26 ` SZEDER Gábor
2013-06-21 2:25 ` Eduardo R. D'Avila [this message]
2013-06-22 13:40 ` [PATCH 4/4] git-prompt.sh: add missing information in comments SZEDER Gábor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8fcf64a70e63761f3982e1be05be0a2bb1fb68bf.1371780085.git.erdavila@gmail.com \
--to=erdavila@gmail.com \
--cc=artagnon@gmail.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=s.oosthoek@xs4all.nl \
--cc=szeder@ira.uka.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).