Option to paste without the final newline #16420

Closed
opened 2026-01-31 05:08:51 +00:00 by claunia · 2 comments
Owner

Originally created by @AsafMah on GitHub (Jan 18, 2022).

Description of the new feature/enhancement

When pasting something that includes multiple lines I get this useful screen:
image

But what happens very often, is that I copy the command from another source, but I want to edit it before sending.

And it seems that copying from many places automatically adds a newline at the end (websites, chat programs)
So what I do currently is carefully copy it without the last character, and then I can edit the command.

What I think would be a useful feature is either:

  1. If the pasted text ends in a new line, there will be an additional button in the dialogue which will be "paste without the trailing new line"
  2. Or, maybe a new settable keybinding to paste and trim the final newline.

Thanks!

Proposed technical implementation details (optional)

Originally created by @AsafMah on GitHub (Jan 18, 2022). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> When pasting something that includes multiple lines I get this useful screen: <img width="408" alt="image" src="https://user-images.githubusercontent.com/6424271/149906847-ba48cb57-5bb9-47ce-a296-e50faed5c1ab.png"> But what happens very often, is that I copy the command from another source, but I want to edit it before sending. And it seems that copying from many places automatically adds a newline at the end (websites, chat programs) So what I do currently is carefully copy it without the last character, and then I can edit the command. What I think would be a useful feature is either: 1. If the pasted text ends in a new line, there will be an additional button in the dialogue which will be "paste without the trailing new line" 2. Or, maybe a new settable keybinding to paste and trim the final newline. Thanks! # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. -->
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 05:08:51 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jan 18, 2022):

Thanks for the suggestion! This is actually already being tracked by another issue on our repo - please refer to #9400 for more discussion.

/dup #9400

#11473 should be coming in 1.13 with a fix for this ☺️

@zadjii-msft commented on GitHub (Jan 18, 2022): Thanks for the suggestion! This is actually already being tracked by another issue on our repo - please refer to #9400 for more discussion. /dup #9400 #11473 should be coming in 1.13 with a fix for this ☺️
Author
Owner

@ghost commented on GitHub (Jan 18, 2022):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Jan 18, 2022): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16420