Article 5SSS8 can't see the error in this piece of bash script

can't see the error in this piece of bash script

by
doodahjones
from LinuxQuestions.org on (#5SSS8)
Learning VSCode, and found I need to understand git first. This is part of a script to get that famous git bash prompt (the one with the git info in it) I saw in a tutorial done on Windows. Comes from a reddit user.

Seems to be an error at the very end, as below.

This is the error message:
Code:line 135: syntax error near unexpected token \ 'then'Code:line 135:parse_git_branch (){
branch=$(git branch 2> /dev/null | grep -e '* ' | sed 's/..(.*)/[\1]/') if [ -n "$branch" ]; then echo $branch$(git_status)
fi
}I'm just beginning to figure this stuff out but this has me beat. Can someone see the boo-boo?latest?d=yIl2AUoC8zA latest?i=7DGvIsKnXIo:BMWrbsOUt3g:F7zBnMy latest?i=7DGvIsKnXIo:BMWrbsOUt3g:V_sGLiP latest?d=qj6IDK7rITs latest?i=7DGvIsKnXIo:BMWrbsOUt3g:gIN9vFw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments