Files
git/builtin
Jonatan Holmgren edd8ad18a6 completion: fix zsh alias listing for subsection aliases
The zsh completion function __git_zsh_cmd_alias() uses 'git config
--get-regexp' to enumerate aliases and then strips the "alias." prefix
from each key. For subsection-style aliases (alias.name.command), this
leaves "name.command" as the completion candidate instead of just
"name".

The bash completion does not have this problem because it goes through
'git --list-cmds=alias', which calls list_aliases() in C and already
handles both alias syntaxes correctly. However, zsh needs both the
alias name and its value for descriptive completion, which
--list-cmds=alias does not provide.

Add a hidden --aliases-for-completion option to 'git help', following
the existing --config-for-completion pattern. It outputs NUL-separated
"name\nvalue" pairs using list_aliases(), which correctly resolves both
the traditional (alias.name) and subsection (alias.name.command)
formats. Update __git_zsh_cmd_alias() to use it.

Signed-off-by: Jonatan Holmgren <jonatan@jontes.page>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-19 10:13:20 -08:00
..
2025-10-02 12:26:11 -07:00
2025-11-19 10:55:39 -08:00
2025-12-05 14:49:56 +09:00
2024-12-13 07:33:36 -08:00
2025-07-23 08:15:18 -07:00
2025-09-29 11:40:35 -07:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:18 -07:00
2025-07-01 14:46:38 -07:00
2025-08-22 13:13:20 -07:00
2025-12-25 08:29:27 +09:00
2024-12-18 10:44:31 -08:00
2025-07-16 22:16:15 -07:00
2025-07-23 08:15:18 -07:00
2025-12-25 08:29:27 +09:00
2025-08-21 13:47:00 -07:00
2025-10-02 12:26:12 -07:00
2026-01-06 07:30:16 +09:00
2025-07-23 08:15:18 -07:00
2025-11-19 10:55:39 -08:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:18 -07:00
2025-09-16 11:37:06 -07:00
2025-08-21 13:46:59 -07:00