Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Pasting into terminal gets truncated after 4095 chars?

When trying to paste data into the terminal, I noticed that it was getting truncated. I started trying various lengths, and found that it only pastes 4095 characters.

Is there any way to increase this limit?

Thanks,

-jamie

MacPro 2.66, Mac OS X (10.5.2)

Posted on Jul 3, 2008 5:59 PM

Reply
4 replies

Jul 4, 2008 9:55 AM in response to jrsmobile

I've pasted more than 4095 characters into the terminal, however, I've found that some applications running on the terminal may limit the amount of input they will accept before their input buffers overflow.

For example, I've have problems with some editors accepting large pastes.

However, I've been able to paste large amounts into "cat".

cat >tmp.tmp

and then I would use the editor's import capabilities to read the file.

In the good old days I used vi. These days I use Vim. Not an editor for everyone, but since I've been using this editor family since '85 it is where my fingers feel at home 🙂

Your mileage may vary.

Oct 23, 2008 5:39 AM in response to jrsmobile

(defun copy-from-osx ()
(shell-command-to-string "pbpaste"))

(defun paste-to-osx (text &optional push)
(let ((process-connection-type nil))
(let ((proc (start-process "pbcopy" " Messages" "pbcopy")))
(process-send-string proc text)
(process-send-eof proc))))

(setq interprogram-cut-function 'paste-to-osx)
(setq interprogram-paste-function 'copy-from-osx)

Did the trick-- tied the kill ring with the clipboard.

Pasting into terminal gets truncated after 4095 chars?

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