On Mon, Nov 09, 2020 at 07:06:56PM -0600, Felipe Contreras wrote: > > We do have "git <cmd> --git-completion-helper" these days. I wonder if > > something like "git --expand-alias-to-command" would be a useful > > addition, as it would let us directly ask which Git command would be > > executed (if any). And it would make both downsides go away. > > Yes, but I don't think we need to wait in order to have a solution for > both issues. I already sent an updated patch. Agreed. The cycle-detection in your v2 looks fine to me. > Additionally, it might not be what the user wants. For example the > user might decide to have different completion for each one of the > aliases (_git_l, _git_lg, etc.), and if so, we would want > __git_aliased_command to exit once we find the correct completion > function. Good point. -Peff