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=bZI1 iLSXhTHT3e8nmxzhO7pR0Hk5041N4B/2Vr8w2qEZkTEon4Dox1ivHnZ46ov3VNxf C8NHK0KLjcDAlutRAW7sOUcds+2nn6NNpLHKy35DFn11OPuv/ZpgCrDaQanRO93A 0caA66fulj9i1ac87f0Nw9px9HcHJCxUyJQUiS4= 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=82u4sTOtxM wetVPSP1bhgsoyHps=; b=di8r2386MQc8YEw37+h+fg6C64JhrzOXMwOlIHnfld MUWrCtbqVhTWLMonk99D82/MFSTBml/q5ppaueY3q8tJs257g3jB1+HyVQIy7X6d 3WR9KqCDSTPlG/hfSH4DysLBmMDvkD58GAuSlTu6/uw28ki2URpx1QOzksu10Ran s= 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.6 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=H*RU:sk:broadba, Hx-spam-relays-external:sk:broadba, H*UA:x64, H*UA:Win64 X-HELO: mail-lf1-f53.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:autocrypt:message-id:date:user-agent :mime-version:in-reply-to; bh=vaqYp67nGG6AHxsc8+mFaTBUGZYDWuOwg26C6zXpi8Q=; b=T/VCrXVLsSwnptC6FFcqQS4qUzHtj3MMVO6HbkMczKkiS/qlrhxVACR+Hxk86CoLH3 AzLzrEUseClZGRAl7WXoGVy0F6vt/EJez0WxqKc8jex3Ivi1IdgZjglaq+HqeEUNgqyR lo7YTn9LuRWpAIyVGy+ApAgZNHy/WX8yX5gCXTISGCTtV3jdmNlXRiPd/zMY0PBJuEHF OG24rPofjS+3v+2aEyX2L/pAEnjzfPwe4dw0y1tK4PO+PzGpvpFp8Y7yiC3YBNUvXq5w OT2qZTwG+scjuchm3USc79C+r+HWGKSrUtguIdtCauVDuQnGmHN0lqu675XCV1Waq9Su PL+A== Subject: Re: Get Cygwin home directory path for current user To: cygwin AT cygwin DOT com References: <9539a1e8-e893-3175-f96c-fb4ad172702c AT redhat DOT com> <2a87c6c0-6a0f-6994-3620-8b0b722d7d49 AT redhat DOT com> <06CBB893-FD9F-460F-B00C-E22950036B5E AT solidrocksystems DOT com> From: LRN Message-ID: Date: Fri, 15 Feb 2019 04:25:25 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xWOQO7vMf0Y0iJ8bZLQYzDmBrZpCfqIUM" X-IsSubscribed: yes --xWOQO7vMf0Y0iJ8bZLQYzDmBrZpCfqIUM Content-Type: multipart/mixed; boundary="hbbEhciIWZUJ9IPtI1o5Uir0O8vc0IdqJ"; protected-headers="v1" From: LRN To: cygwin AT cygwin DOT com Message-ID: Subject: Re: Get Cygwin home directory path for current user --hbbEhciIWZUJ9IPtI1o5Uir0O8vc0IdqJ Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 15.02.2019 2:41, Bill Stewart wrote: > On Thu, Feb 14, 2019 at 4:32 PM Vince Rice wrote: >=20 >> I didn't suggest everyone did. But people who want tilde expansion do, b= ecause it's >> the shell that is responsible for tilde expansion. >> ... >> No, it isn't "oddly" absent. As has been said repeatedly in this thread,= tilde expansion >> is the responsibility of the shell. Cygwin has nothing to do with it. Th= e *shell* does >> it. >> ... >> Because, repeat after me, IT'S THE SHELL THAT DOES THE EXPANSION! >=20 > (?) I understand that the shell does ~ expansion. I am asking for a > way to get that particular path (forget about the ~ character for the > time being) without needing to invoke a Cygwin shell in the first > place. (That was the whole point of the request.) This is not *exactly* without invoking Cygwin shell, but i don't see how the difference matters: c:/cygwin/bin/bash.exe --login -c "cygpath -w ~" or c:/cygwin/bin/bash.exe -c "/bin/cygpath -w ~" either would work. If you don't want to hardcode c:/cygwin, use registry functions to grab the contents of Computer\HKEY_CURRENT_USER\Software\Cygwin\Installations someho= w. I don't know PowerShell, but with reg.exe that would be: reg query HKEY_CURRENT_USER\Software\Cygwin\Installations and then you'd have to filter out one of the installations out of that. --hbbEhciIWZUJ9IPtI1o5Uir0O8vc0IdqJ-- --xWOQO7vMf0Y0iJ8bZLQYzDmBrZpCfqIUM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE4MWzR43wYaAzEA49ja3pJ2dZunQFAlxmFQYACgkQja3pJ2dZ unRythAAmftqeq21IEMefTDAgbR58iRcuwq6XkvVk8jOyOlC4h/Rxvx3sK1AZom5 YUd5hKPB7HpcHYXOtx4RhZICM5d/bM5Etk381v3NrWTgoSVEu9Vt+GGnhoSibdcs tbywYfPfbJ8pNnxZk6o45om6Obi1biFwUd5w6gTKhGaiAvtJRvPNeovcvIBZckAo KzfAFYDWeNaF+HhKhRyUDe5qVnjekEEB14AEgxYxs/O8ycr3EB1ze8cCv23lrBeV R5ZLkMAiOxowXBBjkbpuh7U1AHbGhBgnt+Z2BRczikkFp5RCW0yA0ODsXho2DpRT VpUjDG+sP/daBAPLbYG1PNWIF1JLxhfaTmEEC9+gwfgj8nIXcPCX1p3eLqhuicyG 7Ee9S/AXJA91p7M6R49ZGV+GnsG4Dox0Huh+RswECCakk024yoMIMn/59KjNwrd3 OoLoBt0OG+mQjMoMz0BVZFfF6bSUCqZBzIfyHR1GscpMUi5MeE7qL9/SpV15h6p7 cQkYTWjSfMZxOdigB7ydtE+zACVb6CnN8awum86ac5G+jIE9VyZuvSydL9D03u59 6ZrLgIJIVAYgCaO8H108FiGRaJMsmKM68fBey7NjgKCEi4vzT65BQZ0tDPDy77s0 9aSAfZM70zuz91veKLBc8R2nisKjk4P6lN2ORsBNQMICa4x9yWg= =zDSI -----END PGP SIGNATURE----- --xWOQO7vMf0Y0iJ8bZLQYzDmBrZpCfqIUM--