git/contrib/completion
Junio C Hamano 354d1bf3a0 completion: 'git diff' completes untracked paths as a last resort
We taught 'git diff' to first try to complete revisions (unless '--'
is present on the command line) and, failing that, to complete
tracked paths.  If this yields nothing, it lets the Bash default,
which offers paths in $PWD, kick in.

Teach it to complete untracked paths before giving up and letting
the Bash default kick in.  With this change,

    $ git -C another-directory diff un<TAB>

finds the 'untracked' file in another-directory and offers it as a
completion candidate.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-08-12 10:14:42 -07:00
..
.gitattributes
git-completion.bash completion: 'git diff' completes untracked paths as a last resort 2026-08-12 10:14:42 -07:00
git-completion.tcsh completion: tcsh: Fix regression by drop of wrapper functions 2021-08-18 13:58:27 -07:00
git-completion.zsh completion: fix zsh alias listing for subsection aliases 2026-02-19 10:13:20 -08:00
git-prompt.sh git-prompt: support custom 0-width PS1 markers 2024-08-20 08:28:19 -07:00
meson.build contrib/completion: install Bash completion 2025-04-22 08:26:12 -07:00