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

sftp tab completion #1986

Open
aiguy110 opened this issue Apr 14, 2022 · 2 comments
Open

sftp tab completion #1986

aiguy110 opened this issue Apr 14, 2022 · 2 comments

Comments

@aiguy110
Copy link

Can we re-open this feature request from the old Win32-OpenSSH repo? It looks like it was closed back in 2017 with the answer "auto complete functionality is provided by the terminals and not by the sftp"... but I can't bring myself to believe this answer.

First, this functionality does work on Linux (confirmed using WLS Ubuntu 20.04 sftp client). Let's assume from a moment the person who closed this meant "shell" instead of "terminal", since claiming the terminal should handle this is even more absurd. This still doesn't seem like something the shell program, bash in the working case, could possibly be handling, since it presumably doesn't know about things like the current remote directory, that are part of either the sftp client or server's internal state. (Sorry I don't know enough to know which.)

Instead of asking PowerShell to somehow handle this (as the old issue-closer seems to suggest), it seems perfectly reasonable to me to expect the sftp client to intercept tab characters, and instead of echoing them to stdout, do the equivalent of an ls, and either fill in the rest of the characters required to get to the one possible result (if there is only on possible result), or, if there are many, fill in as many characters as all possible results have in common. This is the functionality you get with the Linux client and it would be SUPER convenient if the Windows client had it too.

@maertendMSFT maertendMSFT transferred this issue from PowerShell/openssh-portable Sep 19, 2022
@gang929
Copy link

gang929 commented Nov 17, 2022

About sftp tab completion is invaild, It's maybe that the USE_LIBEDIT is not config in win32 build.

@haoenz
Copy link

haoenz commented Sep 6, 2023

After seeing the reply to that issue (e.g. "auto complete functionality is provided by the terminals and not by the sftp"), I've tried the following combinations (wt means Windows Terminal and moba means MobaXterm) :

Shell and Terminal (if not default) SFTP tab completion
pwsh No
cmd No
git bash No
pwsh in wt No
cmd in wt No
WSL in wt Yes
moba local No
pwsh in moba No
cmd in moba No
WSL in moba No

So…I don't think it depends on terminal…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants