Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scp under Cygwin on Windows #28452

Open
pguerin3 opened this issue Apr 22, 2024 · 1 comment
Open

scp under Cygwin on Windows #28452

pguerin3 opened this issue Apr 22, 2024 · 1 comment
Labels
bug issues reporting wrong behavior needs:response waiting for reply from the author netrw fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu platform:windows

Comments

@pguerin3
Copy link

Problem

Under Vim 9.0 on Cygwin on Windows, the following command works out of the box:

:e scp://ubuntu@<putPublicIPAddressInHere>/

The output is the directory of the server, and that is the expected behaviour.

Under NeoVim 0.9.5 on Cygwin on Windows, the same command returns an error:

:e scp://ubuntu@<putPublicIPAddressInHere>/

The error received is:

Error detected while processing BufReadCmd Autocommands for "scp://*"..function netrw#Nread[4]..netrw#NetRead[109]..<SNR>22_NetrwBrowse[252]..<SNR>22_PerformListing[141]..<SNR>22_NetrwRemoteListing:
line  137:
E485: Can't read file C:\cygwin64\tmp\nvim.0\CgbXbu\1

However the scp login component seems to work, but the output from the command is blank.

Steps to reproduce

Doing a trace of Neovim (set verbose=9), I can see that under the covers, the following command is being run:

ssh ubuntu@<putPublicIPAddressInHere> ls -FLa >C:\cygwin64\tmp\nvim.0\CgbXbu\1 2>&1

I can test that command outside Neowim, and actually it works, but creates a file in my home directory named: C:cygwin64tmpnvim.01XCdEX2.
So the '/' are stripped out, and the file is not created in the C:\cygwin64\tmp.
Therefore Neovim is unable to read the file C:\cygwin64\tmp\nvim.0\CgbXbu\1, because it is named C:cygwin64tmpnvim.01XCdEX2 instead.

I noticed that there is a netrw config in Neovim named g:netrw_cygwin. ie assume scp under windows is from cygwin.
This netrw config is also present in Vim 9.1.
I have set this to various values (ie 0 amd 1), but doesn't seem to make a difference to scp.

Expected behavior

Scp should return an output to the C:\cygwin64\tmp directory.

Neovim version (nvim -v)

NVIM v0.9.5

Vim (not Nvim) behaves the same?

vim 9.0.2155

Operating system/version

Windows 10

Terminal name/version

Cygwin 2.931

$TERM environment variable

xterm-256color

Installation

From zip file from the github release page.

@pguerin3 pguerin3 added the bug issues reporting wrong behavior label Apr 22, 2024
@justinmk justinmk added the netrw fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu label Apr 22, 2024
@justinmk
Copy link
Member

Thanks for the report. Can you try the development version? The Releases page has pre-built archives for Linux/Windows/macOS.

@justinmk justinmk added the needs:response waiting for reply from the author label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior needs:response waiting for reply from the author netrw fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu platform:windows
Projects
None yet
Development

No branches or pull requests

3 participants