Dear Cygwin users, I have several Cygwin installation for different purposes (think of it as light weight VMs). I observe an unexpected behavior of ~ when I call a bash from one Cygwin from a bash of another Cygwin. The procedure is as follows:
* I have a Cygwin in C:\bin\cygwinA * I start a bash via C:\bin\cygwinA\cygwin.bat * From this bash I start DOS batch file which first sets up a new Cygwin under C:\bin\cygwinB with a well-defined set of packages * The same batch file then starts a bash from CygwinB via C:\bin\cygwinB\bin\bash --login /cygdrive/c/bin/cygwinB/somefolder/somescript.sh When I dump various paths from somescript.sh I get: * echo "$(cygpath -a -w /)" => C:\bin\cygwinB * echo "$(cygpath -a -w .)" => C:\bin\cygwinA\home\<user> * echo "$(cygpath -a -w ~)" => C:\bin\cygwinA\home\<user> The first two are expected, but the last one is unexpected. I would have expected C:\bin\cygwinB\home\<user>. I don't understand why / is in cygwinB but ~ in cygwinA. Best regards, Michael Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Christian Lamprechter Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple