Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if ($psd1Content) {
}
"Rewriting $PsdPath with new ModuleVersion: $ModuleVersion"
$updatedpsd1Content = $psd1Content -replace "ModuleVersion\s+=\s+'([\d\.]+)'", "ModuleVersion = '$ModuleVersion'"
$updatedpsd1Content = $updatedpsd1Content.TrimEnd()
$updatedpsd1Content | Out-File -FilePath $PsdPath -Encoding ascii
}
else {
Expand Down
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GraphicalTools - `Out-ConsoleGridView`
# ConsoleGuiTools - `Out-ConsoleGridView` and `Show-ObjectTree`

The GraphicalTools repo contains the `Out-ConsoleGridView`
This repo contains the `Out-ConsoleGridView`
PowerShell Cmdlet providing console-based GUI experiences based on
[Terminal.Gui (gui.cs)](https://github.com/gui-cs/Terminal.Gui).

Expand All @@ -14,11 +14,17 @@ Install-Module Microsoft.PowerShell.ConsoleGuiTools

## Features

Cross-platform! Use the cmdlet
[`Out-ConsoleGridview`](docs/Microsoft.PowerShell.ConsoleGuiTools/Out-ConsoleGridView.md)
to view and filter objects graphically.
* [`Out-ConsoleGridview`](docs/Microsoft.PowerShell.ConsoleGuiTools/Out-ConsoleGridView.md) - Send objects to a grid view window for interactive filtering and sorting.
* [`Show-ObjectTree`](docs/Microsoft.PowerShell.ConsoleGuiTools/Show-ObjectTree.md) - Send objects to a tree view window for interactive filtering and sorting.

![screenshot of Out-ConsoleGridView](docs/Microsoft.PowerShell.ConsoleGuiTools/ocgv.gif)
* Cross-platform - Works on any platform that supports PowerShell 7.2+.
* Interactive - Use the mouse and keyboard to interact with the grid or tree view.
* Filtering - Filter the data using the built-in filter box.
* Sorting - Sort the data by clicking on the column headers.
* Multiple Selection - Select multiple items and send them down the pipeline.
* Customizable - Customize the grid view window with the built-in parameters.

![Demo GIF](docs/Microsoft.PowerShell.ConsoleGuiTools/ocgv.gif)

## Examples

Expand Down Expand Up @@ -124,6 +130,16 @@ Whatever you select within `Out-ConsoleGridView` will be inserted on your comman

Whatever was typed on the command line prior to hitting `F7` or `Shift-F7` will be used as a filter.

### Example 9: Output processes to a tree view

```PowerShell
PS C:\> Get-Process | Show-ObjectTree
```

This command gets the processes running on the local computer and sends them to a tree view window.

Use right arrow when a row has a `+` symbol to expand the tree. Left arrow will collapse the tree.

## Development

### 1. Install PowerShell 7.2+
Expand Down
5 changes: 4 additions & 1 deletion demo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ killp
killp note
# .Silent cls
# Example 4: Navigate PowerShell command history (Map this to F7 with https://github.com/gui-cs/F7History)
Get-History | Sort-Object -Descending -Property Id -Unique | Select-Object CommandLine -ExpandProperty CommandLine | Out-ConsoleGridView -OutputMode Single -Filter $line -Title "Command Line History"
Get-History | Sort-Object -Descending -Property Id -Unique | Select-Object CommandLine -ExpandProperty CommandLine | Out-ConsoleGridView -OutputMode Single -Filter $line -Title "Command Line History"
# .Silent cls
# Example 4: Use Show-ObjectTree to output processes to a tree view
Get-Process | Show-ObjectTree
Binary file modified docs/Microsoft.PowerShell.ConsoleGuiTools/ocgv.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RootModule = 'Microsoft.PowerShell.ConsoleGuiTools.dll'

# Version number of this module.
# NOTE: This will get updated by build.ps1; the build number will be incremented for each build.
ModuleVersion = '0.7.5.35'
ModuleVersion = '0.7.5.38'

# Supported PSEditions
CompatiblePSEditions = @( 'Core' )
Expand Down