Web lists-archives.com

Re: Get Cygwin home directory path for current user




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