I use vscode and terminal all day at work. It's normal for my terminal to have 10,000+ lines of text. I am worried I will accidentally print my terminal, and I wonder if there's a way to prevent that from happening.

I think this is pretty likely to happen without some kind of additional safeguards. In vscode, cmd+p is how you open the prompt. So I frequently hit cmd+p, type some text, and then hit enter. I'm worried I'll accidentally do this in terminal (which would start printing 10k lines of text while I run over and unplug the printer!). I've already opened the print dialog box a few times but luckily have not hit enter.

I think ways to fix this would be 1) an additional step to open the print dialog or 2) a warning if I try to print something huge.

Unfortunately I cannot remove the printer as this is a work machine and I cannot control the printers.

  • 3
    this is a work machine and I cannot control the printers <-- Does this also mean that you cannot add a new printer if you chose to?
    – pion
    Dec 17, 2021 at 1:31
  • 7
    If you can add printers, you could create a fake one and make it the default. Dec 17, 2021 at 3:51
  • 8
    Pressing Cmd-P in Terminal opens the Print dialog, it doesn't print directly. Shouldn't this be enough protection?
    – nohillside
    Dec 17, 2021 at 6:33
  • 5
    I‘ve been using Macs my entire live and have yet to accidentally print something. This problem seems somewhat artificial.
    – idmean
    Dec 17, 2021 at 20:17
  • 2
    @davidbak Well, I've never used vscode, and I'm not inclined to, either. Evidently it can't read input from the keyboard, either. :-\ Dec 17, 2021 at 20:53

1 Answer 1


Add a custom shortcut for the print... menu in Terminal.app. This will overwrite the default shortcut (command-p).

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .