From: Junio C Hamano Date: Wed, 12 Aug 2026 01:45:58 GMT Subject: Re: [PATCH 0/2] completion of 'git [-C ] checkout' Message-ID: In-Reply-To: Ben Knoble writes: >> Le 11 août 2026 à 00:04, Junio C Hamano a écrit : >> >> I did not, however, find any readily usable machinery in the >> 'git-completion.bash' script that allows completing a path within an >> arbitrary tree. If such machinery were available, 'git checkout >> other-branch foo' could capture the output of 'git ls-tree -r >> other-branch' and offer paths that begin with the given prefix. >> >> Regardless, implementing this is beyond my 'git-completion-fu' right >> now. As I mentioned, I barely managed the 'diff' completion as a >> monkey-see-monkey-do patch series, and I would welcome others >> building on top of this once the dust settles. > > I do not know where it lives (and it may be Zsh-specific) [partly > because I haven’t looked while on mobile], but I think there is > support for completing « path » in « git show :», so there > might be something to build on there. I know where treeish:path support is. The thing is, it is not a reusable machinery for "git checkout treeish path". Thanks.