F7History

F7 History Icon F7History - Graphical Command History for PowerShell.
A PowerShell module providing a graphical Command History activated by the `F7` and `Shift-F7` keys.
Built with Terminal.Gui and Out-ConsoleGridView by Tig.

Demo

Setup

  1. At a PowerShell prompt, use Install-Module to install F7History from the PowerShell Gallery:
Install-Module -Name "F7History"
  1. Import the module using Import-Module; adding this command to your PowerShell $profile will ensure the F7History is always available.
Import-Module -Name "F7History"
  1. Press F7 or Shift-F7 to invoke.

Usage

At the PowerShell command line:

Whatever was typed on the command line before hitting F7 or Shift-F7 will be used for the Out-ConsoleGridView -Filter` parameter.

When the Command Line History window is displayed:

Configuration

To change the key bindings, use the -ArgumentList parameter when importing the module. For example, to use F6 and Shift-F6 instead of F7 and Shift-F7:

Import-Module -Name "F7History" -ArgumentList  @{Key = "F6"; AllKey = "Shift-F6"}

Forcing F7History to use NetDriver

Terminal.Gui, upon which F7History is built, has an abstraction layer for OS and terminal platforms called ConsoleDrivers.CursesDriver is the default for Linux and macOS. On Windows, the default is WindowsDriver. NetDriver is a pure .NET implementation that works on all platforms (but is not as fast or full-featured as the platform-specific drivers).

To force F7History to use NetDriver, set the $F7UseNetDriver variable to $true in your PowerShell session. When $F7UseNetDriver is set to $true, F7History will display NetDriver on the status bar.

Enabling Diagnostics Information

To enable diagnostics information, set the $F7EnableDiagnostics variable to $true in your PowerShell session. This will cause F7History to display version information in the status bar and sets both the -Debug and -Verbose parameters for Out-ConsoleGridView.

Dependencies

F7History is dependent on these modules which will automatically be installed if they are not already present:

More Information