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

Git bash commands not working #168

Closed
kendonB opened this issue Feb 1, 2017 · 2 comments
Closed

Git bash commands not working #168

kendonB opened this issue Feb 1, 2017 · 2 comments
Labels
Question Questions regarding utilization of Castor

Comments

@kendonB
Copy link
Collaborator

kendonB commented Feb 1, 2017

Everything else in caster seems to be working okay, even in Git bash itself. Are you able to help me with troubleshooting this? Is this something I need to activate?

@chilimangoes
Copy link
Collaborator

  1. Make sure the "gitbash" setting is set to true in caster/bin/data/settings.json (I'm pretty sure it's enabled by default, but check just in case).

  2. Gitbash is an app-specific grammar, which means that it's enabled/disabled based on what Windows executable has the system focus when you start saying a command. The AppContext is set up at the bottom of the gitbash.py and by default is only configured to work when the EXE name matches "sh", which is the terminal app in MINGW and (I think) Cygwin. If you're using something else, like the default CMD in Windows, then it won't work. It's easy to add whatever terminal program(s) you're using by OR-ing additional AppContexts. See the jetbrains.py grammar for an example of doing this.

@kendonB
Copy link
Collaborator Author

kendonB commented Feb 4, 2017

Below is my solution. My bash shell was called "git-bash". Now this seems to work.

context = AppContext(executable="sh")
context2 = AppContext(executable="cmd")
context3 = AppContext(executable="git")

grammar = Grammar("MINGW32", context=(context | context2 | context3))

@kendonB kendonB closed this as completed Feb 4, 2017
@LexiconCode LexiconCode added the Question Questions regarding utilization of Castor label Mar 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Questions regarding utilization of Castor
Projects
None yet
Development

No branches or pull requests

3 participants