microsoft / microsoft/terminal
Feature request: Pasting with OSC 52 (for e.g. terminal-based editors)
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
Related: #2946, #5823
It seems like a decision was made not to support pasting due to security concerns. This is understandable of course, but considering there are editors (such as `micro`) that actually use this functionality, it's also a bit disappointing.
Perhaps a middle ground would be to have the support but require the user to opt in in Windows Terminal settings?
FWIW, `> help copypaste` in `micro` gives this useful info:
```
* Kitty: supported, but only writing is enabled by default. To enable
reading, add `read-primary` and `read-clipboard` to the
`clipboard_control` option.
* iTerm2: only copying (writing to clipboard) is supported. Must be enabled in
`Preferences->General-> Selection->Applications in terminal may access clipboard`.
You can use Command-v to paste.
* `st`: supported.
* `rxvt-unicode`: not natively supported, but there is a Perl extension
[here](http://anti.teamidiot.de/static/nei/*/Code/urxvt/).
* `xterm`: supported, but disabled by default. It can be enabled by putting
the following in `.Xresources` or `.Xdefaults`:
`XTerm*disallowedWindowOps: 20,21,SetXprop`.
* `gnome-terminal`: does not support OSC 52.
```
Contributor guide
Research direction
Start by reading related issues #2946 and #5823 to understand the prior security decision around OSC 52 pasting. Compare the requested behavior with the examples from micro, Kitty, iTerm2, st, rxvt-unicode, xterm, and gnome-terminal; done would be a decided, opt-in Windows Terminal setting that enables OSC 52 paste safely.
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
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100