Skip to content

Tab completion should not replace ~ or variables #5350

Open

Description

@lzybkr

Tab completion should not replace ~ or variables.

E.g.

cd ~\<TAB>
vim $env:APPDATA\<TAB>
& $env:SystemRoot\<TAB>

When editing a script, the replacement might actually make the script less portable, e.g. $env:SystemRoot isn't always on the c: drive.

On the command line, you normally end up with a longer command line, and possibly less meaningful. It can also be less useful when searching your history.

We could have an option that control this behavior, but I suspect it should be the default.

Activity

  1. added this to the milestone on Nov 6, 2017
  2. iSazonov commented on Nov 7, 2017

    @iSazonov
    Collaborator

    Can we have a way (Alt-Shift) to replace ~ or variables still?

  3. lzybkr commented on Nov 7, 2017

    @lzybkr
    ContributorAuthor

    A key binding depends on the host - e.g. PSReadLine or PS Editor Services - not something the core engine needs to provide, except perhaps an api to do the replacement.

    A new api probably isn't worth it, various editors also want to support older versions of PowerShell and this replacement isn't that hard to implement with existing apis.

  4. danbradham commented on Sep 13, 2022

    @danbradham

    This issue seems to have gone stale, thought I'd give it a bump.

    I run into this on a daily basis and I sort of just live with it even though it irritates me and leads to extraneous key presses!

  5. masterflitzer commented on Feb 28, 2023

    @masterflitzer

    yes this is so annoying, especially when working with both bash and pwsh on a regular basis (i notice it every single day)

  6. added
    KeepOpenThe bot will ignore these and not auto-close
    and removed
    WG-NeedsReviewNeeds a review by the labeled Working Group
    on Apr 29, 2024
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

    In-PRIndicates that a PR is out for the issueIssue-Enhancementthe issue is more of a feature request than a bugKeepOpenThe bot will ignore these and not auto-closeWG-Interactive-IntelliSensetab completion

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions