Skip to content

Commit

Permalink
tip: Add example to tip
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlydog committed Oct 20, 2023
1 parent 9b349dc commit 470cfb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ The Out-GridView cmdlet is very useful, but it only works on Windows. The Micros
You can use Out-ConsoleGridView to display a table of data that the user is able to interactively navigate. The user can select rows from the list that can be saved to a variable or piped to another command, allowing you to perform actions on the selected rows.
'@
$tip.Example = @'
Example code to demonstrate the tip. This can also be multiple lines if needed.
Install-Module Microsoft.PowerShell.ConsoleGuiTools
Get-Process | Out-ConsoleGridView -Title "Select processes to return" | Select-Object -Property ProcessName,Id
'@
$tip.Urls = @(
'https://www.powershellgallery.com/packages/Microsoft.PowerShell.ConsoleGuiTools/'
'https://github.com/PowerShell/GraphicalTools/'
)
$tip.Category = [tiPS.TipCategory]::Module # Community, Editor, Module, NativeCmdlet, Performance, Security, Syntax, Terminal, or Other.
Expand Down
3 changes: 1 addition & 2 deletions src/tiPS/PowerShellTips.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,8 @@
"CreatedDate": "2023-10-20T00:00:00",
"Title": "Use Out-ConsoleGridView for a cross-platform grid view",
"TipText": "The Out-GridView cmdlet is very useful, but it only works on Windows. The Microsoft.PowerShell.ConsoleGuiTools module provides a cross-platform alternative called Out-ConsoleGridView. Rather than opening a new window, it displays the grid view in the current terminal window.\r\n\r\nYou can use Out-ConsoleGridView to display a table of data that the user is able to interactively navigate. The user can select rows from the list that can be saved to a variable or piped to another command, allowing you to perform actions on the selected rows.",
"Example": "Example code to demonstrate the tip. This can also be multiple lines if needed.",
"Example": "Install-Module Microsoft.PowerShell.ConsoleGuiTools\r\n\r\nGet-Process | Out-ConsoleGridView -Title \"Select processes to return\" | Select-Object -Property ProcessName,Id",
"Urls": [
"https://www.powershellgallery.com/packages/Microsoft.PowerShell.ConsoleGuiTools/",
"https://github.com/PowerShell/GraphicalTools/"
],
"Category": 2
Expand Down

0 comments on commit 470cfb5

Please sign in to comment.