it2 variable delete

Delete/unset a variable

Synopsis

it2 variable delete <scope> <name> [identifier] [flags]

Description

Delete or unset a variable from a specific scope.

Scopes:
app - Application-wide variables
session - Session-specific variables (requires session-id)
tab - Tab-specific variables (requires tab-id)
window - Window-specific variables (requires window-id)

Examples

# Delete app-level variable
$ it2 variable delete app user.my_var
# Delete session variable
$ it2 variable delete session user.env abc123
# Delete with force (no confirmation)
$ it2 variable delete --force app user.temp_var
# Delete current session variable
$ it2 variable delete session user.status $ITERM_SESSION_ID
# Delete tab variable
$ it2 variable delete tab user.tab_data tab-123
# Delete window variable
$ it2 variable delete window user.window_state window-123

Options

-f, --force
Don't prompt for confirmation

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