Scriptim/bash-prompt-generator

Git branch bug

Closed this issue · 1 comments

jxu commented

When I try the output given:

PROMPT_COMMAND='PS1_CMD1=$($(git branch 2>/dev/null | grep '"'"'*'"'"' | colrm 1 2))' 

My bash tries to run the branch name as a command (e.g. Command 'master' not found). I think there is an extra subshell, that is set of $(...). Without it, it works.

Note: Maybe we should consider using git-prompt.sh for the git element.

EDIT: implement in f50fd1a