This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Get Cygwin home directory path for current user
- From: Bill Stewart <bstewart at iname dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 14 Feb 2019 13:22:59 -0700
- Subject: Re: Get Cygwin home directory path for current user
- References: <CANV9t=R83dQddZOVWVUg55t7K=DUyE8BiQ10Pn1v4G+xcgPh3w@mail.gmail.com> <9539a1e8-e893-3175-f96c-fb4ad172702c@redhat.com>
On Thu, Feb 14, 2019 at 12:49 PM Eric Blake wrote:
> Depending on the shell, ~ is expanded to $HOME prior to invoking a
> program. But if you want to take the shell's expansions out of the
> equation, you could use:
>
> cygpath -w "$HOME"
Ah. I'm not using a Cygwin shell (PowerShell actually). So the
expansion happens before cygpath sees it, which is why it works in a
Cygwin shell but not directly from Windows...
So therefore I can write
dash -c '/bin/cygpath -w ~'
To get it, but this seems a bit roundabout and awkward.
Is there any way to do it more directly from a Windows shell?
Thanks!
Bill
--
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