it2 session lookup window

Look up which window contains a session

Synopsis

it2 session lookup window [<session-id>] [flags]

Description

Look up which window contains a session.

This command returns the window ID that contains the given session.

If no session ID is provided, uses the current session from ITERM_SESSION_ID.

Examples

Basic Usage

$ it2 session lookup window
$ it2 session lookup window sess_abc123

Scripting Example

$ WINDOW=$(it2 session lookup window -q)
$ it2 window focus "$WINDOW"

Options

--json

Output result as JSON
-q, --quiet
Only output the window ID (for scripting)

Options inherited from parent commands

--format (default "text")

Output format (text, json, yaml) - affects how command results are displayed

--timeout

Timeout for API operations - how long to wait for iTerm2 to respond

--url

WebSocket URL for iTerm2 API - typically ws://localhost:1912 for local iTerm2

See Also