it2 split
Split a session pane (shortcut for session split)
Synopsis
it2 split [<session-id>] [flags]
Description
Split a session pane horizontally or vertically, creating a new session.
If no session-id is provided, uses $ITERM_SESSION_ID environment variable.
If neither --horizontal nor --vertical is specified, automatically chooses based on
session dimensions: vertical split when width > height, horizontal otherwise.
This is a convenience wrapper for 'it2 session split'.
Options
-
--badge - Set badge text on new session(s)
-
--before - Create new pane before the current one
-
--command - Command to run in the new session
-
--horizontal - Split horizontally
-
--json - Output result as JSON
-
--profile - Profile name for the new session (optional, uses default if not specified)
-
-q,--quiet - Only output the new session ID (for scripting)
-
--vertical - Split vertically
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
- it2 - iTerm2 API Command-Line Interface
Examples
# Split current session (auto-detects best direction)
$ it2 split
# Split vertically
$ it2 split --vertical
# Split with badge
$ it2 split --badge "Build"
# Split and run command
$ it2 split --command "ssh vm1"
# Split and just output the new session ID
$ it2 split --quiet