You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[`Out-ConsoleGridview`](docs/Microsoft.PowerShell.ConsoleGuiTools/Out-ConsoleGridView.md) - Send objects to a grid view window for interactive filtering and sorting.
18
-
*[`Out-ConsoleTableView`](docs/Microsoft.PowerShell.ConsoleGuiTools/Out-ConsoleTableView.md) - Send objects to a table view with column headers, horizontal scrolling, streaming, and native multi-selection.
17
+
*[`Out-ConsoleGridView`](docs/Microsoft.PowerShell.ConsoleGuiTools/Out-ConsoleGridView.md) - Send objects to an interactive table view with column headers, horizontal scrolling, streaming, sorting, and native multi-selection.
19
18
*[`Show-ObjectTree`](docs/Microsoft.PowerShell.ConsoleGuiTools/Show-ObjectTree.md) - Send objects to a tree view window for interactive filtering and sorting.
20
19
21
20
* Cross-platform - Works on any platform that supports PowerShell 7.2+.
@@ -130,21 +129,21 @@ This command gets the processes running on the local computer and sends them to
130
129
131
130
Use right arrow when a row has a `+` symbol to expand the tree. Left arrow will collapse the tree.
132
131
133
-
### Example 9: Output processes to a table view
132
+
### Example 9: Output processes to a grid view with streaming
134
133
135
134
```PowerShell
136
-
Get-Process | Out-ConsoleTableView
135
+
Get-Process | Out-ConsoleGridView
137
136
```
138
137
139
-
This command gets the processes running on the local computer and sends them to a table view with column headers. The table appears as soon as the first object arrives — rows stream in as the pipeline executes.
138
+
This command gets the processes running on the local computer and sends them to an interactive table with column headers. The table appears as soon as the first object arrives — rows stream in as the pipeline executes.
140
139
141
-
### Example 10: Search for a specific row in the table view
140
+
### Example 10: Search for a specific row in the grid view
This command displays all services in a table view, positions the cursor on the first row matching "wuauserv", and starts with focus in the filter field.
146
+
This command displays all services in a grid view, positions the cursor on the first row matching "wuauserv", and starts with focus in the filter field.
148
147
149
148
## Development
150
149
@@ -220,7 +219,7 @@ to learn more.
220
219
221
220
`ConsoleGuiTools` consists of 2 .NET Projects:
222
221
223
-
* ConsoleGuiTools - Cmdlet implementation for Out-ConsoleGridView, Out-ConsoleTableView, and Show-ObjectTree
222
+
* ConsoleGuiTools - Cmdlet implementation for Out-ConsoleGridView and Show-ObjectTree
224
223
* OutGridView.Models - Contains data contracts between the GUI & Cmdlet
225
224
226
225
_Note:_ Previously, this repo included `Microsoft.PowerShell.GraphicalTools` which included the Avalonia-based `Out-GridView` (implemented in `.\Microsoft.PowerShell.GraphicalTools` and `.\OutGridView.Gui`). These components have been deprecated (see note above).
The **Out-ConsoleGridView** cmdlet sends the output from a command to a grid view window where the output is displayed in an interactive table.
27
+
The **Out-ConsoleGridView** cmdlet sends the output from a command to a grid view window where the output is displayed in an interactive table with column headers, column sizing, horizontal scrolling, and column sorting.
27
28
28
-
Use the Filter box at the top of the window to search the text in the table. Search for text in a particular column, search for literals, and search for multiple words. Use the `-Filter` parameter to pre-populate the Filter box. The filter uses regular expressions.
29
+
Use the Filter box at the top of the window to search the text in the table using regular expressions. Unlike the Filter, the `-Search` parameter positions the cursor on the first matching row without hiding non-matching rows.
29
30
30
-
For instructions for using these features, type `Get-Help Out-ConsoleGridView -Full` and see How to Use the Grid View Window Features in the Notes section.
31
+
Objects are streamed into the table as they arrive from the pipeline — the UI appears immediately and rows are added incrementally. A spinner in the status bar indicates loading is in progress.
31
32
32
-
To send items from the interactive window down the pipeline, click to select the items (either the the mouse in terminals that support mouse or the `SPACE` key) and then press `ENTER`. `ESC`cancels.
33
+
To send items from the interactive window down the pipeline, select rows (use arrow keys and `SPACE` or click with the mouse) and then press `ENTER`. Press `ESC`to cancel without output. Use `Ctrl+A` to select all rows, or `Ctrl+D` to deselect all. Click column headers to sort.
33
34
34
35
## EXAMPLES
35
36
@@ -39,7 +40,7 @@ To send items from the interactive window down the pipeline, click to select the
39
40
Get-Process | Out-ConsoleGridView
40
41
```
41
42
42
-
This command gets the processes running on the local computer and sends them to a grid view window.
43
+
This command gets the processes running on the local computer and sends them to a grid view window with column headers for each property. The table appears as soon as the first object arrives — rows stream in as the pipeline executes.
43
44
44
45
### Example 2: Use a variable to output processes to a grid view
45
46
@@ -54,7 +55,7 @@ The first command uses the Get-Process cmdlet to get the processes on the comput
54
55
55
56
The second command uses a pipeline operator to send the $P variable to **Out-ConsoleGridView**.
56
57
57
-
By specifying `-OutputMode Single` the grid view window will be restricted to a single selection, ensuring now more than a single object is returned.
58
+
By specifying `-OutputMode Single` the grid view window will be restricted to a single selection, ensuring no more than a single object is returned.
58
59
59
60
### Example 3: Display a formatted table in a grid view
60
61
@@ -109,7 +110,7 @@ killp note
109
110
```
110
111
This example shows defining a function named `killp` that shows a grid view of all running processes and allows the user to select one to kill it.
111
112
112
-
The example uses the `-Filter` parameter to filter for all proceses with a name that includes `note` (thus highlighting `Notepad` if it were running. Selecting an item in the grid view and pressing `ENTER` will kill that process.
113
+
The example uses the `-Filter` parameter to filter for all processes with a name that includes `note` (thus highlighting `Notepad` if it were running). Selecting an item in the grid view and pressing `ENTER` will kill that process.
113
114
114
115
### Example 7: Pass multiple items through Out-ConsoleGridView
115
116
@@ -130,14 +131,61 @@ Press `F7` to see the history for the current PowerShell instance
130
131
131
132
Press `Shift-F7` to see the history for all PowerShell instances.
132
133
133
-
Whatever you select within `Out-ConsoleGridView` will be inserted on your command line.
134
+
Whatever you select within `Out-ConsoleGridView` will be inserted on your command line.
134
135
135
136
Whatever was typed on the command line prior to hitting `F7` or `Shift-F7` will be used as a filter.
136
137
138
+
### Example 9: Search for a row without filtering
139
+
140
+
```PowerShell
141
+
Get-Service | ocgv -Search "wuauserv"
142
+
```
143
+
144
+
This command displays all services but positions the cursor on the first row matching "wuauserv". Unlike `-Filter`, all rows remain visible.
145
+
146
+
### Example 10: Start with focus on the filter field
147
+
148
+
```PowerShell
149
+
Get-ChildItem | ocgv -Focus Filter
150
+
```
151
+
152
+
This command opens the grid view with the cursor in the filter text field, ready to type a filter immediately. Pressing `ENTER` while in the filter field accepts the currently selected item(s).
153
+
154
+
### Example 11: Full screen mode with a custom title
Specifies which UI element receives initial focus.
204
+
205
+
- **Table** (default): The table view receives focus. Use arrow keys to navigate immediately.
206
+
- **Filter**: The filter text field receives focus. Start typing to filter. Press `ENTER` to accept the selected item(s).
207
+
208
+
```yaml
209
+
Type: FocusTarget
210
+
Parameter Sets: (All)
211
+
Aliases:
212
+
Accepted values: Table, Filter
213
+
214
+
Required: False
215
+
Position: Named
216
+
Default value: Table
217
+
Accept pipeline input: False
218
+
Accept wildcard characters: False
219
+
```
220
+
154
221
### -InputObject
155
222
Specifies that the cmdlet accepts input for **Out-ConsoleGridView**.
156
223
157
224
When you use the **InputObject** parameter to send a collection of objects to **Out-ConsoleGridView**, **Out-ConsoleGridView** treats the collection as one collection object, and it displays one row that represents the collection.
158
225
159
-
To display the each object in the collection, use a pipeline operator (|) to send objects to **Out-ConsoleGridView**.
226
+
To display each object in the collection, use a pipeline operator (|) to send objects to **Out-ConsoleGridView**.
Specifies the items that the interactive window sends down the pipeline as input to other commands.
175
242
By default, this cmdlet generates zero, one, or many items.
176
243
177
-
To send items from the interactive window down the pipeline, click to select the items (either the the mouse in terminals that support mouse or the `SPACE` key) and then press `ENTER`. `ESC` cancels.
244
+
To send items from the interactive window down the pipeline, select items and press `ENTER`. `ESC` cancels.
178
245
179
246
The values of this parameter determine how many items you can send down the pipeline.
180
247
181
-
- None. No items.
182
-
- Single. Zero items or one item. Use this value when the next command can take only one input object.
183
-
- Multiple. Zero, one, or many items. Use this value when the next command can take multiple input objects. This is the default value.
248
+
- None. No items.
249
+
- Single. Zero items or one item. Use this value when the next command can take only one input object.
250
+
- Multiple. Zero, one, or many items. Use this value when the next command can take multiple input objects. This is the default value.
184
251
185
252
```yaml
186
253
Type: OutputModeOption
@@ -212,8 +279,8 @@ Accept pipeline input: False
212
279
Accept wildcard characters: False
213
280
```
214
281
215
-
### -MinUi
216
-
If specified no title or status bar will be displayed in the **Out-ConsoleGridView** window. The filter will only be displayed if `-Filter` is specified.
282
+
### -MinUI
283
+
If specified, no window frame, filter box, or status bar will be displayed. The table is shown without chrome.
Sets the Terminal.Gui driver to use. Valid values are `ansi`, `windows`, or `unix`. The default is `ansi`.
298
+
Sets the Terminal.Gui driver to use. Valid values are `ansi`, `windows`, or `unix`.
232
299
233
300
```yaml
234
301
Type: String
235
302
Parameter Sets: (All)
236
-
Aliases:
303
+
Aliases: ForceDriver
237
304
238
305
Required: False
239
306
Position: Named
240
-
Default value: ansi
307
+
Default value: None
241
308
Accept pipeline input: False
242
309
Accept wildcard characters: False
243
310
```
244
311
245
312
### -FullScreen
246
-
If specified, the application runs in full-screen mode using the alternate screen buffer. By default, the application renders inline.
313
+
If specified, the application runs in full-screen mode using the alternate screen buffer. By default, the application renders inline in the current terminal.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters(http://go.microsoft.com/fwlink/?LinkID=113216).
328
+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
262
329
263
330
## INPUTS
264
331
265
332
### System.Management.Automation.PSObject
266
333
267
-
You can send any object to this cmdlet.
334
+
You can send any object to this cmdlet. Objects are streamed — the UI appears as soon as the first object arrives.
268
335
269
336
## OUTPUTS
270
337
271
338
### System.Object
272
339
273
-
By default `Out-ConsoleGridView` returns objects representing the selected rows to the pipeline. Use `-OutputMode` to change this behavior.
340
+
By default **Out-ConsoleGridView** returns objects representing the selected rows to the pipeline. Use `-OutputMode` to change this behavior.
274
341
275
342
## NOTES
276
343
277
-
* The command output that you send to **Out-ConsoleGridView** should not be formatted, such as by using the Format-Table or Format-Wide cmdlets. To select properties, use the Select-Object cmdlet.
344
+
* **Out-ConsoleGridView** uses Terminal.Gui's `TableView` control which provides column headers, column sizing, horizontal scrolling, column sorting, and native multi-row selection.
278
345
279
-
* Deserialized output from remote commands might not be formatted correctly in the grid view window.
346
+
* The alias for **Out-ConsoleGridView** is `ocgv`.
280
347
281
-
## RELATED LINKS
348
+
* Objects are streamed into the table as they arrive from the pipeline. The UI appears immediately on the first object and rows are added incrementally. A spinner in the status bar indicates loading is in progress.
282
349
283
-
[Out-File](Out-File.md)
350
+
* The command output that you send to **Out-ConsoleGridView** should not be formatted, such as by using the Format-Table or Format-Wide cmdlets. To select properties, use the Select-Object cmdlet.
351
+
352
+
* Keyboard shortcuts:
353
+
- `ENTER`— Accept selection and close
354
+
- `ESC`— Cancel and close
355
+
- `Ctrl+A`— Select all rows (when OutputMode is Multiple)
356
+
- `Ctrl+D`— Deselect all rows (when OutputMode is Multiple)
0 commit comments