X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; q=dns; s=default; b=xDRGC07 MzDK/2H1TKlCu38WptGdx6VfVH39WAusExsdaiEkeNik4LelQU+JvgrG8w37mc4Q Zchn48uyRrDllF2T6MSGKcUT1a8yIBhNkjQmG4D0Y7tzbVzbtc6VrICAualUk+u3 rClUZXC8aNjwhcL/ri7oBdyACFaw38CgrHD0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; s=default; bh=EMALXxYJZLafx xOFYP3XT8G+R34=; b=N23GZZTk1pHCiSnkHmK2CEgi4g3C+ltWxAyGME1AtZaCs /uxTp40nPIXVk25AvY09raizUpOTig6t5wi5HoUidnmnE4W7jvFHvUFRWwQS4Ugl lVHH6Flbbok8nxADLV3NTUiWA4W6S/UGL+R7gqiv4YwMz5I+GRqIRr7zEOFZ3A= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=dash, Hx-languages-length:662 X-HELO: mout.gmx.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.com; s=dbd5af2cbaf7; t=1550175793; bh=Pm5Nhc+EzOE00o8F9wHntl6odtxrABdfJOUp3RwE2XM=; h=X-UI-Sender-Class:References:In-Reply-To:From:Date:Subject:To; b=V2Kodxn1khiSkf5y7hUh07rMh9dqB8P5u2dM4wo8y9U5UGPL+JMtnlkHVnID6vctm SbcOaQ5w1rL8Ed5aUYej9Z408/0kEMWEDKwdq3zu5c9jG1ZIa1NIevWbo8X/3L0cgS zpr5hl2HL1AhooC+FaD1lFQ/B6/+qodVq9eIwGyY= X-UI-Sender-Class: 214d933f-fd2f-45c7-a636-f5d79ae31a79 MIME-Version: 1.0 References: <9539a1e8-e893-3175-f96c-fb4ad172702c AT redhat DOT com> In-Reply-To: <9539a1e8-e893-3175-f96c-fb4ad172702c@redhat.com> From: Bill Stewart Date: Thu, 14 Feb 2019 13:22:59 -0700 Message-ID: Subject: Re: Get Cygwin home directory path for current user To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes 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