cspotcode / PS-GuiCompletion

Moved to https://github.com/nightroman/PS-GuiCompletion

Home Page:https://github.com/nightroman/PS-GuiCompletion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GuiCompletion for PowerShell

This project has moved to https://github.com/nightroman/PS-GuiCompletion The published module is the same GuiCompletion. It is developed by @nightroman starting from v0.9.0.


This enables a GUI-style tab-completion menu for PowerShell. It integrates with PSReadLine which comes installed in PowerShell by default, and the GUI code is lifted straight from PowerTab.

Bugs? Please open an issue on Github: https://github.com/cspotcode/PS-GuiCompletion/issues

Animated example

Installation

Install from the PowerShell Gallery. (GuiCompletion's Gallery page)

Install-Module -Name GuiCompletion -Scope CurrentUser

You can omit -Scope but I use it to avoid requiring Administrator permissions.

Usage

Register it with the default Ctrl+Spacebar key shortcut:

Install-GuiCompletion

...or with another key shortcut:

Install-GuiCompletion -Key Tab

Install-GuiCompletion is a one-line helper that wrap PSReadLine's Set-PSReadLineKeyHandler cmdlet. For more advanced scenarios, you can call the relevant PSReadLine commands directly:

Set-PSReadlineKeyHandler -Key Alt+Spacebar -ScriptBlock { Invoke-GuiCompletion }

You'll want to add these configuration commands to your PowerShell profile. Otherwise your configuration will not be applied to new PowerShell sessions.

TODOs

Mac and Linux support. GetKeyState and some of the rendering code is apparently Windows-only.

Changelog

v0.8.1

  • Fixes broken publication of v0.8.0

v0.8.0

  • Switches to Windows' default menu color scheme (#5, @nightroman)
    • If you want to use the old theme or customize colors, modify the $GuiCompletionConfig.Colors global variable.
  • Fixes rendering glitch where some vertical lines could be left over after the menu closes (#6, @nightroman)
  • Switches to TabExpansion2 for computing completions, which allows other modules to plugin custom completions (#7, @nightroman)

About

Moved to https://github.com/nightroman/PS-GuiCompletion

https://github.com/nightroman/PS-GuiCompletion


Languages

Language:PowerShell 99.9%Language:Batchfile 0.1%