terminal cut and paste

When cut and pasting from terminal into another text document, the terminal formating / colors, also get copied and pasted. I just wantt the text. This was not an issue in Mountain Lion.


Anyone know how to fix?

Posted on Oct 25, 2013 12:32 PM

Reply
31 replies

Oct 31, 2013 6:53 PM in response to cciebob

Tony's solution is just the keyboard short-cut for Paste and Match Style from the Edit menu in TextEdit. To always paste monochrome with command+V, you need to change document type from RTF to plain text in TextEdit preferences. Exit and restart TextEdit for these changes to take effect.


Using just cmd+c, cmd+v sequence, I copied color content from Terminal and pasted into TextEdit as monochrome. Tested on Mavericks.

Oct 31, 2013 7:32 PM in response to etresoft

I understand that ⇧⌥⌘V is simply the "Match Style" version of Paste but I was not looking under Edit menu as I knew that C and ⌘V was what I wanted - or thought I wanted.

@etresoft, yeah, I agree the C copies as much context as possible (including color) and if it is pasted into an app that understands it, then it is used; however, that should be the case for practically all applications but Terminal should NOT be one of them. We should simply be able to copy and past text out of the terminal as we have always done. Better yet, we really need to be able to configure Terminal->Prefs the option to C (copy) only text out of Terminal or text and color. Maybe there is a hidden defaults command that can be set.

Oct 31, 2013 8:25 PM in response to TarheelTechie

Why not? If you hae configured Terminal to display colour, why shouldn't that get copied into the clipboard too? If Terminal didn't have this new ability then how do we know there wouldn't be someone else posting a complaint about why Terminal can display colours but can't copy them to the clipboard. Why would that complatin be less valid than your complaint now? It seems that now we have the best of both worlds. If you want colour, it is availble. If you don't, then don't use it.

Oct 31, 2013 9:01 PM in response to etresoft

Because Terminal is a text-based application. If we took your approach then why would XCode let me copy text from that text window without grabbing the color? Or why would text-edit let me do it. The fact is, for text-based applications, people may want to alter the background of the application itself to offer higher contrast between the text and background for easier viewing or for text selection to appear easier but that doesn't mean we want to copy the background. I think that a more logical appoach would be to let those who want to copy the background color to set that through Terminal->Preferences.

We'll just have to disagree on this one. Maybe I can set the background of my Terminal Window to a JPEG image of a solid color and it might let me simply copy the text. This ⇧⌥⌘V is a lot of keys to match for someone who is use to a very quick C and V. I now have to look at the keyboard to accomplish a task I could previously do blind.

Nov 1, 2013 5:24 AM in response to Frank Caggiano

Actually, it is two extra keys.

I normally C, hold the down, move the mouse over to the email to the customer I'm trying to help, and hit the V. Now it is C, move the mouse over to the email to the customer, then ⇧⌥⌘V (shift with pinky, Alt with ring finger, command with middle finger, then get the pointer over to V.

Nah, too hard, let me just copy the text from the Terminal on my right-27" screen, then move the mouse over to the mail app over on the left 27" screen, now keep moving the mouse on over and up to the left to the Mail -> Edit -> Paste and Match Style and my head is now pointing all 70 degrees left.

No I do this many times 8 hours a day and I have it is just a pain. Not going to hapen. I love Terminal and the way I can split-screen but other colleagues use iTerm and I've never gone that route -- maybe, regretfully, it is time to consider.

Nov 1, 2013 7:16 AM in response to TarheelTechie

TarheelTechie wrote:


why would XCode let me copy text from that text window without grabbing the color? Or why would text-edit let me do it.

What are you talking about? Xcode has copied rich text for a long time. I used to easily test rich text on the pasteboard by copying code with syntax highlighting from Xcode into my program.


I really don't understand the comment about "text-edit". It has supported rich text since day one.

Nov 1, 2013 7:17 AM in response to Tony T1

R-MacBook-Pro:~ $ ipcalc 233.200.79.160/27

Address: 233.200.79.160 11101001.11001000.01001111.101 00000

Netmask: 255.255.255.224 = 27 11111111.11111111.11111111.111 00000

Wildcard: 0.0.0.31 00000000.00000000.00000000.000 11111

=>

Network: 233.200.79.160/27 11101001.11001000.01001111.101 00000

HostMin: 233.200.79.161 11101001.11001000.01001111.101 00001

HostMax: 233.200.79.190 11101001.11001000.01001111.101 11110

Broadcast: 233.200.79.191 11101001.11001000.01001111.101 11111

Hosts/Net: 30 Class D, Multicast


R-MacBook-Pro:~ $ ipcalc 233.200.79.160/27

Address: 233.200.79.160 11101001.11001000.01001111.101 00000

Netmask: 255.255.255.224 = 27 11111111.11111111.11111111.111 00000

Wildcard: 0.0.0.31 00000000.00000000.00000000.000 11111

=>

Network: 233.200.79.160/27 11101001.11001000.01001111.101 00000

HostMin: 233.200.79.161 11101001.11001000.01001111.101 00001

HostMax: 233.200.79.190 11101001.11001000.01001111.101 11110

Broadcast: 233.200.79.191 11101001.11001000.01001111.101 11111

Hosts/Net: 30 Class D, Multicast

Jan 15, 2014 2:27 AM in response to cciebob

Hi Apple users


I just switched from using a ML and a Windows system to Maverick only. The new terminal cut and paste behaviour is odd: A terminal is a text-only application. (at least, it used to be in the last 20 years that I used terminals) I'd like to see an option that I can switch back to the text-only cut&paste behaviour.


I DO NOT want to use any other cut/paste key. One of the reasons for me to use OSX is consistent cut/paste behaviour (as opposed to using a (putty) terminal in Windows, or even a virtual Linux machine on Windows, where Ctrl-C is copy in Windows, but will kill an application in a terminal).

Using CMD-C/CMD-V in ML solved this issue, Maverick unsolved it!

Jan 15, 2014 2:44 AM in response to sieburgh

I hear ya barkin but unfortunately I have had to suck it up and start using Shift-Alt-Cmd-V when copying from Terminal to Mail or whatever other app. It was either that or Cmd-C and copy to TextEdit and Copy back off it and Paste and that was even more horrendous.

Its terrible but the brain does get used to the new key command... eventually.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

terminal cut and paste

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.