-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
bash_prompt throw error in git-bash #582
Comments
duplicates #544 |
I'm having the same problem and I don't think this is duplicated. |
This repository targets Bash 4.x on OS X. It may work on Linux/BSD, even the Windows version of Bash that comes with Git for Windows. It may even work on zsh or other similar shells. For anything that is not Bash 4 (regardless of how you upgrade OS X's) and OS X, you are on your own. Unsupported environments should be ignored. |
Well, I am not sure about that since my PS1 used on Linux and Mac does not seem to have this problem but it has This may be some sort of weird bug with Bash for Windows. On Cygwin Bash I do not get this problem. |
See the reference manual section Controlling the Prompt. It seems to me that your Bash has |
I'm using minGW, it comes with git for windows. Maybe the problem is just with minGW decoding since you are using Cygwin bash and it works ok! |
Just in case someone is looking for the workaround. |
@xxxwarrior is on to something, however, you must wrap the shell command with |
A bash shell is bundled with latest version git for window, it seems does not support the .bash_prompt in line https://github.com/mathiasbynens/dotfiles/blob/master/.bash_prompt#L114
The error is
bash: command substitution: line 1: syntax error near unexpected token
)' bash: command substitution: line 1:
prompt_git " on ")'To me it is legal, so I don't know how to fix it. Can this be fixed for git-bash (bash for git for window)?
Thanks
The text was updated successfully, but these errors were encountered: