diff options
author | Robby Russell <robby@planetargon.com> | 2013-08-13 06:20:05 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2013-08-13 06:20:05 -0700 |
commit | 00183d119929f708e08575cef764a8e570d700f4 (patch) | |
tree | ca20350fa11c05cf88db898a7157b33a7df367e5 /plugins | |
parent | 89067b53879aeb34e5b6d8ea1325f766394e5d25 (diff) | |
parent | 05d8fdf3d54af3243e5891d13969a766bd9570a1 (diff) | |
download | zsh-00183d119929f708e08575cef764a8e570d700f4.tar.gz zsh-00183d119929f708e08575cef764a8e570d700f4.tar.bz2 zsh-00183d119929f708e08575cef764a8e570d700f4.zip |
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.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/git/_git-branch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/git/_git-branch b/plugins/git/_git-branch index 86d03bc30..6b9c1a483 100644 --- a/plugins/git/_git-branch +++ b/plugins/git/_git-branch @@ -60,3 +60,24 @@ _git-branch () "($l $c $m -d)-D[delete a branch]" \ $dependent_deletion_args } + +(( $+functions[__git_ignore_line] )) || +__git_ignore_line () { + declare -a ignored + ignored=() + ((CURRENT > 1)) && + ignored+=(${line[1,CURRENT-1]//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH}) + ((CURRENT < $#line)) && + ignored+=(${line[CURRENT+1,-1]//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH}) + $* -F ignored +} + +(( $+functions[__git_ignore_line_inside_arguments] )) || +__git_ignore_line_inside_arguments () { + declare -a compadd_opts + + zparseopts -D -E -a compadd_opts V: J: 1 2 n f X: M: P: S: r: R: q F: + + __git_ignore_line $* $compadd_opts +} + |