mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-18 05:05:36 +00:00
Allow combining of -Skip and -SkipLast parameters in Select-Object cmdlet. (#18849)
* Added SkipLast parameter set to Skip parameter and updated tests * Using Should -BeExactly with string * Update test/powershell/Modules/Microsoft.PowerShell.Utility/Select-Object.Tests.ps1 --------- Co-authored-by: Travis Plunk <travis.plunk@microsoft.com> Co-authored-by: Travis Plunk <github@ez13.net>
This commit is contained in:
2 files changed
+25
-1
No files matched your search
@@ -144,10 +144,11 @@ namespace Microsoft.PowerShell.Commands
|
||||
private bool _firstOrLastSpecified;
|
||||
|
||||
/// <summary>
|
||||
/// Skips the specified number of items from top when used with First, from end when used with Last.
|
||||
/// Skips the specified number of items from top when used with First, from end when used with Last or SkipLast.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[Parameter(ParameterSetName = "DefaultParameter")]
|
||||
[Parameter(ParameterSetName = "SkipLastParameter")]
|
||||
[ValidateRange(0, int.MaxValue)]
|
||||
public int Skip { get; set; }
|
||||
|
||||
|
||||
Reference in new issue
Block a user