it2 session lookup above

Look up the pane immediately above

Synopsis

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

Description

Look up the session in the pane immediately above the given session.

This performs spatial lookup based on the visual layout of split panes.
It finds the pane that is directly above the target pane in the terminal window.

If no session ID is provided, uses the current session from ITERM_SESSION_ID.
If there is no pane above, returns empty output.

Examples

Basic Usage

$ it2 session lookup above
$ it2 session lookup above sess_abc123
# Scripting Example - Focus pane above
$ above=$(it2 session lookup above -q)
$ if [ -n "$above" ]; then
$ it2 session focus "$above"
$ fi

Options

--json

Output result as JSON
-q, --quiet
Only output the session 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