question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warn on Multiline Paste

See original GitHub issue

Type Enhancement/Feature Request

What You Do

  1. Copy a multiline string from somewhere, such as:
hello
world
  1. 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:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

11reactions
diegosomarcommented, Aug 27, 2020

Now, we have the option multiLinePasteWarning which can be defined as false.

10reactions
alowdecommented, Sep 2, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Show Warning On Multiline Paste In Terminal - Support
You used to get a warning when pasting a multiline value from clipboard while connected via Terminal plugin, that doesn't happen anymore.
Read more >
How do I get Windows Terminal to stop asking me every time I ...
Warn when the text to paste contains multiple lines ... When this is set to true, trying to paste text with multiple lines...
Read more >
Warn on Multiline Paste · Issue #2131 · Eugeny/tabby - GitHub
Paste this into the terminal window. What You See. The pasted text is entered without a warning and immediately executed by the shell....
Read more >
Warn before pasting multiple lines - Devolutions Forum
Is there any feature to have the user confirm before copy_pasting multiple lines into a terminal ? Similar to MobaXterm feature called "Warn...
Read more >
Warn before multi line paste options does not work - GitLab
Paste multiline string with "Warn before multi line paste" option enabled. What happened: Option Edit->Paste special->Warn before multi line ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found