From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37829 invoked by alias); 14 Feb 2019 22:52:39 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 37813 invoked by uid 89); 14 Feb 2019 22:52:39 -0000 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=prerequisite X-HELO: mout.gmx.com Received: from mout.gmx.com (HELO mout.gmx.com) (74.208.4.201) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 14 Feb 2019 22:52:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.com; s=dbd5af2cbaf7; t=1550184756; bh=hyokd28czcTMsPB7Lz6Kf7CO2Mh+6vw4j0VSDqxirRQ=; h=X-UI-Sender-Class:References:In-Reply-To:From:Date:Subject:To; b=4ttWE4EmIL1R8ueTslmTrAaY7QxNjH6SZLys2nAT8HitC1OAUDnuNqSernCpKS/ZJ 67sRA1r8R3VL+cdsXkUnG6KdoisM2JRpycilhpMNNiqtDG41NHGrB5A/X/M35QYeBv j190qB7O5pxS89LsawX2Sf0zYrOiURW6mph7ih40= X-UI-Sender-Class: 214d933f-fd2f-45c7-a636-f5d79ae31a79 Received: from mail-lj1-f174.google.com ([209.85.208.174]) by mail.gmx.com (mrgmxus001 [74.208.5.15]) with ESMTPSA (Nemesis) id 0M1Eqs-1hE1Bk0Cu8-00tAHk for ; Thu, 14 Feb 2019 23:52:36 +0100 Received: by mail-lj1-f174.google.com with SMTP id s5-v6so6689013ljd.12 for ; Thu, 14 Feb 2019 14:52:35 -0800 (PST) MIME-Version: 1.0 References: <9539a1e8-e893-3175-f96c-fb4ad172702c@redhat.com> <2a87c6c0-6a0f-6994-3620-8b0b722d7d49@redhat.com> <06CBB893-FD9F-460F-B00C-E22950036B5E@solidrocksystems.com> In-Reply-To: <06CBB893-FD9F-460F-B00C-E22950036B5E@solidrocksystems.com> From: Bill Stewart Date: Thu, 14 Feb 2019 23:31:00 -0000 Message-ID: Subject: Re: Get Cygwin home directory path for current user To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-02/txt/msg00162.txt.bz2 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.) For interoperability's sake, it is useful to get this path from the Windows side, and this seems oddly absent. 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.) Ergo: It would be quite useful if cygpath could tell us this path directly. 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?). So I guess I have a feature request: Add a new flag to cygpath that returns the current user's home directory (same as what ~ returns from a Cygwin 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