summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2015-10-25 18:35:38 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2015-10-25 18:52:13 +0000
commitcc19bb96b91904cc650512297df63b834aa42d28 (patch)
tree1d8c5b4d5ce4716724f42d7f67108b5945090416 /Completion/Unix/Command
parentb4f7482e44ec59bfe99c8d0f23503570eda0ca1b (diff)
downloadzsh-cc19bb96b91904cc650512297df63b834aa42d28.tar.gz
zsh-cc19bb96b91904cc650512297df63b834aa42d28.tar.xz
zsh-cc19bb96b91904cc650512297df63b834aa42d28.zip
36964: _git: Complete remotes branch names with slashes correctly.
For example, 'git push remote HEAD:foo/bar' creates such branches.
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_git2
1 files changed, 1 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index e5005f1c3..f22cddb3e 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -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