summaryrefslogtreecommitdiffstats
path: root/Completion/Unix/Command/_git
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2015-05-19 01:54:51 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2015-05-19 01:55:15 +0000
commit6bfe6fd84b2c5d62f95ebd1afcd241050515f512 (patch)
tree1ddd4f742f709941f807395f5f8bf36e053f8fef /Completion/Unix/Command/_git
parent35193: Add "unalias -a". (diff)
downloadzsh-6bfe6fd84b2c5d62f95ebd1afcd241050515f512.tar
zsh-6bfe6fd84b2c5d62f95ebd1afcd241050515f512.tar.gz
zsh-6bfe6fd84b2c5d62f95ebd1afcd241050515f512.tar.bz2
zsh-6bfe6fd84b2c5d62f95ebd1afcd241050515f512.tar.lz
zsh-6bfe6fd84b2c5d62f95ebd1afcd241050515f512.tar.xz
zsh-6bfe6fd84b2c5d62f95ebd1afcd241050515f512.tar.zst
zsh-6bfe6fd84b2c5d62f95ebd1afcd241050515f512.zip
users/20222: completion: git: Add matchspec for heads
Allows 'git checkout o/m<TAB>' to complete 'origin/master'. Moreover, '/x<TAB>' would complete 'foo/bar/xyzzy/baz', since the matchspec uses not '*' but '**'.
Diffstat (limited to 'Completion/Unix/Command/_git')
-rw-r--r--Completion/Unix/Command/_git8
1 files changed, 4 insertions, 4 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 708eb2a06..a40ebe988 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5586,7 +5586,7 @@ __git_remote_branch_names () {
branch_names=(${${(f)"$(_call_program remote-branch-refs git for-each-ref --format='"%(refname)"' refs/remotes 2>/dev/null)"}#refs/remotes/})
__git_command_successful $pipestatus || return 1
- _wanted remote-branch-names expl 'remote branch name' compadd "$@" -a - branch_names
+ _wanted remote-branch-names expl 'remote branch name' compadd -M 'r:|/=**' "$@" -a - branch_names
}