Add -LiteralPath parameter to Start-ThreadJob for cross-platform path handling
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 56/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- powershell
- 領域
- cli
調査の方向性
Start with src/code/Microsoft.PowerShell.ThreadJob.cs, especially the GetScriptBlockFromFile method linked in the issue, and trace how -FilePath parameter sets are declared. Compare the parameter sets and aliases with Start-Job, then inspect or run the existing Start-ThreadJob tests for file paths. Done means -LiteralPath, -PSPath, and -LP accept wildcard characters literally and cannot be combined with -FilePath.
索引モデルが issue の本文から書いたものです。
説明
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 characters.
Problem
PowerShell 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:
- A legitimate filename contains wildcard characters on Unix-like systems
- Users need to ensure paths are interpreted literally without pattern matching
- Users want API consistency between
Start-JobandStart-ThreadJob
Current Behavior
Start-ThreadJob only supports:
Start-ThreadJob -FilePath "path/to/script.ps1"
The -FilePath parameter rejects paths with wildcard characters (see GetScriptBlockFromFile method):
if (WildcardPattern.ContainsWildcardCharacters(filePath))
{
throw new ArgumentException("FilePath cannot contain wildcards.");
}
Proposed technical implementation details (optional)
Proposed Solution
Add a -LiteralPath parameter to Start-ThreadJob with:
- Aliases:
-PSPath,-LP(matchingStart-Job) - Behavior: Interprets paths literally without wildcard evaluation
- Mutual exclusivity:
-FilePathand-LiteralPathshould be in different parameter sets
Example usage:
# For a file literally named "test[1].ps1" on Linux
Start-ThreadJob -LiteralPath "/home/user/scripts/test[1].ps1"
# With aliases
Start-ThreadJob -PSPath "/home/user/scripts/test[1].ps1"
Start-ThreadJob -LP "/home/user/scripts/test[1].ps1"
- 主要言語
- PowerShell
- スター
- 37
- フォーク
- 22
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PowerShell/ThreadJob のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
PowerShell/ThreadJob#59 · リアクション 1 件 ·
-
Set alias for ThreadJob command(s)対応中かも @kilasuit が 80 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 20/100
PowerShell/ThreadJob#45 · コメント 1 件 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 48/100
PowerShell/ThreadJob#44 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
PowerShell/ThreadJob#43 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
PowerShell/ThreadJob#40 · リアクション 5 件 ·
PowerShell/ThreadJob の issue をすべて見る
似ている issue
-
untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
dotnet/install-scripts#746 · リアクション 1 件 ·
-
area:plugins area:tui enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
anthropics/claude-code#105139 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
zilliztech/memsearch#818 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
ehmpathy/rhachet-roles-bhuild#616 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信