On 8 Nov 2024, at 16:20, Soren via Cygwin <cygwin@cygwin.com> wrote:
> 
> 
> Hello users. I have a reasonably recently installed Cygwin that I've kept
> updated with setup. I am just now seeing that the provided `cygpath`
> command no longer works the way it ought to. Could someone(s) confirm or
> deny this?  And fix it, because it is an important facility.
> 
> $ cygpath -ua --short-name '/cygdrive/c/Users/somia/Local Settings'
> [dumps you into "help"]
> $ cygpath --version
> cygpath (cygwin) 3.5.4
> 
> Appreciation in advance for your interest and help.

>From the usage message, I think it is intentional:

  -s, --short-name      print DOS (short) form of NAMEs (with -w, -m only)

So you cannot use -u together with -s/--short-name.

As a workaround, you could try:

  cygpath -u $(cygpath -ma --short-name '/cygdrive/c/Users/somia/Local 
Settings')

which would first convert to mixed style ("C:/Users/somia/LOCALS~1"), then back 
to unix style ("/cygdrive/c/Users/somia/LOCALS~1"). I suppose that is what you 
want?

-Dimitry


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to