I am running a java script, which has some text output. I'd like to copy/paste that output. If I do ⌘-A, it copies everything that's been typed that session, even if I typed clear
beforehand. How can I copy only what is currently displayed?
-
-
The thing you want to copy. I'm not familiar with java but you need to type the command to run the script instead of the echo sup3ru53r – ᔕᖺᘎᕊ Jun 16 '14 at 20:34
Without modifying your code, you can...:
- Set the number of buffered lines equal to your screen size, in Terminal Preferences. It can be found under the Settings tab, and then the Windows button.
- Clear the scrollback buffer with cmd-K immediately before running your script, then use cmd-A C as normal.
⌘-C
or Right-click then copy. – romainl Jun 16 '14 at 20:01pbcopy
) or "what's currently displayed" (select thenCmd+C
)? – romainl Jun 16 '14 at 21:54