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

Have . and .. as completions when completing directories #234351

Closed
Tyriar opened this issue Nov 21, 2024 · 2 comments · Fixed by #234363 or #237836
Closed

Have . and .. as completions when completing directories #234351

Tyriar opened this issue Nov 21, 2024 · 2 comments · Fixed by #234363 or #237836
Assignees
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan terminal-suggest
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Nov 21, 2024

. (and ..) are valid folders that we should provide as a completion for directories.

See pwsh support:

Image

Image

Image

When there's a directory before it, .. is there with a trialing / or \:

Image

@meganrogge meganrogge added feature-request Request for new features or functionality terminal-suggest labels Nov 21, 2024
@vs-code-engineering vs-code-engineering bot added the unreleased Patch has not yet been released in VS Code Insiders label Nov 21, 2024
@vs-code-engineering vs-code-engineering bot added this to the November 2024 milestone Nov 21, 2024
@vs-code-engineering vs-code-engineering bot added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Nov 22, 2024
@meganrogge meganrogge reopened this Dec 2, 2024
@meganrogge
Copy link
Contributor

Reverted this as it caused issues

@vs-code-engineering vs-code-engineering bot removed the insiders-released Patch has been released in VS Code Insiders label Dec 2, 2024
@meganrogge meganrogge modified the milestones: November 2024, January 2025 Dec 2, 2024
@meganrogge
Copy link
Contributor

Notes from the discussion with @Tyriar

  • If it's a file completion, always include / at end ../ (since .. is invalid)

  • If it's a directory completion, omit .. since that's valid

  • Resource resolving should be done in the renderer, since we want to merge all provider requests

  • | - ie. A command/global or file

    • Show . since it's a source alias
    • Show ../ since it wants a file - since this is a file, not a folder we should include the /
  • .|

    • Should include all executable files, maybe needs to be a fig spec thing
  • cd |

    • Show ./ prefix for all folders
    • Show . since it's a valid directory
      • Maybe cd spec can tell us not to include the cwd?
    • Show .. since it's a valid directory
  • cd ../|

    • Show ../<alldirs>
    • Show ../../ since ../.. cannot be chained together
  • cd ../.|

    • The provider should give identical completions to cd ../|
  • cd ../src (exact folder match)

    • The provider should give identical completions to cd ../|

cd | and cd ./| should provide identical completions

eg.

cd ./s, escape to hide, ctrl+space to show, backspace*3 should still show all suggestions since they're valid from replacementIndex

meganrogge added a commit that referenced this issue Jan 13, 2025
@vs-code-engineering vs-code-engineering bot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan terminal-suggest
Projects
None yet
2 participants