Commit 00183d11 authored by Robby Russell's avatar Robby Russell
Browse files

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 46f0d8db.
parents 89067b53 05d8fdf3
...@@ -60,3 +60,24 @@ _git-branch () ...@@ -60,3 +60,24 @@ _git-branch ()
"($l $c $m -d)-D[delete a branch]" \ "($l $c $m -d)-D[delete a branch]" \
$dependent_deletion_args $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
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment