/cwd does not strip surrounding quotes from pasted Windows paths (Explorer "Copy as path")
まだ誰も着手していません。
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
Description
When pasting a Windows path that is wrapped in double quotes (the format produced by Windows Explorer's Copy as path, e.g. "C:\Users\me\My Folder"), the /cwd command treats the quotes as literal characters. The quoted string is then interpreted as a relative path and appended to the current working directory, so the command fails even though the target directory exists.
Steps to reproduce
- In Windows Explorer, right-click a folder → Copy as path (yields a quoted path like
"C:\Users\russell.adams\OneDrive - Layfield Group\Scripts\LFG Efforts\CMMC"). - In Copilot CLI, type
/cwdand paste.
Actual behavior
Failed to change directory: Error: Directory does not exist or cannot be accessed: C:\Users\russell.adams\"C:\Users\russell.adams\OneDrive - Layfield Group\Scripts\LFG Efforts\CMMC"
The quoted absolute path is concatenated onto the current cwd instead of being recognized as an absolute path.
Expected behavior
/cwd should strip surrounding single/double quotes from the argument before resolving it, so paths pasted via "Copy as path" work directly. (Unquoted paths with spaces already work fine.)
Environment
- Copilot CLI version: 1.0.78
- OS: Windows (Windows_NT)
Workaround
Manually delete the surrounding quotes before submitting the /cwd command.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
/cwd コマンドのパス解決のエントリポイントから開始し、Explorer の「Copy as path」で取得した引用符付きパスを使って Windows 上で問題を再現します。完了条件は、解決前に外側の単一引用符または二重引用符が削除され、引用符付きの絶対ディレクトリが正常に機能し、スペースを含む既存の引用符なしパスも引き続き機能することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- shell
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 静か
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 72/100