it2 session select
Select text in a session
Synopsis
it2 session select <session-id> <start-x> <start-y> <end-x> <end-y> [flags]
Description
Select text in a session using start and end coordinates.
Coordinates are 0-based with (0,0) at the top-left corner of the terminal.
You can then use 'it2 session copy' to copy the selected text.
Selection modes:
--mode character - Select by character (default)
--mode word - Select by word boundaries
--mode line - Select by whole lines
--mode smart - Smart selection
--mode box - Box/rectangular selection
Examples
Basic Selection
$ it2 session select session123 5 10 15 10
Multi-line Selection
$ it2 session select session123 0 5 20 8
Workflow Example
$ it2 session select session123 10 5 20 5 # Select text
$ it2 session copy session123 # Copy to clipboard
Options
-
--format(default "table") - Output format (table|json|yaml|text)
-
--mode(default "character") - Selection mode (character, word, line, smart, box)
-
--timeout(default "5s") - Command timeout
-
--url(default "ws://localhost:1912") - iTerm2 WebSocket URL
See Also
- it2 session - Manage iTerm2 sessions
- it2 session autorespond - Monitor and automatically respond to session prompts
- it2 session badge - Manage session badges
- it2 session close - Close one or more sessions
- it2 session copy - Copy current selection to clipboard
- it2 session current - Show the current session ID
- it2 session focus - Focus/activate a session
- it2 session focused - Get the currently focused session ID
- it2 session get-buffer - Get buffer contents of a session
- it2 session get-info - Get comprehensive session information
- it2 session get-pid - Get the process ID (PID) of the shell in a session
- it2 session get-screen - Get current screen contents of a session
- it2 session has-shell-integration - Check if shell integration is enabled for a session
- it2 session list - List all iTerm2 sessions
- it2 session lookup - Look up session relationships and hierarchy
- it2 session monitor - Monitor session events in real-time
- it2 session move - Move a session to be a split pane next to another session
- it2 session paste - Paste clipboard content to session
- it2 session process - Process inspection for sessions
- it2 session profile - Manage session profile properties
- it2 session prompt - Get shell prompt metadata for a session
- it2 session resize - Resize a pane in a split layout
- it2 session restart - Restart a session
- it2 session send-key - Send a special key to a session
- it2 session send-text - Send text to a session as if typed
- it2 session split - Split a session pane
- it2 session splits - Show split pane layout (moved to 'tab splits')
- it2 session tail - Continuously monitor session output (like tail -f)
- it2 session title - Manage session titles
- it2 session variable - Manage session variables
- it2 session watch - Watch sessions and provide status overview