tmux/Q/How can I query the current value of a tmux option?
Properties
- logseq-entity
- Logseq/Entity/Question
How can I query the current value of a tmux option?
AI Answer
- Short answer: Use
tmux show-optionsfor session options andtmux show-window-optionsfor window options; add-gto query the global (default) value. Option types and their query commands
- tmux options fall into two main scopes:
Scope Command Example option Session show-options(aliasshow)status-keysWindow show-window-options(aliasshoww)mode-keys
Query a specific option
- sh
# Session option — controls status-bar / command-prompt key mode tmux show-options -g status-keys # → status-keys vi # Window option — controls copy-mode key bindings tmux show-window-options -g mode-keys # → mode-keys vi - The
-gflag reads the global (config-level) default. Omit-ginside a tmux session to read the current session or window value, which may differ if overridden at runtime.
Show only the value (no key name)
Query from the tmux command prompt
Show all options at once
Sources
- Short answer: Use