[PATCH 00/51] completion: revamp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch series revamps the completion code to git-completion 1.4.

I used to send this series minimizing the delta to git upstream in order
to maximize the chances of it being merged, but it has not received any
feedback since the first time it was sent in 2020 [1], so it is safe to
say upstream has zero interest in getting this merged. It makes no sense
for me to do extra work to maximize the chances of something that will
never happen.

Therefore this series starts with the most intrusive change:
zsh completion tests.

For several years git-completion has been running zsh completion tests
to make sure everything works correctly, not only for bash, but also for
zsh.

The zsh code delta between upstream and git-completion results in 14
tests now passing. The new patch series makes that clear now.

Here's a summary of the differences between upstream and git-completion:

 * Fixed alias regression
 * Make tests work when user has configured GIT_PS1_* variables
 * Enable colors in bash without prompt command
 * Fix suboptions for zsh
 * Fix COMP_WORDBREAKS handling
 * Fix main option handling for zsh
 * Fix -C handling for zsh
 * Fix -c handling for zsh
 * Fix generic completions for zsh
 * Fix configurations with value for zsh (e1e00089da)
 * Fix option relationships for zsh
 * Add improved removable suffix for zsh
 * Plenty of reorganizations and cleanups

For more information check [2].

Cheers.

[1] https://lore.kernel.org/git/20201110212136.870769-1-felipe.contreras@xxxxxxxxx/
[2] https://github.com/felipec/git-completion

Felipe Contreras (50):
  test: completion add test for __git_cmd_idx
  test: add zsh completion tests
  completion: fix __git_cmd_idx regression for zsh
  completion: bash: trivial cleanup
  completion: zsh: add higher-priority location
  zsh: simplify realpath dirname idiom
  test: reset environment variables
  completion: prompt: use generic colors
  completion: fix for suboptions with value
  completion: zsh: trivial improvement
  completion: bash: do not modify COMP_WORDBREAKS
  test: completion: fix currently typed words
  test: completion: switch __gitcomp_nl prefix test
  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: zsh: fix options with arguments
  completion: zsh: expand --git-dir file argument
  completion: zsh: add support for general -C opts
  completion: zsh: fix for undefined completions
  completion: zsh: add support for general -c opts
  completion: zsh: fix extra space on foo=
  completion: zsh: add excluded options
  completion: zsh: always set compset
  completion: factor out check in __gitcomp
  completion: simplify equal suffix check
  completion: refactor __gitcomp
  completion: simplify __gitcomp
  completion: bash: change suffix check in __gitcomp
  completion: improve __gitcomp suffix code
  test: completion: add missing test
  completion: bash: simplify config_variable_name
  completion: bash: improve __gitcomp description
  completion: add __gitcomp_opts
  completion: bash: cleanup __gitcomp* invocations
  completion: bash: shuffle __gitcomp functions
  completion: zsh: simplify __gitcomp_direct
  completion: zsh: shuffle __gitcomp* functions
  completion: zsh: fix direct quoting
  completion: zsh: add elements individually in __gitcomp_opts
  completion: zsh: add __gitcompadd helper
  completion: zsh: add correct removable suffix
  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()
  zsh: remove version
  completion: bash: trivial grammar fix

Michael Bianco (1):
  zsh: resolve symlink of script

 contrib/completion/git-completion.bash |  637 ++++++-------
 contrib/completion/git-completion.zsh  |  146 ++-
 contrib/completion/git-prompt.sh       |   19 +-
 t/t9902-completion.sh                  |  159 ++--
 t/t9903-bash-prompt.sh                 |   16 +-
 t/t9904-zsh-completion.sh              | 1137 ++++++++++++++++++++++++
 t/t9904/.gitignore                     |    1 +
 t/t9904/.zshrc                         |   50 ++
 t/t9904/_git                           |    1 +
 t/t9904/completion                     |   11 +
 10 files changed, 1649 insertions(+), 528 deletions(-)
 create mode 100755 t/t9904-zsh-completion.sh
 create mode 100644 t/t9904/.gitignore
 create mode 100644 t/t9904/.zshrc
 create mode 120000 t/t9904/_git
 create mode 100755 t/t9904/completion

-- 
2.37.2.351.g9bf691b78c.dirty




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux