I've just installed MSYS2, and to have it use my Windows user folder as $HOME, I put this in /etc/bash.bashrc:
HOME=$USERPROFILE
And that works fine when I just run cd, except the prompt doesn't show ~ anymore as the current path when I'm there. Another problem is that
cd ~
takes me to my home dir, but pressing tab after ~ doesn't expand it with the contents of my home directory; intead I get a list of my computer's users prefixed by ~, and trying to access one of those makes it try to cd to /home/(username).
How can I get ~ to play nice with a home directory that doesn't reside in /home?
~/
and then Tab? (It shouldn't expand with the contents of your home directory if you type~
and then Tab; it sounds like it's doing the right thing.)~/ta
and then Tab, where you have a file in your home directory whose name begins withta
?