官术网_书友最值得收藏!

Using the set-option command

The main way in which options are set and configured within tmux is through the appropriately named set-option command.

This command can be called on its own to set an option temporarily. However, most of the time, we will use it to set options within a tmux configuration file so each time we launch tmux, the options are set the way we would like.

For a taste of using the set-option command to set an option temporarily, open a terminal window and launch tmux; alternatively, if you've been following along through Chapter 1, Jump Right In, just type the following command in the window:

$ tmux set-option status off

Once you do this, the status bar will disappear! This setting is only temporary, so if you leave it as is, end the session, and restart tmux or create a new session, it will not load this setting. In other words, a status bar will appear.

What you have done is that you've told tmux to set the option status to a value of off. You can use this command to set any tmux option on the fly in this manner. Having no status bar can be a bit unsettling, so let's turn it back on:

$ tmux set-option status on

If we want these configuration options to persist through tmux restarts and sessions, we need some way to tell tmux what their values should be. We will do that by creating a tmux configuration file.

主站蜘蛛池模板: 湘乡市| 澄迈县| 青阳县| 阜康市| 香格里拉县| 始兴县| 屏东县| 峡江县| 蒲江县| 东海县| 前郭尔| 南汇区| 武平县| 凭祥市| 扶沟县| 双鸭山市| 万年县| 惠州市| 江阴市| 恩施市| 沁源县| 璧山县| 北票市| 云和县| 苏尼特右旗| 绍兴市| 五常市| 长沙县| 嘉荫县| 花莲市| 安岳县| 张家川| 通辽市| 宁南县| 廊坊市| 寿阳县| 宣城市| 望城县| 宜君县| 灵璧县| 长垣县|