For generic PowerShell questions you can use the community slack http://slack.poshcode.org/
github-actions[bot] on dotnet_update
Update .NET SDK version from `7… (compare)
--playlist-start
and --playlist-end
.
@Aprazeth: They do have a --playlist-items
. It's described as shown below:
Playlist video items to download. Specify indices of the videos in the playlist separated by commas like:
--playlist-items 1,2,5,8
if you want to download videos indexed 1, 2, 5, 8 in the playlist. You can specify range:--playlist-items 1-3,7,10-13
, it will download the videos at index 1, 2, 3, 7, 10, 11, 12 and 13.
$PSBoundParameters
? Do I put ?
on the parameter type? In this case, the optional parameter is an enum.
-axi
is equivalent to -a -x -i
. That would be an obstacle.
-x
into /x
for older DOS programs.
ParameterAttribute
.
System.URI
or a string
. For a folder, I like to take either a System.IO.Directory
or a string
.
System.Guid
, I don't want them passing 4
. Plus, this way, I'm not converting objects to/and from string
as much.
HandlerType
and Handler
members of a OutputHandler
member. What do those values mean? A few random blog posts don't count. It would appear that HandlerType
can only have one of several values. So list them and describe each. Then describe how that affects how Handler
is interpreted.
hidden [int]GetIndentLevel()
{
$this.CurLine -match '^(?<Indent>\s*';
return $Matches.Indent -split '( |\t)';
}
ref
keyword so I can have a function I call make changes to a variable in my scope.
[ref]
, but that's a type by itself and ruins my type safety. I'd rather declare the parameter as ref [int] name
and pass the variable with ref valueVar
like I would with C#.
[ref]
also seems to suggest it's mainly for COM.
C:\Users\willp> function Test([string]$x){$x = '%'}
C:\Users\willp> $g = 'dgfd'
C:\Users\willp> Test($g)
C:\Users\willp> $g
dgfd
C:\Users\willp> function Test([ref]$x){$x = '%'}
C:\Users\willp> Test($g)
Test: Cannot process argument transformation on parameter 'x'. Reference type is expected in argument.
[ref]
wrong, but I'm still missing something.C:\Users\willp> Test(([ref]$g))
C:\Users\willp> $g
dgfd
C:\Users\willp> function Test([string]$x){$x = '%'}
C:\Users\willp> Test(([ref]$g))
C:\Users\willp> $g
dgfd