`help command` doesn't work in Cygwin #1314

Open
xfix opened this Issue Feb 25, 2014 · 1 comment

Comments

Projects
None yet
5 participants
@xfix
Member

xfix commented Feb 25, 2014

cygstart doesn't accept URLs with # (even when using file: protocol), so trying to use help umask shows messages like the following.

~ $ help umask
Unable to start 'C:\cygwin64\usr\share\doc\fish\commands.html#umask': The specified file was not found.

Fixing this could be tricky, but I think it could be possible.

@ridiculousfish ridiculousfish added this to the fish-future milestone Nov 10, 2014

@faho faho added the windows label Aug 24, 2015

@gordontyler

This comment has been minimized.

Show comment
Hide comment
@gordontyler

gordontyler Feb 2, 2016

Contributor

Windows itself supports "running" a file URL with a fragment. For example, typing "file://C:/cygwin64/usr/share/doc/fish/commands.html#umask" in the Windows Run dialog works just fine, although it appears to ignore the fragment. It even works with backslashes, e.g. "file://C:\cygwin64\usr\share\doc\fish\commands.html#umask".

The underlying problem seems to be that cygstart translates the file URL into a plain Windows path, i.e. "file:///usr/share/doc/fish/commands.html#umask" becomes "C:\cygwin64\usr\share\doc\fish\commands.html#umask" and thus because it is no longer a URL Windows considers the fragment as part of the filename.

Ideally, cygstart would translate the path and then re-add the "file://" prefix, which would at least open the file even if it doesn't navigate to the anchor.

Contributor

gordontyler commented Feb 2, 2016

Windows itself supports "running" a file URL with a fragment. For example, typing "file://C:/cygwin64/usr/share/doc/fish/commands.html#umask" in the Windows Run dialog works just fine, although it appears to ignore the fragment. It even works with backslashes, e.g. "file://C:\cygwin64\usr\share\doc\fish\commands.html#umask".

The underlying problem seems to be that cygstart translates the file URL into a plain Windows path, i.e. "file:///usr/share/doc/fish/commands.html#umask" becomes "C:\cygwin64\usr\share\doc\fish\commands.html#umask" and thus because it is no longer a URL Windows considers the fragment as part of the filename.

Ideally, cygstart would translate the path and then re-add the "file://" prefix, which would at least open the file even if it doesn't navigate to the anchor.

@krader1961 krader1961 changed the title from `help` is broken with options on Windows. to `help command` doesn't work in Cygwin Mar 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment