Closed nielsonsantana closed 8 years ago
The problem is your PS1
line is wrapped in single quotes, which means all the $
variables are note interpolated.
Change it to:
export PS1="$(basename "$PWD")\[\033[00m\]: \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$:"
The double quotes around $PWD
can be left alone like that cause it's enclosed in $(...)
, I'm assuming that's why you've got single quotes instead of double quotes. It's weird, confusing, but works... lol
I put a single quote because on my PSI command , there a double quote "$PWD".
When I execute $PROMP_COMMAND
, I get this error:
find_git_branch;: command not found
However, when I try: echo $git_branch
I get:
(master)
Thanks @jimeh. Worked with double quote.
export PS1="$(basename $PWD)\[\033[00m\]~\[$txtcyn\]\${git_branch}\[$txtred\]\$git_dirty\[$txtrst\]\$: "
No worries. Happy to help :)
I put this settings on my .bashrc
I guess that the problem was main.sh, colors.sh, prompt.sh don't have permission, then I executed:
Even, after it, don't work. Result in my bash:
git-aware-prompt: $git_branch$git_dirty$: