public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Unexpected behavior of ~ when calling bash from a different cygwin installation
@ 2018-06-15 13:34 Soegtrop, Michael
  2018-06-15 14:49 ` Soegtrop, Michael
  0 siblings, 1 reply; 7+ messages in thread
From: Soegtrop, Michael @ 2018-06-15 13:34 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-06-16 20:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-15 13:34 Unexpected behavior of ~ when calling bash from a different cygwin installation Soegtrop, Michael
2018-06-15 14:49 ` Soegtrop, Michael
2018-06-16  5:56   ` Andrey Repin
2018-06-16 11:13     ` Soegtrop, Michael
2018-06-16 13:06   ` Marco Atzeri
2018-06-16 18:27     ` Soegtrop, Michael
2018-06-17  2:14       ` cyg Simple

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).