it2 session copy
Copy current selection to clipboard
Synopsis
it2 session copy [<session-id>] [flags]
Description
Copy the current text selection to the system clipboard.
If no session-id is provided, uses $ITERM_SESSION_ID environment variable.
The session must have an active text selection for this to work.
Options
-
--format(default "table") - Output format (table|json|yaml|text)
-
--timeout(default "5s") - Command timeout
-
--url(default "ws://localhost:1912") - iTerm2 WebSocket URL
See Also
- it2 session - Manage iTerm2 sessions
Examples
# Basic Usage
it2 session copy
it2 session copy session123
# Workflow Example
it2 session select session123 10 5 20 5 # Select text
it2 session copy session123 # Copy to clipboard