]> git.ipfire.org Git - thirdparty/git.git/commit - contrib/completion/git-completion.bash
completion: use native ZSH array pattern matching
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Tue, 26 May 2020 19:13:17 +0000 (19:13 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 May 2020 16:15:18 +0000 (09:15 -0700)
commita44a0a9fc4353ff4ccd4b2308db2844d7f4185f9
tree325bc33d2fdc9030f5c93e79a0d4733fff450ed6
parent2d5e9f31ac46017895ce6a183467037d29ceb9d3
completion: use native ZSH array pattern matching

When clearing the builtin operations on re-sourcing in the ZSH case we
can use the native ${parameters} associative array keys values to get
the currently `__gitcomp_builtin_*` operations using pattern matching
instead of using sed.

As also stated in commit 94408dc7, introducing this change the usage of
sed has some overhead implications, while ZSH can do this check just
using its native syntax.

Signed-off-by: Marco Trevisan (Treviño) <mail@3v1n0.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash