diff options
author | yleo77 <ylep77@gmail.com> | 2013-08-29 13:41:42 +0800 |
---|---|---|
committer | yleo77 <ylep77@gmail.com> | 2013-08-29 13:41:42 +0800 |
commit | fda5afaebca57250792696e29c2e111f41f6fce4 (patch) | |
tree | d52b970bcdec2eb59069081353b6b4d3af6f9893 /plugins/git | |
parent | 6041e4938cc559b908d83b5664166cc1fd02f31e (diff) | |
parent | 434f3bc05c5245d7a27ab0bb1ede5b78acc370a4 (diff) | |
download | zsh-fda5afaebca57250792696e29c2e111f41f6fce4.tar.gz zsh-fda5afaebca57250792696e29c2e111f41f6fce4.tar.bz2 zsh-fda5afaebca57250792696e29c2e111f41f6fce4.zip |
Merge remote-tracking branch 'robbyrussell/master'
Diffstat (limited to 'plugins/git')
-rw-r--r-- | plugins/git/_git-branch | 21 | ||||
-rw-r--r-- | plugins/git/git.plugin.zsh | 2 |
2 files changed, 23 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 +} + diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 9087a14ea..aad776189 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -22,6 +22,8 @@ alias gca='git commit -v -a' compdef _git gc=git-commit alias gca!='git commit -v -a --amend' compdef _git gca!=git-commit +alias gcmsg='git commit -m' +compdef _git gcmsg=git-commit alias gco='git checkout' compdef _git gco=git-checkout alias gcm='git checkout master' |