Choco: [chocolatey ] Tab completion does not work.

Created on 1 Jun 2016  ·  6Comments  ·  Source: chocolatey/choco

``` .powershell
PS C:\Users\kp> choco i

Tab completion, as seen in the [animated GIF](https://raw.githubusercontent.com/wiki/chocolatey/choco/images/gifs/choco_install.gif)  (in the Wiki) here:

![here](https://raw.githubusercontent.com/wiki/chocolatey/choco/images/gifs/choco_install.gif) 

does not work for me.

How do I make it work? Or how do I troubleshoot it?

---
## Do I have the latest version of choolatey?

``` .powershell
PS C:\Users\kp> choco upgrade chocolatey -y

Chocolatey v0.9.10-beta1-385-g8127955
Upgrading the following packages:
chocolatey
By upgrading you accept licenses for the packages.
chocolatey v0.9.10-beta-20160531 is newer than the most recent.
 You must be smarter than the average bear...

Chocolatey upgraded 0/1 package(s). 0 package(s) failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Which PoSH version do I run?

``` .powershell
PS C:\Users\kp> $PSVersionTable

Name Value
---- -----
PSVersion 5.0.10586.117
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.10586.117
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

## Am I running from an account with priviledges?

Shouldn't be relevant IMHO. But tab completion doesn't work with normal user priviledges either....

``` .powershell
PS C:\Users\kp> whoami /priv

BERECHTIGUNGSINFORMATIONEN
--------------------------

Berechtigungsname               Beschreibung                                             Status
=============================== ======================================================== ===========
SeIncreaseQuotaPrivilege        Anpassen von Speicherkontingenten für einen Prozess      Deaktiviert
SeSecurityPrivilege             Verwalten von Überwachungs- und Sicherheitsprotokollen   Deaktiviert
SeTakeOwnershipPrivilege        Übernehmen des Besitzes von Dateien und Objekten         Deaktiviert
SeLoadDriverPrivilege           Laden und Entfernen von Gerätetreibern                   Deaktiviert
SeSystemProfilePrivilege        Erstellen eines Profils der Systemleistung               Deaktiviert
SeSystemtimePrivilege           Ändern der Systemzeit                                    Deaktiviert
SeProfileSingleProcessPrivilege Erstellen eines Profils für einen Einzelprozess          Deaktiviert
SeIncreaseBasePriorityPrivilege Anheben der Zeitplanungspriorität                        Deaktiviert
SeCreatePagefilePrivilege       Erstellen einer Auslagerungsdatei                        Deaktiviert
SeBackupPrivilege               Sichern von Dateien und Verzeichnissen                   Deaktiviert
SeRestorePrivilege              Wiederherstellen von Dateien und Verzeichnissen          Deaktiviert
SeShutdownPrivilege             Herunterfahren des Systems                               Deaktiviert
SeDebugPrivilege                Debuggen von Programmen                                  Aktiviert
SeSystemEnvironmentPrivilege    Verändern der Firmwareumgebungsvariablen                 Deaktiviert
SeChangeNotifyPrivilege         Auslassen der durchsuchenden Überprüfung                 Aktiviert
SeRemoteShutdownPrivilege       Erzwingen des Herunterfahrens von einem Remotesystem aus Deaktiviert
SeUndockPrivilege               Entfernen des Computers von der Dockingstation           Deaktiviert
SeManageVolumePrivilege         Durchführen von Volumewartungsaufgaben                   Deaktiviert
SeImpersonatePrivilege          Annehmen der Clientidentität nach Authentifizierung      Aktiviert
SeCreateGlobalPrivilege         Erstellen globaler Objekte                               Aktiviert
SeIncreaseWorkingSetPrivilege   Arbeitssatz eines Prozesses vergrößern                   Deaktiviert
SeTimeZonePrivilege             Ändern der Zeitzone                                      Deaktiviert
SeCreateSymbolicLinkPrivilege   Erstellen symbolischer Verknüpfungen                     Deaktiviert 

Are ExecutionPolicy settings OK?

``` .powershell
PS C:\Users\kp> Get-ExecutionPolicy -list

    Scope ExecutionPolicy
    ----- ---------------

MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Bypass
LocalMachine RemoteSigned
```

Documentation

Most helpful comment

[Resolved] Found a solution

Ok, I found the solution (_or is it a workaround only?_).

After running this command in my current shell:

.powershell Import-Module “$env:ChocolateyInstall\helpers\chocolateyProfile.psm1” -Force

the tab completion feature works.

So you can close this issue (_I would do it myself, but can't seem to figure out how to do it..._).

But _STILL_, it would be nice to know:

  • What are the minimal pre-conditions for the feature to work? (Minimal chocolatey + powershell versions, ExectionPolicy settings, ....)

All 6 comments

[Resolved] Found a solution

Ok, I found the solution (_or is it a workaround only?_).

After running this command in my current shell:

.powershell Import-Module “$env:ChocolateyInstall\helpers\chocolateyProfile.psm1” -Force

the tab completion feature works.

So you can close this issue (_I would do it myself, but can't seem to figure out how to do it..._).

But _STILL_, it would be nice to know:

  • What are the minimal pre-conditions for the feature to work? (Minimal chocolatey + powershell versions, ExectionPolicy settings, ....)

@KurtPfeifle when installing/upgrading Chocolatey - there is a message that is displayed - shown as a warning if the profile doesn't import successfully. Usually there is nothing you need to do to make it work.

I think we need to add a bit of a troubleshooting section to the documentation, would you agree? This is one of those things that would be great to be added there.

Yes, a troubleshooting section in the documentation would really help in a lot of situtions a beginner finds himself in.

I had the same issue out of the box, and this fixed it. Thanks!

Documentation was added for this - https://chocolatey.org/docs/troubleshooting

Was this page helpful?
0 / 5 - 0 ratings