Closed tig closed 2 years ago
Here's my reminder to myself to read the whole thing before I start formulating my response 😬 I went and tested Windows PowerShell's ogv
implementation to find exactly as you did that it means option 2. This is definitely the behavior I would expect and I would advocate for.
As a side note: @tig is Get-PSProfile
a custom function, or is it part of a module that someone might be able to download?
Get-PSProfile
is part of https://github.com/jdhitsolutions/PSScriptTools.
I forgot how I found it, but use it for testing because it gives lots of columns with different lengths and thus stresses ocgv well. I forgot it wasn't a built-in.
I'll do a PR to "fix" ocgv per this Issue...
I believe this should be fixed. Working on PR now.
Fixed in #166
What does Filter do?
1) Filter means Filter DISPLAY - Restrict what you see (current implementation). 2) Filter means Filter INPUT - Restrict the data you are working with.
Example:
Select the two items:
Change the filter to "ISE":
Select the first ISE item:
Hit
ENTER
to Accept.Note three items are returned:
Thus, today, the Filter only impacts what is displayed.
Is this the right behavior?
I could argue it either way, but being explicit is going to be more important as ocgv gains more functionality (e.g. See my Select-All issue #120). I also have dreams of a cmdlet that makes editing data easy via console GUI. It seems to me we'd want the model to be consistent (or at least explicitly inconsistent).
Note,
ogv
works differently. If you select things in-OutputMode Multiple
mode, and then change the filter, those selections are cleared. One could also argue thatocgv
should matchogv
here, which means it should use "Filter Means Filter INPUT" (2).