Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix syntax error in switch operator #46

Merged
merged 3 commits into from
Oct 7, 2015

Conversation

Neyaz
Copy link
Contributor

@Neyaz Neyaz commented Sep 24, 2015

When I typed "gvp [command]" I got this error

/usr/local/bin/gvp: line 104: syntax error near unexpected token ;' /usr/local/bin/gvp: line 104: "") ;& # This was sourced, no command was provided'

@langston-barrett
Copy link
Collaborator

@Neyaz This is actually not a syntax error! You might have an old version of Bash. This syntax was introduced in version 4.0. Can you post the output of bash --version?

@Neyaz
Copy link
Contributor Author

Neyaz commented Sep 24, 2015

@siddharthist
3.2.57(1)-release (x86_64-apple-darwin14)

Yes, I have old version.
But i think that's better because it's only one error when working with the old version. Doesn't need to update something or fix code.

@langston-barrett
Copy link
Collaborator

@Neyaz I see what you're saying. In that case, please revise your code so that the case fallthrough is accurately represented, and I'll happily merge.

@Neyaz
Copy link
Contributor Author

Neyaz commented Sep 25, 2015

@siddharthist What do you mean?

@langston-barrett
Copy link
Collaborator

@Neyaz I mean that the syntax ;& represents a case fall through, where the next case's code is also executed. It is distinct from the ;; syntax. If you're still not sure how to do this, I'm happy to help.

@Neyaz
Copy link
Contributor Author

Neyaz commented Sep 25, 2015

@siddharthist

Done.

@langston-barrett
Copy link
Collaborator

@Neyaz Thank you! I'll test this soon.

langston-barrett added a commit that referenced this pull request Oct 7, 2015
fix compatibility with bash < 4.0
@langston-barrett langston-barrett merged commit f13254d into pote:master Oct 7, 2015
@Neyaz Neyaz deleted the fixSyntaxError branch October 11, 2015 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants