As part of installing EGit, I had to set a HOME environment variable in Windows. This caused a problem whereby cygwin considers the HOME environment variable in Windows more important than the value in /etc/passwd. As a result, cygwin thinks my HOME directory in cygwin has moved from its previous location to my Windows user profile folder. I'd rather keep my cygwin files separate as my user profile folder is cluttered enough already but it doesn't seem to be possible to do so.
Is there any way to have cygwin use the value from /etc/passwd instead of the HOME enviroment variable?
HOME=$(awk -F: "/^$USER:/ { print \$6 }" /etc/passwd)orHOME=$(eval echo "~$USER")– Keith Thompson Jun 04 '13 at 22:01catis unnecessary; you can changecat /etc/passwd | fgrep "$USER"tofgrep "$USER" /etc/passwd. Also, your command can misbehave if your user name happens to appear elsewhere in/etc/passwd, perhaps as part of another user name or of some other field. – Keith Thompson Jun 04 '13 at 22:03HOME=$(eval echo "~$USER")method. That's really cool, thanks. – Lily Finley Jun 04 '13 at 23:32