All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] In PS1 prompt, make upstream state indicators consistent with other state indicators
@ 2022-02-25 11:44 Justin Donnelly via GitGitGadget
  2022-02-25 11:44 ` [PATCH 1/4] git-prompt: rename `upstream` to `upstream_type` Justin Donnelly via GitGitGadget
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Justin Donnelly via GitGitGadget @ 2022-02-25 11:44 UTC (permalink / raw)
  To: git; +Cc: Justin Donnelly

These patches are about the characters and words that can be configured to
display in the PS1 prompt after the branch name. I've been unable to find a
consistent terminology. I refer to them as follows: [short | long] [type]
state indicator where short is for characters (e.g. ?), long is for words
(e.g. |SPARSE), and type is the type of indicator (e.g. sparse or upstream).
I'd be happy to change the commit messages to a different terminology if
that's preferred.

There are a few inconsistencies with the PS1 prompt upstream state indicator
(GIT_PS1_SHOWUPSTREAM).

 * With GIT_PS1_SHOWUPSTREAM="auto", if there are no other short state
   indicators (e.g. + for staged changes, $ for stashed changes, etc.), the
   upstream state indicator appears adjacent to the branch name (e.g.
   (main=)) instead of being separated by SP or GIT_PS1_STATESEPARATOR (e.g.
   (main =)).
 * If there are long state indicators (e.g. |SPARSE), a short upstream state
   indicator (i.e. GIT_PS1_SHOWUPSTREAM="auto") is to the right of the long
   state indicator (e.g. (main +|SPARSE=)) instead of with the other short
   state indicators (e.g. (main +=|SPARSE)).
 * The long upstream state indicator (e.g. GIT_PS1_SHOWUPSTREAM="verbose")
   is separated from other (short or long) state indicators by a hard-coded
   SP. Other long state indicators are separated by a hard-coded pipe (|).

These patches are to make the upstream state indicators more consistent with
other state indicators.

Justin Donnelly (4):
  git-prompt: rename `upstream` to `upstream_type`
  git-prompt: make upstream state indicator location consistent
  git-prompt: make long upstream state indicator consistent
  git-prompt: put upstream comments together

 contrib/completion/git-prompt.sh | 59 ++++++++++++++++----------------
 1 file changed, 30 insertions(+), 29 deletions(-)


base-commit: 4c53a8c20f8984adb226293a3ffd7b88c3f4ac1a
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1162%2Fjustinrdonnelly%2Fgit-prompt-upstream-consistency-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1162/justinrdonnelly/git-prompt-upstream-consistency-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1162
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-03-23 20:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-25 11:44 [PATCH 0/4] In PS1 prompt, make upstream state indicators consistent with other state indicators Justin Donnelly via GitGitGadget
2022-02-25 11:44 ` [PATCH 1/4] git-prompt: rename `upstream` to `upstream_type` Justin Donnelly via GitGitGadget
2022-02-25 11:44 ` [PATCH 2/4] git-prompt: make upstream state indicator location consistent Justin Donnelly via GitGitGadget
2022-02-25 11:44 ` [PATCH 3/4] git-prompt: make long upstream state indicator consistent Justin Donnelly via GitGitGadget
2022-02-25 11:44 ` [PATCH 4/4] git-prompt: put upstream comments together Justin Donnelly via GitGitGadget
2022-02-25 12:22 ` [PATCH 0/4] In PS1 prompt, make upstream state indicators consistent with other state indicators Ævar Arnfjörð Bjarmason
2022-02-27  0:32   ` Justin Donnelly
2022-02-27 10:19     ` Ævar Arnfjörð Bjarmason
2022-02-27 19:57 ` [PATCH v2 " Justin Donnelly via GitGitGadget
2022-02-27 19:57   ` [PATCH v2 1/4] git-prompt: rename `upstream` to `upstream_type` Justin Donnelly via GitGitGadget
2022-02-27 19:57   ` [PATCH v2 2/4] git-prompt: make upstream state indicator location consistent Justin Donnelly via GitGitGadget
2022-02-27 19:57   ` [PATCH v2 3/4] git-prompt: make long upstream state indicator consistent Justin Donnelly via GitGitGadget
2022-02-27 19:57   ` [PATCH v2 4/4] git-prompt: put upstream comments together Justin Donnelly via GitGitGadget
2022-03-22 12:25   ` [PATCH v2 0/4] In PS1 prompt, make upstream state indicators consistent with other state indicators Ævar Arnfjörð Bjarmason
2022-03-23 20:06     ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.