syntax error near unexpected token `(' bash

0

I am working on helpers to open my project when I get to work. I have so far:

alias cdsloadmin="cd $SLO_ADMIN_SUITE_PATH; workon slo-admin-suite; atom $SLO_ADMIN_SUITE_PATH"
runsloadmin() { cdsloadmin; google-chrome 127.0.0.1:8888; python app.py ;}

Failing with

-bash: /Users/cchilders/.bash_profile: line 112: syntax error near unexpected token `('
-bash: /Users/cchilders/.bash_profile: line 112: `runsloadmin() { cdsloadmin; google-chrome 127.0.0.1:8888; python app.py ;}'

Also failing is

alias cdsloadmin="cd $SLO_ADMIN_SUITE_PATH; workon slo-admin-suite; atom $SLO_ADMIN_SUITE_PATH"
runsloadmin() { cdsloadmin; google-chrome 127.0.0.1:8888; python app.py }

even

alias cdsloadmin="cd $SLO_ADMIN_SUITE_PATH; workon slo-admin-suite; atom $SLO_ADMIN_SUITE_PATH"
runsloadmin() { google-chrome 127.0.0.1:8888/; python app.py }

I'd like this to work on ubuntu and mac, although I use mac mostly for work.

Commenting out runsloadmin() function line fixes it, although this bash function is patterned after my other ones.

https://www.shellcheck.net/ doesn't find any error. Any help appreciated

The file blows up with it's named runsloadmin() but if I change the name to anything, like runsomestuff() it works just fine. This is a new project and nowhere in my bash files is runsloadmin except the one time

codyc4321

Posted 2017-01-24T17:17:23.507

Reputation: 298

Answers

0

For some reason, calling source .bashrc didn't clear the name runsloadmin so there was a collision. Closing all terminals and reopening terminal fixed. This is poor behavior for a terminal that I haven't seen on linux, but I'm on mac

codyc4321

Posted 2017-01-24T17:17:23.507

Reputation: 298