summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2017-02-05 09:38:23 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2017-02-07 08:43:31 +0000
commitec1bdab023543a60b2cd6f920c38bd88a4057886 (patch)
tree42205441db4783962d10ae920fa5206893a20081 /Completion
parent3afd12ae9716b25ef03c768b270ea91e9202364f (diff)
downloadzsh-ec1bdab023543a60b2cd6f920c38bd88a4057886.tar.gz
zsh-ec1bdab023543a60b2cd6f920c38bd88a4057886.tar.xz
zsh-ec1bdab023543a60b2cd6f920c38bd88a4057886.zip
40494: _git: Use slashes matchspec for references (as already used for branch names).
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_git5
1 files changed, 3 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index b16d2bc4c..684eb21d0 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -6481,9 +6481,10 @@ __git_references () {
     _git_refs_cache_pwd=$PWD
   fi
 
-  _wanted references expl 'reference' compadd -a - _git_refs_cache
+  _wanted references expl 'reference' compadd -M 'r:|/=**' -a - _git_refs_cache
 }
 
+# ### currently unused; are some callers of __git_references supposed to call this function?
 (( $+functions[__git_local_references] )) ||
 __git_local_references () {
   local expl
@@ -6494,7 +6495,7 @@ __git_local_references () {
     _git_local_refs_cache_pwd=$PWD
   fi
 
-  _wanted references expl 'reference' compadd -a - _git_local_refs_cache
+  _wanted references expl 'reference' compadd -M 'r:|/=**' -a - _git_local_refs_cache
 }
 
 (( $+functions[__git_remote_references] )) ||