it2 session profile get
Get a session profile property
Synopsis
it2 session profile get [<session-id>] <property>
Description
Get a profile property from a session's profile copy.
If no session-id is provided, uses $ITERM_SESSION_ID environment variable.
Common profile properties:
- Badge Text: Session badge text
- Title: Session title
- Name: Session name
- Background Color: Background color
- Foreground Color: Text color
Examples
# Get badge text from current session
$ it2 session profile get "Badge Text"
# Get title from current session
$ it2 session profile get Title
# Get property from specific session
$ it2 session profile get abc123 "Background Color"
# Get with JSON output
$ it2 session profile get --format json Title
# Get all common properties
$ for prop in "Badge Text" Title Name; do
$ echo "$prop: $(it2 session profile get "$prop")"
$ done
# Get foreground color
$ it2 session profile get "Foreground Color"
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 session profile - Manage session profile properties
- it2 session profile list - List all profile properties for a session
- it2 session profile reset - Reset a session profile property to profile default
- it2 session profile set - Set a session profile property