FAQ
Questions
Built-in completion menu bug in Windows PowerShell 5.1
Tip
PSCompletions
uses the completion menu provided by the module itself by default, which is not affected by this bug.- Unless you switch to PowerShell's built-in completion menu by running
psc menu config enable_menu 0
.
In Windows PowerShell 5.1, due to a bug, the built-in completion menu is not triggered when using
-
or--
.Solutions:
- Use the completion menu provided by
PSCompletions
instead of PowerShell's built-in completion menu. - Switch to PowerShell (pwsh), as this bug was fixed in PowerShell 6.0.
- Alternatively, add a character after
-
or--
, such as-a
or--a
, and then pressTab
to trigger autocompletion.
- Use the completion menu provided by
About the output encoding
If your system and work environment is English, you can ignore this encoding issue.
WARNING
This is actually a rendering issue in Windows Terminal, and other terminals like vscode terminal, Tabby, Hyper, wave works fine.
- If you use
[console]::OutputEncoding
to modify the output encoding ofPowerShell
, it may cause menu rendering problems. - If you must use it, please ensure that
[console]::OutputEncoding
is added afterImport-Module PSCompletions
. - It is also possible that there are other
PowerShell
modules that have modified the coding internally, which can also cause rendering problems. - If you run into rendering problems, you should first try putting
Import-Module PSCompletions
in front of it. - If you still have problems, you should empty your
$Profile
configuration file and try only importPSCompletions
by runningImport-Module PSCompletions
.
Note
If for some special reasons you must enable the Beta
option in Regional Settings
in the Control Panel, you can consider the following solutions.
- If you don’t need command tips.
- Just run the command
psc menu config enable_tip 0
- Just run the command
- If you need command tips.
- Use the command
psc config language en-US
to change the language configuration to English, because there's no rendering problem with English characters, and the English command tips can be rendered normally. - Use other terminal shells.
- Use the command
- Don't check the
Beta
option inRegional Settings
in theControl Panel
, as shown below. - Checking it will also cause menu rendering problems.