Title: Add -LiteralPath parameter to Start-ThreadJob for cross-platform path handling · Issue #56 · PowerShell/ThreadJob · GitHub
Open Graph Title: Add -LiteralPath parameter to Start-ThreadJob for cross-platform path handling · Issue #56 · PowerShell/ThreadJob
X Title: Add -LiteralPath parameter to Start-ThreadJob for cross-platform path handling · Issue #56 · PowerShell/ThreadJob
Description: Summary of the new feature / enhancement Summary Start-ThreadJob should support -LiteralPath parameter (with -PSPath and -LP aliases) to match Start-Job's functionality and handle cross-platform file paths that may contain wildcard chara...
Open Graph Description: Summary of the new feature / enhancement Summary Start-ThreadJob should support -LiteralPath parameter (with -PSPath and -LP aliases) to match Start-Job's functionality and handle cross-platform fi...
X Description: Summary of the new feature / enhancement Summary Start-ThreadJob should support -LiteralPath parameter (with -PSPath and -LP aliases) to match Start-Job's functionality and handle cross-platfor...
Opengraph URL: https://github.com/PowerShell/ThreadJob/issues/56
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add -LiteralPath parameter to Start-ThreadJob for cross-platform path handling","articleBody":"### Summary of the new feature / enhancement\n\n## Summary\n\n`Start-ThreadJob` should support `-LiteralPath` parameter (with `-PSPath` and `-LP` aliases) to match `Start-Job`'s functionality and handle cross-platform file paths that may contain wildcard characters.\n\n## Problem\n\nPowerShell is now cross-platform, and characters traditionally used as wildcards (`*`, `?`, `[`, `]`) may be present in filenames on non-Windows systems (e.g., Linux, macOS). Currently, `Start-ThreadJob` only has a `-FilePath` parameter, which may cause issues when:\n\n1. A legitimate filename contains wildcard characters on Unix-like systems\n2. Users need to ensure paths are interpreted literally without pattern matching\n3. Users want API consistency between `Start-Job` and `Start-ThreadJob`\n\n## Current Behavior\n\n`Start-ThreadJob` only supports:\n```powershell\nStart-ThreadJob -FilePath \"path/to/script.ps1\"\n```\n\nThe `-FilePath` parameter rejects paths with wildcard characters (see [`GetScriptBlockFromFile` method](https://github.com/PowerShell/ThreadJob/blob/main/src/code/Microsoft.PowerShell.ThreadJob.cs#L1083-L1102)):\n```csharp\nif (WildcardPattern.ContainsWildcardCharacters(filePath))\n{\n throw new ArgumentException(\"FilePath cannot contain wildcards.\");\n}\n```\n\n### Proposed technical implementation details (optional)\n\n## Proposed Solution\n\nAdd a `-LiteralPath` parameter to `Start-ThreadJob` with:\n- Aliases: `-PSPath`, `-LP` (matching `Start-Job`)\n- Behavior: Interprets paths literally without wildcard evaluation\n- Mutual exclusivity: `-FilePath` and `-LiteralPath` should be in different parameter sets\n\nExample usage:\n```powershell\n# For a file literally named \"test[1].ps1\" on Linux\nStart-ThreadJob -LiteralPath \"/home/user/scripts/test[1].ps1\"\n\n# With aliases\nStart-ThreadJob -PSPath \"/home/user/scripts/test[1].ps1\"\nStart-ThreadJob -LP \"/home/user/scripts/test[1].ps1\"\n```","author":{"url":"https://github.com/jshigetomi","@type":"Person","name":"jshigetomi"},"datePublished":"2026-02-17T18:00:43Z","url":"https://github.com/PowerShell/ThreadJob/issues/56"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:79b49c10-72db-cfb2-1d12-2bc34ea2fa8d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C478:1103D1:43E17:5B6D8:6AFCD8C0 |
| html-safe-nonce | 912f2cc996600708cf4f8dbfb17cc3db5292e11521098ad9649a176efb3e1d72 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDc4OjExMDNEMTo0M0UxNzo1QjZEODo2QUZDRDhDMCIsInZpc2l0b3JfaWQiOiIyOTU2OTMyNTE4MDQ2OTE0NzUyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 2cd641f3e2c41ff287d9490069ec269c7b6dcafb7d504707d45c38ec25b511d1 |
| hovercard-subject-tag | issue:3954008515 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/ThreadJob/56/issue_layout |
| twitter:image | https://opengraph.githubassets.com/caed973656f89101eb9ffadf1f6af55b00985e5b13c8d9751f51c8b006ad0964/PowerShell/ThreadJob/issues/56 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/caed973656f89101eb9ffadf1f6af55b00985e5b13c8d9751f51c8b006ad0964/PowerShell/ThreadJob/issues/56 |
| og:image:alt | Summary of the new feature / enhancement Summary Start-ThreadJob should support -LiteralPath parameter (with -PSPath and -LP aliases) to match Start-Job's functionality and handle cross-platform fi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jshigetomi |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5b7bc7e41e0a604bbdb5035c7ed9620c2d28b9c8a18747182e2262a75abfd91 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/ThreadJob git https://github.com/PowerShell/ThreadJob.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 265675369 |
| octolytics-dimension-repository_nwo | PowerShell/ThreadJob |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 265675369 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/ThreadJob |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ff5022cc3aa767e6115451d9c322dd975506d40e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width