1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 22:11:54 +02:00

36964: _git: Complete remotes branch names with slashes correctly.

For example, 'git push remote HEAD:foo/bar' creates such branches.
This commit is contained in:
Daniel Shahaf 2015-10-25 18:35:38 +00:00
parent b4f7482e44
commit cc19bb96b9
2 changed files with 4 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2015-10-25 Daniel Shahaf <d.s@daniel.shahaf.name>
* 36964: Completion/Unix/Command/_git: _git: Complete remotes
branch names with slashes correctly.
* 36960: Completion/Unix/Command/_git: _git: Enable slash matcher
for more branch and tag completions, include 'git branch <TAB>'
and 'git tag <TAB>'.

View file

@ -5559,7 +5559,7 @@ __git_remote_branch_names_noprefix () {
local expl
declare -a heads
branch_names=(${${${(f)"$(_call_program remote-branch-refs-noprefix git for-each-ref --format='"%(refname)"' refs/remotes 2>/dev/null)"}##*/}:#HEAD})
branch_names=(${${${${(f)"$(_call_program remote-branch-refs-noprefix git for-each-ref --format='"%(refname)"' refs/remotes 2>/dev/null)"}#refs/remotes/}#*/}:#HEAD})
__git_command_successful $pipestatus || return 1
_wanted remote-branch-names-noprefix expl 'remote branch name' compadd -M 'r:|/=**' "$@" -a - branch_names