Closed cbxcvl closed 6 months ago
I found a fix
replace the original PS1 line with the following code:
local git_branch
git_branch=$(parse_git_branch)
local git_info
[[ -n $(_omb_prompt_git branch 2> /dev/null) ]] && git_info=" on "
PS1="$python_venv${MAGENTA}\u ${WHITE}at ${ORANGE}\h ${WHITE}in ${GREEN}\w${WHITE}${git_info}${PURPLE}${git_branch}${WHITE}\n\$ ${RESET}"
We received similar reports from users of Git for Windows. Bash distributed with old versions of Git for Windows seems to have a bug (cf https://github.com/ohmybash/oh-my-bash/issues/211#issuecomment-1218903376).
If you use Git for Windows, what is the version of Git for Windows in your system? You can update Git for Windows to the latest version:
$ git update-git-for-windows
bash: command substitution: line 1: syntax error near unexpected token
)' bash: command substitution: line 1:
[[ -n $(_omb_prompt_git branch 2> /dev/null) ]] && echo " on ")' bash: command substitution: line 1: syntax error near unexpected token)' bash: command substitution: line 1:
parse_git_branch)' $