ThreadJob icon indicating copy to clipboard operation
ThreadJob copied to clipboard

Add aliases that Start-Job has

Open God-damnit-all opened this issue 2 years ago • 1 comments

PR Summary

Start-Job has a couple aliases that are missing from Start-ThreadJob.

-ScriptBlock receives the -Command alias -ArgumentList receives the -Args alias

Note that, in particular, the -Args alias is present in almost every built-in function that has an -ArgumentList parameter.

PR Context

Consistency.

God-damnit-all avatar Jan 19 '24 17:01 God-damnit-all

As an aside, I notice that Start-Job has both a -FilePath parameter and a -LiteralPath parameter.

Because PowerShell is now cross-platform, characters that are traditionally used as wildcards may be present in a filename on non-Windows systems. It would be good to add -LiteralPath to Start-ThreadJob as well, along with its -PSPath & -LP aliases.

While one could just make it so -FilePath interprets paths literally since wildcard characters aren't supported anyway, Start-Job also rejects paths with wildcards when using -FilePath (but not with -LiteralPath), so that behavior should probably be mirrored.

God-damnit-all avatar Jan 19 '24 17:01 God-damnit-all