Skip to content

Choco tab completion does not work if .exe is present #2255

@Luk164

Description

@Luk164

What You Are Seeing?

When using choco in PWSH, I almost always use tab completion. For choco, this ends in choco.exe, but I noticed that tab completion for commands (i.e. choco install) does not work with the choco.exe.

What is Expected?

Tab completion should work with both choco and choco.exe commands

How Did You Get This To Happen? (Steps to Reproduce)

  1. Type choco ins
  2. Press TAB
  3. works fine
  4. type choco.exe ins
  5. Press TAB
  6. Does not work

This is what my profile file looks like:

Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
# Chocolatey profile
#$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
#if (Test-Path($ChocolateyProfile)) {
#  Import-Module "$ChocolateyProfile"
#}
Import-Module DockerCompletion
Import-Module “$env:ChocolateyInstall\helpers\chocolateyProfile.psm1” -Force
Set-Alias -Name npm -Value pnpm

P.S.: Deactivated chocolatey profile because it was causing trouble for me. If this is problematic for some reason feel free to point it out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0 - Waiting on UserInsufficient information for issue or PR, issue may be closed if no response from user.No Response / StaleUsed on issues when additional information is requested, and no response has been given.Pending ClosureThis issue has been marked as having no response or is stale and will soon be closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions