Win32-OpenSSH
Win32-OpenSSH copied to clipboard
libedit for sftp
Summary of the new feature / enhancement
As mentioned multiple times since 2016, sftp binary shipped with Windows is still barely usable, tab completion is not hard to implement, and upstream openssh says clearly in their documentation:
--with-libedit Enable libedit support for sftp.
But in the 2016 issue (#261) where this issue had been first raised, one contributor didn't even know if
sftp autocomplete work in the Unix version of OpenSSH?
And a collaborator said auto-completion is "provided by terminal" and closed the issue! Can you please at least do some research if you have no clue how things work?
auto complete functionality is provided by the terminals (like cygwin) and not by the sftp. sftp protocol doesn't deal with auto complete. please use terminals that support the auto complete (like cygwin).
Not to mention sftp's auto-completion has nothing to do with "terminal", no command line editing ever had anything to do with terminal at all! I'm shocked how he can be a collaborator of this repo with such limited knowledge about openssh and unix in general.
Proposed technical implementation details (optional)
--with-libedit
when building this project
In fairness, it is provided by the shell if it's used prior to sftp.exe actually running. For example, if I open cmd.exe and type sftp.exe and then the next few letters of a file name, it will autocomplete when you hit tab. I know that's the functionality you are looking for, but seems like a misunderstanding rather than having "no clue how things work".
If this depends on libedit.so, I suspect someone would have to separately compile a static/dynamic binary of that library for Windows.
@NoMoreFood Thanks for the reply, but I have to clear a few things.
it is provided by the shell if it's used prior to sftp.exe actually running
That's not what that issue is about, what you are trying to explain is command line auto-completion which of course is provided by the shell since the command line program is invoked by the shell. However, even with that said, the shell is not the same as the "terminal", it's not merely misunderstanding, it shows lack of knowledge of this entire area. I'm shocked because he maintains a unix package with so little understanding of basic shell/terminal knowledge, and closes a legit issue without even doing any research to understand it.
Yes we have to manually compile it with libedit support, but that's not what should happen, the feature provided by libedit is necessary for basic UX.
Duplicate of issue #1986 and #2303.
@jm33-m0 Where exactly did you get your libedit for Windows from when you did "manually compile it"? (Better answer at #2303 or #1986 to avoid spreading the discussion over too many different issues.)