mathiasbynens / mathiasbynens/dotfiles

bash_prompt throw error in git-bash

Open
#582 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
31.5k
Forks
8.4k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with .bash_prompt at the reported line 114 and reproduce the command-substitution syntax error in Git Bash. Compare the reported prompt_git invocation with the Bash version bundled by Git for Windows; done means the prompt loads without the unexpected-token error while preserving the existing prompt behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.