Checklist
What You Are Seeing?
Hitting tab after typing choco only shows filenames
What is Expected?
Choco commands like install, upgrade, etc. should be shown
How Did You Get This To Happen?
- Make sure PowerShell profile contains the following snippet
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}
- Upgrade PowerShell to 7.4.0
- Type
choco and hit tab
System Details
- Operating System: 10.0.19045.0
- Windows PowerShell version:
Name Value
---- -----
PSVersion 7.4.0
PSEdition Core
GitCommitId 7.4.0
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
- Chocolatey CLI Version: 2.2.2
- Chocolatey Licensed Extension version: N/A -
0 packages installed.
- Chocolatey License type: Open Source
- Terminal/Emulator: PowerShell Core 7.4.0 on Microsoft Terminal 1.18.3181.0
Installed Packages
au 2022.10.24
chocolatey 2.2.2
chocolatey-compatibility.extension 1.0.0
chocolatey-core.extension 1.4.0
chocolatey-windowsupdate.extension 1.0.5
dellcommandupdate 5.1.0
delta 0.16.5
DotNet4.6.1 4.6.1055.20170308
Firefox 120.0.0
git.install 2.43.0
gnupg 2.4.3
KB2919355 1.0.20160915
KB2919442 1.0.20160915
KB2999226 1.0.20181019
KB3033929 1.0.5
KB3035131 1.0.3
KB3118401 1.0.5
kdeconnect-kde 23.4.0
keepassxc 2.7.6
libreoffice-still 7.5.8
microsoft-windows-terminal 1.18.3181
miktex.install 23.10.12
neovim 0.9.4
nodejs-lts 20.10.0
notepadplusplus.install 8.6.0
PIME 1.3.0
powershell-core 7.4.0
python39 3.9.13.20230703
ripgrep 13.0.0.20220913
syncthingtray 1.4.9
synergy 1.14.6.19
texstudio.install 4.6.3
vcredist140 14.38.33130
vcredist2015 14.0.24215.20170201
Output Log
(N/A - not sure how to get logs for tab completion)
Additional Context
The cause is that Chocolatey only defines TabExpansion function to enable completions, while that function is no longer used by PowerShell 7.4 [1]. A solution might be adding TabExpansion2 function (supported since PowerShell 3) besides the existing TabExpansion function, so that all users with PowerShell 2 ~ 7.4 can have Chocolatey tab completions.
As a side note, if TabExpansion2 is added, #2255 will likely be solved as well.
[1] PowerShell/PowerShell#18337
Checklist
What You Are Seeing?
Hitting tab after typing
chocoonly shows filenamesWhat is Expected?
Choco commands like
install,upgrade, etc. should be shownHow Did You Get This To Happen?
chocoand hit tabSystem Details
0 packages installed.Installed Packages
Output Log
(N/A - not sure how to get logs for tab completion)Additional Context
The cause is that Chocolatey only defines
TabExpansionfunction to enable completions, while that function is no longer used by PowerShell 7.4 [1]. A solution might be addingTabExpansion2function (supported since PowerShell 3) besides the existingTabExpansionfunction, so that all users with PowerShell 2 ~ 7.4 can have Chocolatey tab completions.As a side note, if
TabExpansion2is added, #2255 will likely be solved as well.[1] PowerShell/PowerShell#18337