An option to swallow the trailing CRLF on paste #7154

Closed
opened 2026-01-31 00:56:35 +00:00 by claunia · 3 comments
Owner

Originally created by @wasker on GitHub (Mar 25, 2020).

Description of the new feature/enhancement

Whenever I paste a line with a trailing CRLF in Terminal, it gets executed immediately. I'd like to have an option for Terminal to swallow the trailing CRLF, so it would be safe to paste text.

Proposed technical implementation details (optional)

I don't have any suggestions on implementation, but ConEmu has an option like that.

Originally created by @wasker on GitHub (Mar 25, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 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). --> Whenever I paste a line with a trailing CRLF in Terminal, it gets executed immediately. I'd like to have an option for Terminal to swallow the trailing CRLF, so it would be safe to paste text. # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. --> I don't have any suggestions on implementation, but ConEmu has an option like that.
Author
Owner

@DHowett-MSFT commented on GitHub (Mar 26, 2020):

Yeah, we might as well have something like this. Somebody needs to suggest a config option (and whether it's profile-specific), and explain how it works when there's multiple newlines.

For reference, #395 is the holistic solution to this problem when all shells and applications eventually support it.

@DHowett-MSFT commented on GitHub (Mar 26, 2020): Yeah, we might as well have something like this. Somebody needs to suggest a config option (and whether it's profile-specific), and explain how it works when there's multiple newlines. For reference, #395 is the holistic solution to this problem when all shells and applications eventually support it.
Author
Owner

@zadjii-msft commented on GitHub (Dec 9, 2021):

You know, we also discussed this over in 9400 and have a proposed fix in #11473. To quoth:

just to trim the trailing newline if that's the only one in the paste contents. To quote: "It doesn't make sense to be warned for multiple lines, but copy a single line and try to paste it AND ONLY SEE ONE LINE IN THE DIALOG. That's dumb".

@wasker you think that'll work for you?

@zadjii-msft commented on GitHub (Dec 9, 2021): You know, we also discussed this over in 9400 and have a proposed fix in #11473. To quoth: > just to trim the trailing newline if that's the only one in the paste contents. To quote: "It doesn't make sense to be warned for multiple lines, but copy a single line and try to paste it AND ONLY SEE ONE LINE IN THE DIALOG. That's dumb". @wasker you think that'll work for you?
Author
Owner

@wasker commented on GitHub (Dec 9, 2021):

@zadjii-msft Yeah, I think this is a decent resolution for this bug, thanks!

@wasker commented on GitHub (Dec 9, 2021): @zadjii-msft Yeah, I think this is a decent resolution for this bug, thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7154