diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-05-30 14:04:08 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-30 14:04:08 +0900 |
commit | 4ce72180abe72dbb40f5e6a517deea814014e005 (patch) | |
tree | 412bd776cc9fb037860dc5a8c2a6ee3aed7312da /contrib/completion/git-completion.zsh | |
parent | Merge branch 'nd/travis-gcc-8' (diff) | |
parent | t9902-completion: exercise __git_complete_index_file() directly (diff) | |
download | tgif-4ce72180abe72dbb40f5e6a517deea814014e005.tar.xz |
Merge branch 'sg/complete-paths'
Command line completion (in contrib/) learned to complete pathnames
for various commands better.
* sg/complete-paths:
t9902-completion: exercise __git_complete_index_file() directly
completion: don't return with error from __gitcomp_file_direct()
completion: fill COMPREPLY directly when completing paths
completion: improve handling quoted paths in 'git ls-files's output
completion: remove repeated dirnames with 'awk' during path completion
t9902-completion: ignore COMPREPLY element order in some tests
completion: use 'awk' to strip trailing path components
completion: let 'ls-files' and 'diff-index' filter matching paths
completion: improve handling quoted paths on the command line
completion: support completing non-ASCII pathnames
completion: simplify prefix path component handling during path completion
completion: move __git_complete_index_file() next to its helpers
t9902-completion: add tests demonstrating issues with quoted pathnames
Diffstat (limited to 'contrib/completion/git-completion.zsh')
-rw-r--r-- | contrib/completion/git-completion.zsh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index c3521fbfc4..53cb0f934f 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -93,6 +93,15 @@ __gitcomp_nl_append () compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0 } +__gitcomp_file_direct () +{ + emulate -L zsh + + local IFS=$'\n' + compset -P '*[=:]' + compadd -Q -f -- ${=1} && _ret=0 +} + __gitcomp_file () { emulate -L zsh |