completion: path completion improvements: speedup and quoted paths
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest11 patches 8 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | t9902-completion: add tests demonstrating issues with quoted pathnamest/ | +91 | 15 replies | |
| 2/11 | completion: move __git_complete_index_file() next to its helperscontrib/ | +19 | 0 replies | |
| 3/11 | completion: simplify prefix path component handling during path completioncontrib/ | +3 | 0 replies | |
| 4/11 | completion: support completing non-ASCII pathnamescontrib/ t/ | +5 | 0 replies | |
| 5/11 | completion: improve handling quoted paths on the command linecontrib/ t/ | +116 | 0 replies | |
| 6/11 | completion: let 'ls-files' and 'diff-index' filter matching pathscontrib/ t/ | +7 | 0 replies | |
| 7/11 | completion: use 'awk' to strip trailing path componentscontrib/ | +4 | 0 replies | |
| 8/11 | t9902-completion: ignore COMPREPLY element order in some testst/ | +4 | 0 replies | |
| 9/11 | completion: remove repeated dirnames with 'awk' during path completioncontrib/ | +6 | 0 replies | |
| 10/11 | completion: improve handling quoted paths in 'git ls-files's outputcontrib/ t/ | +79 | 0 replies | |
| 11/11 | completion: fill COMPREPLY directly when completing pathscontrib/ contrib/ | +39 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/11] completion: path completion improvements: speedup and quoted paths
So, the highlights of this patch series are:
- At the top of the worktree in linux.git with over 62k files the time needed for 'git rm <TAB>' goes down from 2.15s to 0.052s.
- Same place, uniquely completing Makefile with 'git rm Mak<TAB>' goes
down from 2.16s to 0.033s.
- Completing paths containing escaped or quoted characters (except newline) will work properly, and won't fall back to Bash's filename completion, e.g. git add File\\w<TAB>' will list 'File\with\backslashes.c', but not the corresponding ignored object file.
Well, at least it appears to be working for me, but dealing with quoting especially is nuts. If someone knows simpler ways to remove escaping and quoting than in the functions added in patches 5 and 10, then please, I would really love to learn something :)
Someone using ZSH regularly should have a look and test it.
SZEDER Gábor (11):
t9902-completion: add tests demonstrating issues with quoted pathnames
completion: move __git_complete_index_file() next to its helpers
completion: simplify prefix path component handling during path
completion
completion: support completing non-ASCII pathnames
completion: improve handling quoted paths on the command line
completion: let 'ls-files' and 'diff-index' filter matching paths
completion: use 'awk' to strip trailing path components
t9902-completion: ignore COMPREPLY element order in some tests
completion: remove repeated dirnames with 'awk' during path completion
completion: improve handling quoted paths in 'git ls-files's output
completion: fill COMPREPLY directly when completing paths
contrib/completion/git-completion.bash | 218 +++++++++++++++++++++---- contrib/completion/git-completion.zsh | 9 + t/t9902-completion.sh | 153 ++++++++++++++++- 3 files changed, 348 insertions(+), 32 deletions(-)
Signature · 1 line
2.17.0.366.gbe216a3084