what does the 'set -g' command do in tmux?

I see references to set -g <command> in tmux, for example

set -g status-right ' #[bg=colour33] Branch #[(git branch)] '

I have googled and looked in man tmux and also info tmux but cant find any info.

what does set -g do?
does it set a variable in the same way that vim uses :set <variable> ?
If so what does the -g do?

1 Answer

What does the 'set -g' command do in tmux?

  • set is an alias for set-option.

  • -g is used to set the option for the global session or window.

Commands which set options are as follows:

set-option [-agoqsuw] [-t target-session | target-window] option value (alias: set)

Set a window option with -w (equivalent to the set-window-option command), a server option with -s, otherwise a session option.

If -g is specified, the global session or window option is set.

Source tmux — terminal multiplexer

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like