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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=GwyXOUJDy1QQ2dJK c0AMCU3kVUgOpcRcvyrT2f9Y6V4P8z1cH0Ibm/Md0nwJ5A+HitF68igmeRo+vpeK 3KT21R9PShMhbhz7wbU/CHp6yxJv8KJe+qb2K/D/9oD69ckfg+g+yFEwttuFMa2X vOu9UWNIPUN+PugE2hryWzS+tqI= 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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=Ad59jYhpUPYmUCZ9ypkgh7 V3i7s=; b=t28R52X7XzQJ+Ul8UqEhUT89IBCLcorxVtIionXkAPrMJHciEMqxI9 kll09QbO+uQLaAu/uA0LCVYQ5WNFpfXKFnUj2UtoYEfIFWeSGzVw7h4xor+rhQoY FVPQfsmWnUcEMjx0pengb++7j9PD5m4I0FcOHOtjP6lEhIKuXv0xI= 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=-0.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=HX-Priority:Normal, english, H*M:yandex, H*UA:Bat! X-HELO: forward105o.mail.yandex.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1550231402; bh=As1Tyj4/wuWQJ0EOg3pN0mejgIX2HTnSh8BKiSWw8iA=; h=Date:From:Reply-To:Message-ID:To:Subject:In-Reply-To:References; b=ASKpnG/P6QPEgAoTWNwKTq8R2eCxW7ovW0xAJYPXRx8U07e93FRSLqvbDeLx0s+Qn PgwfO2KXz7iDySAxtQpNIgaJCw7IJzKAtpQOYEgXS8Lfdu45sZgwwmN8gRXclUcGRZ BP2dqsUxm6aUSKs54Ji8G5d+/TJ54ubZRGseZYfA= Authentication-Results: mxback20o.mail.yandex.net; dkim=pass header.i=@yandex.ru Date: Fri, 15 Feb 2019 14:40:10 +0300 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <1861294227.20190215144010@yandex.ru> To: Bill Stewart , cygwin AT cygwin DOT com Subject: Re: Get Cygwin home directory path for current user In-Reply-To: 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Greetings, Bill Stewart! >> 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.) Not as good as bash. Just so you know. > For interoperability's sake, it is useful to get this path from the > Windows side, and this seems oddly absent. Setup your system to use %USERPROFILE% as $HOME and forget this problem altogether. For interoperability's sake! (q) > 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.) Cygpath is designed to increse Cygwin's interoperability. Not PS's or what not. > 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?). Try http://make-everything-ok.com/ then. > 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). -- With best regards, Andrey Repin Friday, February 15, 2019 14:29:47 Sorry for my terrible english... -- 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