pr-git-2311/alibaba0010/completion-hide-dotfiles-v3
tagged this
20 Jun 17:55
The completion helper for index paths uses git ls-files rather than shell filename completion. As a result, leading-dot paths such as a tracked .gitignore were offered even when the user had not started the path with .. Hide leading-dot path components for git rm, git mv, and git ls-files when completing an empty path component. Explicit dot completion is still preserved, so git rm . can still complete .gitignore. This removes the existing TODO expectations in t/t9902-completion.sh and adds coverage for explicit dot completion. Validation: * git diff --check -- contrib/completion/git-completion.bash t/t9902-completion.sh * bash -n contrib/completion/git-completion.bash * ./t9902-completion.sh Zakariyah Ali (2): completion: hide dotfiles for selected path completion completion: hide dotfiles by default for path completion contrib/completion/git-completion.bash | 53 +++++++++++++++----------- t/t9902-completion.sh | 19 ++++----- 2 files changed, 40 insertions(+), 32 deletions(-) base-commit: 9b7fa37559a1b95ee32e32858b0d038b4cf583e5 Submitted-As: https://lore.kernel.org/git/pull.2311.v3.git.git.1781978156.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.2311.git.git.1779590184752.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.2311.v2.git.git.1779808987825.gitgitgadget@gmail.com