PowerShell / ThreadJob

MIT License
24 stars 11 forks source link

Add aliases that Start-Job has #33

Open God-damnit-all opened 8 months ago

God-damnit-all commented 8 months ago

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 commented 8 months ago

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.