Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[RFC] Use _multi_parts for completing git tree files



This makes it possible to use abbreviated paths for tree files like

  git checkout C/U/C/_gi

for

  git checkout Completion/Unix/Command/_git
---
 Completion/Unix/Command/_git |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index c8a1282..c617613 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -2859,7 +2859,7 @@ __git_tree_files () {
   fi
 
   local expl
-  _wanted files expl 'tree file' compadd $multi_parts_opts -f -a tree_files
+  _wanted files expl 'tree file' _multi_parts -f $@ -- / tree_files
 }
 
 # TODO: deal with things that __git_heads and __git_tags has in common (i.e.,
-- 
1.6.0.1



Messages sorted by: Reverse Date, Date, Thread, Author