PowerShell / PowerShell/Win32-OpenSSH

sftp tab completion

Open
#1,986 6 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
8.3k
Forks
819
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the linked old feature request first, then inspect the sftp client's input handling for how Tab is treated. Done means Windows sftp provides remote-path completion matching the Linux behavior described here; no file or test is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.