Skip to content

Menu Enhance

  • Setting: psc menu config enable_menu_enhance 1 (Default: 1)
  • Now, PSCompletions has two completion implementations.
    • Set-PSReadLineKeyHandler
      • It's used by default.
        • Requires: enable_menu and enable_menu_enhance both set to 1.
        • It uses Set-PSReadLineKeyHandler -Key <Key> -ScriptBlock { ... }.
          • <Key> is the value of psc menu config trigger_key (default: Tab)
        • So, you cannot use Set-PSReadLineKeyHandler -Key Tab -ScriptBlock { ... }.
      • It use TabExpansion2 to manage completions globally, not limited to those added by psc add.
        • Path completion such as cd/.\/..\/~\/...
        • Build-in commands such as Get-*/Set-*/New-*/...
        • Completion registered by Register-ArgumentCompleter
        • Completion registered by cli or module.
        • ...
    • Register-ArgumentCompleter
      • You can use it by running psc menu config enable_menu_enhance 0.
      • It only works for completions added by psc add.