How can I include pwd in the git-bash prompt

Viewed 143

I have tried adding the following to .bashrc:

PS1="$(tty) \W>"

But this does not seem to work git-bash.

1 Answers

I changed the upper case /W to lower case /w. In Cygwin the upper case keeps only the last part of the path but it doesn't seem to work in git-bash. I now use the following:

PS1="$(tty) \w>"

After login in my home directory I get:

/dev/pty1 ~>

After cd to another directory I get:

/dev/pty1 /d/AngularProjects/angularapp>

Thanks to all

Related