Setting and MSYS Home and abbrviating the directory in the prompt line

0

I run Msys specifically for running OMNETpp - a simulation library. I modified the mingw environment setup scripts in order to get it to start with my home directory, ~/, by setting up HOME.

Example Problem

    ~$
    ~$ cd Documents
    /c/Users/<name>/Documents$ cd ~
    /c/Users/<name>

When I start the console it greets me with ~$

As Soon as I change the directory it then replaces ~ with the full path from root. i.e. /c/Users/<name> at the prompt. Going back to the home directory it no longer abbreviates.

What must I change in bashrc to not do this?

I have this as part of the bash.bashrc but I do not understand what it does, other than that it is relevant!

    PS1='\[\e]0;\w\a\]\n\[\e[32m\]\[\e[33m\]$(__git_ps1 "(%s) ")\w\[\e[0m\]\$ '

EdL

Posted 2019-02-15T16:56:32.477

Reputation: 101

Answers

0

I have fixed this by removing a trailing slash from my $HOME variable

EdL

Posted 2019-02-15T16:56:32.477

Reputation: 101