- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2021-02-07T03:23:43+09:00","default:ryuichi","ryuichi")
#author("2021-02-07T03:45:40+09:00","default:ryuichi","ryuichi")
* set-optionの-gと-sと-wとset-window-option [#ree847c4]
** 前提 [#yc06621f]
- オプションには以下の3種がある
-- -g グローバルオプション
-- -s サーバーオプション
-- なし セッションオプション
-- -w ウィンドウオプション
** set-option [#ef531ee9]
** オプションは3種類ある [#s65c0397]
*** set-w [#q468e5dd]
| コマンドライン | 種類 |h
| -g | グローバルオプション |
| -s | サーバーオプション |
| なし | セッションオプション |
| -w | ウィンドウオプション |
** セッションオプション、グローバルオプションの順に評価される [#e5b08bef]
- セッションオプションオプションが指定されていればそれが評価され
- なければグローバルオプションが評価される
** ウィンドウオプションはグローバルとセッションを持つ [#r025fb4f]
- '''set-option -w -g''' でグローバルのウィンドウオプションを指定し、
- '''set-option -w''' でセッションのウィンドウオプションを指定する
** set-window-option は set-option -wの別名 [#b31a1e8e]
*** セッションに適用 [#of357468]
set-window-option
set-option
*** グローバルに適用 [#z6d87c05]
set-window-option -g
set-option -w -g
** サーバーオプションは通常の用途ではほぼ必要ない [#nad3b16e]
- '''tmux -L foo'''や'''tmux -S /tmp/foo'''みたいにtmuxを複数起動する時に使うが、通常の用途では必要ない
*** 参考 [#ub07b930]
https://superuser.com/questions/758843/difference-between-global-server-session-and-window-options
** 設定内容の確認 [#ud66bb8f]
tmux show-options -s # サーバーオプション
tmux show-options -g # グローバルオプション
tmux show-options # セッションオプション
tmux show-options -w -s # サーバーレベルのウィンドウオプション
tmux show-options -w -g # グローバルレベルのウィンドウオプション
tmux show-options -w # セッションレベルのウィンドウオプション
** 参考 [#xd1655a5]
https://man7.org/linux/man-pages/man1/tmux.1.html