I'm not entirely sure why I'm getting the error in my .bash_profile
syntax error near unexpected token `('
when I use the keyword grom()
for my function. I wanted to create a bash function that will just automatically rebase my master branch with origin
grom() {
branch_name="$(git symbolic-ref --short -q HEAD)"
git fetch && git rebase origin/master && git checkout master && git rebase origin/master && git checkout $branch_name
}
When I change the name of the function, it compiles fine. I couldn't find grom
as a keyword so I'm not sure what the issue is. If I rename the function to anything else like git-rom
or even something like groms
, it compiles fine. Is there some special keywords that do not work? This is on Mac OS X.
Aucun commentaire:
Enregistrer un commentaire