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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; q=dns; s=default; b=tZ9h IqNCkeDUxAmHHaCySkPTacpbMXXJvstRj+eXAX247iwr/EOynHQcsXLhVPvSS9Pk 4nfmoz6+x0WWq5nfXR9ILlJZ6CqZvR7o5yEXxBc3yET/rhUuEsrXm00Msiy7YoM0 OiGUIv/1yMOMcj+3At+prOFjbg/bqkjIOMdb2Vc= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; s=default; bh=pc2wN0eHAU oEODMGiA7NN+4XzK4=; b=omhD2md8fd6hBUIGl+l8OPE8zW7/TknKdA/PAOjOJH YR677Gzlms4QBw0ioZ7CVvUhfyjeY7bkaMkkWs2AwTPwz2nSoymzyVureriswn5S aH5xCPWzPTidMeHA8t3Tw7LxUjPMAs8kFvrADHNv+uSHLx5HQzna1cYrpdyxwgHa 4= 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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=HOME X-HELO: mx1.redhat.com Subject: Re: Get Cygwin home directory path for current user To: cygwin AT cygwin DOT com References: From: Eric Blake Openpgp: preference=signencrypt Message-ID: <9539a1e8-e893-3175-f96c-fb4ad172702c@redhat.com> Date: Thu, 14 Feb 2019 13:49:09 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Yqc59MJDh6lqEo14nvrQDioe90vXOv3jQ" X-IsSubscribed: yes --Yqc59MJDh6lqEo14nvrQDioe90vXOv3jQ Content-Type: multipart/mixed; boundary="kUjazQWJEDmhdyDR4fp6Poq8KcOv05y18"; protected-headers="v1" From: Eric Blake To: cygwin AT cygwin DOT com Message-ID: <9539a1e8-e893-3175-f96c-fb4ad172702c AT redhat DOT com> Subject: Re: Get Cygwin home directory path for current user References: In-Reply-To: --kUjazQWJEDmhdyDR4fp6Poq8KcOv05y18 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2/14/19 1:40 PM, Bill Stewart wrote: > According to this: >=20 > https://stackoverflow.com/questions/42841907/ >=20 > cygpath -w ~ >=20 > ...formerly produced to stdout the home directory path for the current us= er. >=20 > This seems not be the case any more: When I run cygpath -w ~, I get just = ~. What shell are you using? >=20 > Is this by design? If so, what's the way to programmatically determine > the Windows path of ~? 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" --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org --kUjazQWJEDmhdyDR4fp6Poq8KcOv05y18-- --Yqc59MJDh6lqEo14nvrQDioe90vXOv3jQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAlxlxjUACgkQp6FrSiUn Q2qfEwgAsAJvJS6tFDcsLbyyMmW3Y+Q2mx5Q8w6IWSmAKtqO7TgzxHecFENkNUCe gAiuiEjxUyOqN+BR2Ubs6Tm4vKUgd7hKMO8J02pvpJiDo8ynjGljYmd+sh1/hUpp NPFoQGqGH7rAAzKohX47mbPGpenGJ9WfUBu7N//TRzmXD+Hg5e3ie/vQQZIylnJs UhTUGEwJr0ip0LwwLefewC7EGaXpCCy9nBcWExL+Lg3iwp6eqQQY6BhQzWnYUclI VIWdncX8G5RfPa1vZyz2qqNLI4FC4L7BcCE/mf6n72tldpl0+rcTeyNZhW+s9QAy Zny23Co4QXsMqpInfVeu0rtGB08kIg== =yiLN -----END PGP SIGNATURE----- --Yqc59MJDh6lqEo14nvrQDioe90vXOv3jQ--