microsoft / microsoft/terminal

We should add an option to paste and switch the slashes around

Open
#14,949 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Settings Issue-Task Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

This was in a mail thread earlier this week:

> Say that I copy this path
> `onecore/foo/bar/baz.dll`
>
> I want it to end up like this:
> `onecore\foo\bar\baz.dll`
>
> Or vice versa. Is there a specific keyboard shortcut that would allow me to translate the path in the clipboard to the final format easily, without having to pop into an editor and an S&R?
>

At first I was like "I mean that's kinda silly"

But I've had to copy/paste paths out of `git status` back into `del` commands a few times since then and you know what? I think this is a good idea now.

Questions:

* What do we name it?
* Do we support `\` -> `/`?
* Presumably we don't want to do this just for _paths_, since `onecore/foo/bar/baz.dll` might not be a local path we can sanitize. In fact let's not confuse this with path sanitation at all
* this is literally just `"replaceSlashes": "\"`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source files, tests, or entry points. Start by resolving the naming and behavior questions in the issue, including whether both slash directions are supported and how the option is exposed. Done means an agreed non-path-specific slash replacement option is implemented and its behavior is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.