Warn on Multiline Paste
See original GitHub issueType Enhancement/Feature Request
What You Do
- Copy a multiline string from somewhere, such as:
hello
world
- Paste this into the terminal window
What You See
The pasted text is entered without a warning and immediately executed by the shell.
What You Expect
A popup dialog confirming that you really wanted a multi-line paste. In my experience, you usually don’t.
You would probably want a configuration option to enable/disable this for other people’s sanity’s sake.
Other Notes
This is different from the existing bracketed paste, because it (hopefully?) wouldn’t require shell integration to work.
I think I’ve found the location where you would implement this? https://github.com/Eugeny/terminus/blob/ceb75323fefa788d0cb7032df3d4cf0aee258722/terminus-terminal/src/api/baseTerminalTab.component.ts#L273. You would add a check here to see if “multiline pasting warning” was enabled, and if so, check the data
variable for newlines and warn accordingly.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (1 by maintainers)
Top GitHub Comments
Now, we have the option
multiLinePasteWarning
which can be defined asfalse
.Could I humbly request that changes to user experience like this default to disabled, rather than changing default behaviour? Alternatively could/should the setting for disabling the warning be documented in the warning message?
Searching for ‘windows terminal newline warning’ brought up a number of irrelevant results unfortunately, and I couldn’t find it in the documentation. Thanks @diegosomar for mentioning the setting.