Skip to content

git-prompt: support more shells v4

Avi Halachmi via GitGitGadget git 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest8 patches 3 repliesIn review
  2. v38 patches 4 repliesSuperseded
  3. v28 patches 19 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v18 patches18 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8git-prompt: use here-doc instead of here-stringcontrib/completion/git-prompt.sh+3 -10 replies
2/8git-prompt: fix uninitialized variablecontrib/completion/git-prompt.sh+1 -10 replies
3/8git-prompt: don't use shell arrayscontrib/completion/git-prompt.sh+30 -180 replies
4/8git-prompt: replace [[...]] with standard codecontrib/completion/git-prompt.sh+16 -140 replies
5/8git-prompt: add some missing quotescontrib/completion/git-prompt.sh+13 -130 replies
6/8git-prompt: don't use shell $'...'contrib/completion/git-prompt.sh+29 -180 replies
7/8git-prompt: ta-da! document usage in other shellscontrib/completion/git-prompt.sh+31 -20 replies
8/8git-prompt: support custom 0-width PS1 markerscontrib/completion/git-prompt.sh+12 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/8] git-prompt: support more shells v4

This addresses review comments on part 5/8 v3 (git-prompt: add some missing quotes) to fix minor wording issues at the commit message.

Hopefully this is the last wording fixup.

Avi Halachmi (:avih) (8):
git-prompt: use here-doc instead of here-string
git-prompt: fix uninitialized variable
git-prompt: don't use shell arrays
git-prompt: replace [[...]] with standard code
git-prompt: add some missing quotes
git-prompt: don't use shell $'...'
git-prompt: ta-da! document usage in other shells
git-prompt: support custom 0-width PS1 markers

 contrib/completion/git-prompt.sh | 191 ++++++++++++++++++++-----------
 1 file changed, 126 insertions(+), 65 deletions(-)

base-commit: d19b6cd2dd72dc811f19df4b32c7ed223256c3ee
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1750%2Favih%2Fprompt-compat-v4
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1750/avih/prompt-compat-v4
Pull-Request: https://github.com/git/git/pull/1750

Range-diff vs v3:

 1:  9ce5ddadf0b = 1:  9ce5ddadf0b git-prompt: use here-doc instead of here-string
 2:  680ecb52404 = 2:  680ecb52404 git-prompt: fix uninitialized variable
 3:  7e994eae7bc = 3:  7e994eae7bc git-prompt: don't use shell arrays
 4:  232340902a1 = 4:  232340902a1 git-prompt: replace [[...]] with standard code
 5:  3a41ad889cc ! 5:  18ff70db6b3 git-prompt: add some missing quotes

@@ Commit message
in real life, but the fixes improve correctness, and would prevent bugs in some uncommon cases, such as weird IFS values.

- Listing some portability guideline here for future reference.
+ Listing some portability guidelines here for future reference.

I'm leaving it to someone else to decide whether to include
- it in the file itself, place is as a new file, or not.
+ it in the file itself, place it as a new file, or not.

---------

@@ Commit message
Bad: [ $mode = yes ]; local s=* x=$y e=$? z=$(cmd...)

The arguments to "local" do look like assignments, but they're not
- the assignment part of a simple command. they're at the command part.
+ the assignment part of a simple command; they're at the command part.

Still at the command part, no need to quote non-expandable values:
Good: local x= y=yes; echo OK

 6:  e735a1696a0 = 6:  48aa31feedb git-prompt: don't use shell $'...'
 7:  e70440e669a = 7:  cd20b830b24 git-prompt: ta-da! document usage in other shells
 8:  633e71a01d3 = 8:  cb705d5fc8e git-prompt: support custom 0-width PS1 markers
Signature · 1 line
gitgitgadget