00183d119929f708e08575cef764a8e570d700f4
Author Robby Russell <robby@planetargon.com> Committer Robby Russell <robby@planetargon.com> Date 2013-08-13 13:20 UTC
Message Merge pull request #1961 from brenttheisen/issue_1952_pr
Copy and paste of two functions from Ubuntu 13.04's version of /usr/s… …hare/zsh/functions/Completion/Unix/_git that were referenced in 46f0d8d.
Diff 1 diff --git a/plugins/git/_git-branch b/plugins/git/_git-branch
2 index 86d03bc30eeb1a7c0349b20bfcf83f46b95f6d8c..6b9c1a483e92c5c5219a69c6f25f319009db02fd 100644
3 --- a/plugins/git/_git-branch
4 +++ b/plugins/git/_git-branch
5 @@ -60,3 +60,24 @@ _git-branch ()
6 "($l $c $m -d)-D[delete a branch]" \
7 $dependent_deletion_args
8 }
9 +
10 +(( $+functions[__git_ignore_line] )) ||
11 +__git_ignore_line () {
12 + declare -a ignored
13 + ignored=()
14 + ((CURRENT > 1)) &&
15 + ignored+=(${line[1,CURRENT-1]//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH})
16 + ((CURRENT < $#line)) &&
17 + ignored+=(${line[CURRENT+1,-1]//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH})
18 + $* -F ignored
19 +}
20 +
21 +(( $+functions[__git_ignore_line_inside_arguments] )) ||
22 +__git_ignore_line_inside_arguments () {
23 + declare -a compadd_opts
24 +
25 + zparseopts -D -E -a compadd_opts V: J: 1 2 n f X: M: P: S: r: R: q F:
26 +
27 + __git_ignore_line $* $compadd_opts
28 +}
29 +