This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Unexpected behavior of ~ when calling bash from a different cygwin installation

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/

When I dump various paths from 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,

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0,
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]