d60522c7a290565c9de7594817a9d201732d5dd9

Author
Sam O <soluwalana@gmail.com>
Committer
Sam O <soluwalana@gmail.com>
Date

Message

escape dashes

Diff

 1diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
 2index 42b4698f9c3220f50ce80bd95cc1a74e2597bfba..1285a32476b763b64d98a29b79a5388bf50fa8cf 100644
 3--- a/plugins/git/git.plugin.zsh
 4+++ b/plugins/git/git.plugin.zsh
 5@@ -142,13 +142,13 @@ compdef _git glp=git-log
 6 #
 7 # This function return a warning if the current branch is a wip
 8 function work_in_progress() {
 9-  if $(git log -n 1 2>/dev/null | grep -q -c "--wip--"); then
10+  if $(git log -n 1 2>/dev/null | grep -q -c "\-\-wip\-\-"); then
11     echo "WIP!!"
12   fi
13 }
14 # these alias commit and uncomit wip branches
15 alias gwip='git add -A; git ls-files --deleted -z | xargs -0 git rm; git commit -m "--wip--"'
16-alias gunwip='git log -n 1 | grep -q -c "--wip--" && git reset HEAD~1'
17+alias gunwip='git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1'
18 
19 # these alias ignore changes to file
20 alias gignore='git update-index --assume-unchanged'