Avoid accidental pasting with iTerm2

iTerm2 has a feature called “Advanced Paste…”. This feature allows the user to review and modify the copy-and-paste buffer before the paste takes place.

For example, the command ./therightcommand.sh is entered in one terminal window and needs to be pasted into another. The text is selected and control+v is pressed to copy the text.

Then option+command+c is pressed to enter the Advanced Paste... mode. Whoops, ctrl+c was accidentally pressed above, which is the wrong copy command. This mistake is easily caught with advanced pasted in iTerm:

Editing is not limited to a single command or single word. This is especially important for network engineers who regularly paste network configurations over the CLI:

comments powered by Disqus