Skip to content

Tab-completion for environmental variable on Linux returns non-existent env. variable #3572

Closed

Description

Pressing TAB after $env:P returns env:PATHEXT that doesn't exist on PowerShell Core on Linux on my machine.

Steps to reproduce

PS /home/aleksandar> $env:P

Expected behavior

PS /home/aleksandar> $env:P<tab>
PATH          PSModulePath  PWD

Actual behavior

PS /home/aleksandar> $env:P<tab>
PATH          PSModulePath  PWD           env:PATHEXT

Environment data

PS /home/aleksandar> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.0.0-alpha
PSEdition                      Core
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   3.0.0.0
GitCommitId                    v6.0.0-alpha.18
CLRVersion
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Activity

  1. iSazonov commented on Apr 16, 2017

    @iSazonov
    Collaborator

    I believe we use $env:pathext to find native commands.
    Perhaps we would enhance that on Unix.

    /cc Mike Richmond (@mirichmo) Andy Jordan (@andschwa) Could you please comment?

  2. added
    WG-Engine
    Issue-Discussion
    on Apr 16, 2017
  3. lzybkr commented on Apr 22, 2017

    @lzybkr
    Contributor

    PATHEXT is used to find native commands, but shouldn't be necessary on non-Windows systems.

    I believe it's added to a cache of all special variables here.

    So I think the right fix is probably to add #if !UNIX around the "special" variables that are not used on Unix.

  4. iSazonov commented on Oct 31, 2018

    @iSazonov
    Collaborator

    It was removed in #7697 but we continue discussing in #7755

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-DiscussionResolution-FixedWG-Engine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions