zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH 4/5] _git: Complete remotes branch names with slashes correctly.
@ 2015-10-25 18:35 Daniel Shahaf
  0 siblings, 0 replies; only message in thread
From: Daniel Shahaf @ 2015-10-25 18:35 UTC (permalink / raw)
  To: zsh-workers

For example, 'git push remote HEAD:foo/bar' creates such branches.
---
 Completion/Unix/Command/_git | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 004a8c9..5a395aa 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
-- 
2.1.4


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-10-25 18:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-25 18:35 [PATCH 4/5] _git: Complete remotes branch names with slashes correctly Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).