Skip to content

Commit b709b2c

Browse files
committed
merge
2 parents e148c73 + 334f1a4 commit b709b2c

File tree

6 files changed

+20
-14
lines changed

6 files changed

+20
-14
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,18 @@ Now you're ready to build the code. You can do so in one of two ways:
4949
PS ./GraphicalTools> Invoke-Build Build -ModuleName Microsoft.PowerShell.ConsoleGuiTools
5050
```
5151

52-
From there you can import the module that you just built for example:
52+
From there you can import the module that you just built for example (start a fresh `pwsh` instance first so you can unload the module with an `exit`; otherwise building again may fail because the `.dll` will be held open):
5353

5454
```powershell
55+
pwsh
5556
Import-Module ./module/Microsoft.PowerShell.ConsoleGuiTools
5657
```
5758

5859
And then run the cmdlet you want to test, for example:
5960

6061
```powershell
6162
Get-Process | Out-ConsoleGridView
63+
exit
6264
```
6365

6466
> NOTE: If you change the code and rebuild the project, you'll need to launch a

src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,11 @@ public HashSet<int> Start(ApplicationData applicationData)
4646
// Copy DataTable into the ListView's DataSource
4747
_itemSource = LoadData();
4848

49-
// Add Filter UI
5049
if (!_applicationData.MinUI)
5150
{
51+
// Add Filter UI
5252
AddFilter(win);
53-
}
54-
55-
// Add Header UI
56-
if (!_applicationData.MinUI)
57-
{
53+
// Add Header UI
5854
AddHeaders(win, gridHeaders);
5955
}
6056

@@ -67,9 +63,6 @@ public HashSet<int> Start(ApplicationData applicationData)
6763
// If -Filter parameter is set, apply it.
6864
ApplyFilter();
6965

70-
_filterField.Text = _applicationData.Filter ?? string.Empty;
71-
_filterField.CursorPosition = _filterField.Text.Length;
72-
7366
_listView.SetFocus();
7467

7568
// Run the GUI.
@@ -85,7 +78,7 @@ public HashSet<int> Start(ApplicationData applicationData)
8578

8679
// Ensure that only items that are marked AND not filtered out
8780
// get returned (See Issue #121)
88-
List<GridViewRow> itemList = GridViewHelpers.FilterData(_itemSource.GridViewRowList, _filterField.Text.ToString());
81+
List<GridViewRow> itemList = GridViewHelpers.FilterData(_itemSource.GridViewRowList, _applicationData.Filter);
8982
foreach (GridViewRow gvr in itemList)
9083
{
9184
if (gvr.IsMarked)
@@ -327,6 +320,9 @@ private void AddFilter(Window win)
327320
};
328321

329322
win.Add(_filterLabel, _filterField, filterErrorLabel);
323+
324+
_filterField.Text = _applicationData.Filter ?? string.Empty;
325+
_filterField.CursorPosition = _filterField.Text.Length;
330326
}
331327

332328
private void AddHeaders(Window win, List<string> gridHeaders)

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

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

1111
# Version number of this module.
12-
ModuleVersion = '0.6.3'
12+
ModuleVersion = '0.7.2'
1313

1414
# Supported PSEditions
1515
CompatiblePSEditions = @( 'Core' )
@@ -105,6 +105,13 @@ PrivateData = @{
105105

106106
# ReleaseNotes of this module
107107
ReleaseNotes = '# Release Notes
108+
## v0.7.0
109+
110+
Upgraded to PowerShell 7.2 and .NET target framework `net60`
111+
112+
Updated Terminal.Gui to 1.7
113+
114+
Fixed #131 - Strip ANSI
108115
109116
## v0.6.3
110117

src/Microsoft.PowerShell.ConsoleGuiTools/TypeGetter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System.Collections.Generic;
1010
using Microsoft.PowerShell.Commands;
1111
using OutGridView.Models;
12+
using System.Text.RegularExpressions;
1213

1314
namespace OutGridView.Cmdlet
1415
{

src/Microsoft.PowerShell.GraphicalTools/Microsoft.PowerShell.GraphicalTools.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="Microsoft.PowerShell.SDK" Version="6.2.1" />
8+
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.6" />
99
</ItemGroup>
1010

1111
<ItemGroup>

src/Microsoft.PowerShell.OutGridView.Models/Microsoft.PowerShell.OutGridView.Models.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
<TargetFramework>net6.0</TargetFramework>
55
</PropertyGroup>
66
<ItemGroup>
7-
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
7+
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
88
</ItemGroup>
99
</Project>

0 commit comments

Comments
 (0)