Microsoft/vscode

Feature request: setting to wrap absolute path Copy Path command with quotes

Open

#229,280 创建于 2024年9月21日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)TypeScript (10,221 fork)batch import
feature-requesthelp wantedterminal-input

仓库指标

Star
 (74,848 star)
PR 合并指标
 (平均合并 11小时 43分钟) (30 天内合并 1,000 个 PR)

描述

I use VSCode on Windows with git bash as the terminal. A problem I have is when I want to cd into a folder: I right click a folder, do Copy Path, focus the terminal and do cd and paste the folder. I end up with this:

$ cd C:\Github\forks\kit\packages\kit\test\apps\basics
bash: cd: C:Githubforkskitpackageskittestappsbasics: No such file or directory

The shell eats the \ because they are not escaped and the path isn't quoted.

This feature request is for a setting to optionally wrap the path with single or double quotes:

Explorer: Wrap absolute Copy Path file path with quotes "No quotes (default)" "Single" "Double"

Right now Copy Path gives C:\Github\forks\kit\packages\kit\test\apps\basics which would still be the default.

Single would give 'C:\Github\forks\kit\packages\kit\test\apps\basics' Double would give "C:\Github\forks\kit\packages\kit\test\apps\basics"

This feature would make it smoother to interact with absolute paths from the Copy Path command on Windows machines/shells.

贡献者指南