Skip to content

Commit 9619e5d

Browse files
authored
Fixes #220 - Readme & demo need to show Show-ObjectTree (#221)
* Added more debug flags incluidng -UseSystemConsole * Updated readme and demo * removed unneeded stuff * removed unneeded stuff * More Readme.md tweaks * Removed newlines in .psd1 file * Fixed cause of extra newlines in .psd1 file * Added newline at end of demo.cs' * Arrow key docs
1 parent 5514583 commit 9619e5d

File tree

5 files changed

+28
-8
lines changed

5 files changed

+28
-8
lines changed

Build.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ if ($psd1Content) {
2626
}
2727
"Rewriting $PsdPath with new ModuleVersion: $ModuleVersion"
2828
$updatedpsd1Content = $psd1Content -replace "ModuleVersion\s+=\s+'([\d\.]+)'", "ModuleVersion = '$ModuleVersion'"
29+
$updatedpsd1Content = $updatedpsd1Content.TrimEnd()
2930
$updatedpsd1Content | Out-File -FilePath $PsdPath -Encoding ascii
3031
}
3132
else {

README.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# GraphicalTools - `Out-ConsoleGridView`
1+
# ConsoleGuiTools - `Out-ConsoleGridView` and `Show-ObjectTree`
22

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

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

1515
## Features
1616

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

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

2329
## Examples
2430

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

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

133+
### Example 9: Output processes to a tree view
134+
135+
```PowerShell
136+
PS C:\> Get-Process | Show-ObjectTree
137+
```
138+
139+
This command gets the processes running on the local computer and sends them to a tree view window.
140+
141+
Use right arrow when a row has a `+` symbol to expand the tree. Left arrow will collapse the tree.
142+
127143
## Development
128144

129145
### 1. Install PowerShell 7.2+

demo.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ killp
1414
killp note
1515
# .Silent cls
1616
# Example 4: Navigate PowerShell command history (Map this to F7 with https://github.com/gui-cs/F7History)
17-
Get-History | Sort-Object -Descending -Property Id -Unique | Select-Object CommandLine -ExpandProperty CommandLine | Out-ConsoleGridView -OutputMode Single -Filter $line -Title "Command Line History"
17+
Get-History | Sort-Object -Descending -Property Id -Unique | Select-Object CommandLine -ExpandProperty CommandLine | Out-ConsoleGridView -OutputMode Single -Filter $line -Title "Command Line History"
18+
# .Silent cls
19+
# Example 4: Use Show-ObjectTree to output processes to a tree view
20+
Get-Process | Show-ObjectTree
Loading

src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RootModule = 'Microsoft.PowerShell.ConsoleGuiTools.dll'
1010

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

1515
# Supported PSEditions
1616
CompatiblePSEditions = @( 'Core' )

0 commit comments

Comments
 (0)