mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
This commit is contained in:
parent
1ed9650a44
commit
d452490489
1 changed files with 21 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue