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:from:content-type:content-transfer-encoding :mime-version:subject:date:references:to:in-reply-to:message-id; q=dns; s=default; b=rJUxFakvOJePGRockGxRHLevdKexnYRngCDXqRXJx36 zzoghUoEUG4GPN8kNf5176Gciu0k8Mldv0Du36ME9XrsjaIAC3EUhWpr5jlHNKiP Wxkb1EOFCP53Icy3mzz09XpGlnlkRTEvjs01whVRYzMXmk0xEvAGNKH0g32+wG0o = 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:from:content-type:content-transfer-encoding :mime-version:subject:date:references:to:in-reply-to:message-id; s=default; bh=a5qjkzJypPLgdPvfJLz8pu9pGxQ=; b=LXlEZ3Tf1uiKD4dqW TGGgovNEoL674ULHPNFvkNNePdcau3k/F2dSrddfO7MG1VkzC11ovO0/YD5+fOLU ETzfSLbU+gk84+mLvPLaaxoqE4OT6a0luJzjuhHfudjQfXD9s+sloYH1ijyWH+OK jlRMP0oIX2LMZcnFEqKvylyKX8= 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,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: outbound-ss-879.bluehost.com From: Vince Rice Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: Get Cygwin home directory path for current user Date: Thu, 14 Feb 2019 17:31:42 -0600 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> To: cygwin AT cygwin DOT com In-Reply-To: Message-Id: X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id x1ENVte4006820 > On Feb 14, 2019, at 4:52 PM, Bill Stewart wrote: > > On Thu, Feb 14, 2019 at 3:14 PM Vince Rice wrote: > >> There is -- use a cygwin shell. As Eric has already explained, expansion is the >> shell's responsibility. Powershell doesn't do it. If you want expansion, use one >> that does. > > So let's consider, for a bit, that not everybody uses a Cygwin shell. > (Hard to believe, perhaps, but PowerShell is really quite good.) I didn't suggest everyone did. But people who want tilde expansion do, because it's the shell that is responsible for tilde expansion. > For interoperability's sake, it is useful to get this path from the > Windows side, and this seems oddly absent. 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. The *shell* does it. > Cygpath already has a set of flags for returning system information > directories, such as -H, which returns the path to the user profile > directory. (As I noted previously, this is not always the same as ~ > when expanded in a Cygwin shell.) Those "system information directories" are *Windows* directories. Completely different thing. > As I noted previously, yes, the below works: > > dash -c '/bin/cygpath -aw ~' > > However, this seems awkward and requires a Cygwin shell (why should > that be a prerequisite?). Because, repeat after me, IT'S THE SHELL THAT DOES THE EXPANSION! -- 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