With the default Terminal.app, one can select the previous command output with Cmd + Shift + A and then copy it with Cmd + C (source).
Is there a similar shortcut for iTerm2?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityWith the default Terminal.app, one can select the previous command output with Cmd + Shift + A and then copy it with Cmd + C (source).
Is there a similar shortcut for iTerm2?
I figured out the solution:
iTerm2
> Install Shell Integration
pwd
Edit
> Select Output of Last Command
is enabled, and that the shortcut Cmd + Shift + A works as well.Note: the solution also works over SSH if you source the shell integration script