mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
fix gwip alias for some BSD flavors, fixes #2692
This commit is contained in:
parent
f8f01262ab
commit
00e240f846
1 changed files with 4 additions and 1 deletions
|
|
@ -149,7 +149,10 @@ function work_in_progress() {
|
|||
fi
|
||||
}
|
||||
# these alias commit and uncomit wip branches
|
||||
alias gwip='git add -A; git ls-files --deleted -z | xargs -r0 git rm; git commit -m "--wip--"'
|
||||
# first though, check xargs flavor for -r flag
|
||||
echo | xargs -r &>/dev/null && XARGS_OPTS="-r"
|
||||
alias gwip="git add -A; git ls-files --deleted -z | xargs ${XARGS_OPTS} -0 git rm; git commit -m \"--wip--\""
|
||||
unset XARGS_OPTS
|
||||
alias gunwip='git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1'
|
||||
|
||||
# these alias ignore changes to file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue