Skip to content

Network share path expansion should support forward slashes #17111

Closed

Description

Summary of the new feature / enhancement

As a user using the French keyboard layout, entering a forward slash (Shift+:) is way more convenient than entering a backslash (AltGr+8). So using forward slashes throughout PowerShell has become muscle memory...

This works in most cases.

Alas, tab expansion for inputs like

\\hostname\x<TAB>

works, but this doesn't:

//hostname/x<TAB>

Proposed technical implementation details (optional)

No response

Activity

  1. added
    Issue-Enhancement
    Needs-Triage
    on Apr 5, 2022
  2. MartinGC94 commented on Apr 5, 2022

    @MartinGC94
    Contributor

    This is handled here: https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs#L4304 at a glance, it looks like a relatively simple thing to fix.

    GitHub
    PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.
  3. sba923 commented on Apr 5, 2022

    @sba923
    ContributorAuthor

    Had almost found it 😆, now I need to remember how to build the repo and will give it a shot!

  4. sba923 commented on Apr 5, 2022

    @sba923
    ContributorAuthor

    Tomorrow is another day 😜

    image

  5. SeeminglyScience commented on Apr 5, 2022

    @SeeminglyScience
    Contributor

    Stéphane BARIZIEN (@sba923) You just wanna add -ResGen

  6. sba923 commented on Apr 5, 2022

    @sba923
    ContributorAuthor

    Stéphane BARIZIEN (@sba923) You just wanna add -ResGen

    Thx.

    Build still emits this error... after producing pwsh.exe:

    image

    With this change, the expected result seems to be achieved (though the completion turns the forward slashes into backslashes, but that's OK):

    image

    Is that good enough or would you consider optimizing the regex?

  7. sba923 commented on Apr 6, 2022

    @sba923
    ContributorAuthor

    Is adding this comment OK? What's the preferred way of referring to issues? Absolute GH URL or #nnnnn?

    // support both / and \ when entering UNC paths for typing convenience (#17111)
  8. SeeminglyScience commented on Apr 6, 2022

    @SeeminglyScience
    Contributor

    Build still emits this error... after producing pwsh.exe:

    Yeah I dunno what's up with that but I get it too so 🤷

    Is that good enough or would you consider optimizing the regex?

    That can be settled in the review. I would recommend making it a literal (@"pattern here") instead though so it's somewhat feasible to read 😁 (I know it was like that before, but while we're there might as well).

    Is adding this comment OK? What's the preferred way of referring to issues? Absolute GH URL or #nnnnn?

    I think that's good, but also can be settled in the review if needed.

  9. sba923 commented on Apr 6, 2022

    @sba923
    ContributorAuthor

    OK. This works fine, so I'll proceed with creating the PR:

    image

  10. sba923 commented on Apr 6, 2022

    @sba923
    ContributorAuthor

    PR #17117 created. Was not completely sure about the "impacts completers" section of the checklist, though.

  11. ghost added
    In-PR
    on Apr 12, 2022
  12. ghost removed
    Needs-Triage
    on Apr 12, 2022
  13. ghost removed
    In-PR
    on Apr 12, 2022
  14. ghost added
    Resolution-Fixed
    on Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-EnhancementResolution-Fixed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions