Skip to content

completion: bash: a bunch of fixes, cleanups, and reorganization

Felipe Contreras git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest26 patches 9 repliesIn review

Changes in v2 from the cover letter

* Added bug fixes
* A lot more reorganization

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/26completion: bash: fix prefix detection in branch.*contrib/completion/git-completion.bash+2 -23 replies
2/26completion: bash: add correct suffix in variablescontrib/completion/git-completion.bash t/t9902-completion.sh+10 -30 replies
3/26completion: bash: fix for suboptions with valuecontrib/completion/git-completion.bash t/t9902-completion.sh+16 -10 replies
4/26completion: bash: do not modify COMP_WORDBREAKScontrib/completion/git-completion.bash contrib/completion/git-completion.zsh+1 -50 replies
5/26test: completion: fix currently typed wordst/t9902-completion.sh+2 -20 replies
6/26test: completion: add run_func() helpert/t9902-completion.sh+24 -344 replies
7/26completion: bash: remove non-append functionalitycontrib/completion/git-completion.bash+1 -20 replies
8/26completion: bash: get rid of _append() functionscontrib/completion/git-completion.bash contrib/completion/git-completion.zsh+7 -380 replies
9/26completion: bash: get rid of any non-append codecontrib/completion/git-completion.bash+3 -90 replies
10/26completion: bash: factor out check in __gitcompcontrib/completion/git-completion.bash+4 -20 replies
11/26completion: bash: simplify equal suffix checkcontrib/completion/git-completion.bash+1 -10 replies
12/26completion: bash: refactor __gitcompcontrib/completion/git-completion.bash+18 -342 replies
13/26completion: bash: simplify __gitcompcontrib/completion/git-completion.bash+2 -30 replies
14/26completion: bash: change suffix check in __gitcompcontrib/completion/git-completion.bash+1 -10 replies
15/26completion: bash: improve __gitcomp suffix codecontrib/completion/git-completion.bash+4 -50 replies
16/26completion: bash: simplify config_variable_namecontrib/completion/git-completion.bash+4 -40 replies
17/26test: completion: switch __gitcomp_nl prefix testt/t9902-completion.sh+3 -30 replies
18/26completion: bash: simplify _get_comp_words_by_ref()contrib/completion/git-completion.bash t/t9902-completion.sh+10 -410 replies
19/26completion: bash: refactor _get_comp_words_by_ref()contrib/completion/git-completion.bash+39 -540 replies
20/26completion: bash: cleanup _get_comp_words_by_ref()contrib/completion/git-completion.bash+8 -110 replies
21/26completion: bash: trivial cleanupcontrib/completion/git-completion.bash+3 -30 replies
22/26completion: bash: rename _get_comp_words_by_ref()contrib/completion/git-completion.bash t/t9902-completion.sh+92 -940 replies
23/26completion: bash: improve __gitcomp descriptioncontrib/completion/git-completion.bash+1 -20 replies
24/26completion: bash: add __gitcomp_optscontrib/completion/git-completion.bash contrib/completion/git-completion.zsh t/t9902-completion.sh+101 -800 replies
25/26completion: bash: cleanup __gitcomp* invocationscontrib/completion/git-completion.bash+9 -130 replies
26/26completion: bash: shuffle __gitcomp functionscontrib/completion/git-completion.bash+135 -1270 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 00/26] completion: bash: a bunch of fixes, cleanups, and reorganization

I found a couple of bugs and inconsistencies.

Also low-hanging fruit in terms of redundant code that can be merged and removed.

Tons of cleanups.

And refactoring the ancient _get_comp_words_by_ref.

Since v1:

* Added bug fixes
* A lot more reorganization

Felipe Contreras (26):
completion: bash: fix prefix detection in branch.*
completion: bash: add correct suffix in variables
completion: bash: fix for suboptions with value
completion: bash: do not modify COMP_WORDBREAKS
test: completion: fix currently typed words
test: completion: add run_func() helper
completion: bash: remove non-append functionality
completion: bash: get rid of _append() functions
completion: bash: get rid of any non-append code
completion: bash: factor out check in __gitcomp
completion: bash: simplify equal suffix check
completion: bash: refactor __gitcomp
completion: bash: simplify __gitcomp
completion: bash: change suffix check in __gitcomp
completion: bash: improve __gitcomp suffix code
completion: bash: simplify config_variable_name
test: completion: switch __gitcomp_nl prefix test
completion: bash: simplify _get_comp_words_by_ref()
completion: bash: refactor _get_comp_words_by_ref()
completion: bash: cleanup _get_comp_words_by_ref()
completion: bash: trivial cleanup
completion: bash: rename _get_comp_words_by_ref()
completion: bash: improve __gitcomp description
completion: bash: add __gitcomp_opts
completion: bash: cleanup __gitcomp* invocations
completion: bash: shuffle __gitcomp functions

 contrib/completion/git-completion.bash | 648 +++++++++++--------------
 contrib/completion/git-completion.zsh  |  20 +-
 t/t9902-completion.sh                  | 159 +++---
 3 files changed, 377 insertions(+), 450 deletions(-)
Signature · 1 line
2.29.2