├── .hgignore ├── Makefile ├── tmux-ja.rst └── tmux-raw.txt /.hgignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | tmux-ja.html 3 | 4 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | SRC_BASE = tmux-ja 3 | FILE_IN = $(SRC_BASE).rst 4 | FILE_OUT = $(SRC_BASE).html 5 | FILE_DUMP = tmux-raw.txt 6 | 7 | .PHONY: all 8 | all : $(FILE_IN) 9 | rst2html --language=ja --title='Manpage of TMUX' $(FILE_IN) $(FILE_OUT) 10 | 11 | .PHONY: clean 12 | clean: 13 | $(RM) $(FILE_OUT) 14 | 15 | .PHONY: dump 16 | dump : $(FILE_IN) 17 | rm -f $(FILE_DUMP) 18 | LANG= man tmux > $(FILE_DUMP) 19 | -------------------------------------------------------------------------------- /tmux-ja.rst: -------------------------------------------------------------------------------- 1 | ############################################################################## 2 | TMUX 3 | ############################################################################## 4 | 5 | ============================================================================== 6 | 名前 7 | ============================================================================== 8 | 9 | tmux ― 端末多重化 (terminal multiplexer) 10 | 11 | ============================================================================== 12 | 書式 13 | ============================================================================== 14 | 15 | :: 16 | 17 | tmux [-28dlqUuv] [-f file] [-L socket-name] [-S socket-path] [command [flags]] 18 | 19 | ============================================================================== 20 | 説明 21 | ============================================================================== 22 | 23 | **tmux** は端末を多重化し、 24 | 1 つのスクリーンから複数の端末を作成、アクセス、制御することを可能にします。 25 | **tmux** をスクリーンからデタッチしバックグランドで動作させておいて、 26 | その後再度アタッチすることができます。 27 | 28 | **tmux** は起動されると 29 | 1 つの\ *ウィンドウ*\ を持つ新しい \ *セッション*\ を作成しスクリーンに表示します。 30 | スクリーンの一番下にあるステータスラインはカレントセッションの情報を表示し、 31 | 対話型コマンドの入力に使用されます。 32 | 33 | セッションとは **tmux** に管理される\ *疑似端末*\ の集合の 1 つです。 34 | 各セッションはリンクする 1 つ以上のウィンドウを持ちます。 35 | ウィンドウはスクリーン全体を占有し、 36 | 各々が独立した疑似端末である複数の矩形ペインへ分割することができます 37 | (疑似端末の技術的な詳細は pty(4) マニュアルページドキュメント)。 38 | **tmux** のインスタンスはいくつでも同じセッションに接続することができ、 39 | ウィンドウはいくつでも同じセッションに作成しておくことができます。 40 | 全セッションが kill されたときに **tmux** は終了します。 41 | 42 | 各セッションは持続的で、(ssh(1) のコネクションタイムアウトのような) 43 | 予期しない切断や ('C-b d' キーストロークによる) 44 | 意図的なデタッチがあっても存続します。 45 | **tmux** に再アタッチするには以下のようにします:: 46 | 47 | $ tmux attach 48 | 49 | **tmux** ではセッションは\ *クライアント*\ 側のスクリーンに表示され、 50 | 全セッションは 1 つの\ *サーバー*\ で管理されます。 51 | サーバーと各クライアントは 52 | */tmp* のソケットを通して通信する独立したプロセスです。 53 | 54 | オプションは以下の通りです: 55 | 56 | -2 **tmux** に端末が 256 色をサポートすると強制的に見なします。 57 | 58 | -8 **-2** と同様に 88 色を指示します。 59 | 60 | -d **tmux** 61 | にデフォルトの色数をサポートすると強制的に見なします。 62 | 63 | -f file 別の設定ファイルを指定します。 64 | デフォルトでは **tmux** はシステムの設定ファイルを 65 | */etc/tmux.conf* から読み込みます。存在するなら、 66 | ユーザーの設定ファイルを 67 | *~/.tmux.conf* から読み込みます。 68 | 設定ファイルはサーバーが最初に起動されたときに順に実行される 69 | **tmux** コマンドの集合です。 70 | 71 | 設定ファイル中のコマンドが失敗した場合、 72 | **tmux** はエラーを報告し以降のコマンドを実行せずに終了します。 73 | 74 | -l ログインシェルとして振る舞います。このフラグに効果は無く、 75 | **tmux** をログインシェルとして利用するときの、 76 | 他のシェルとの互換性のために存在しています。 77 | 78 | -L socket-name **tmux** はサーバーソケットを */tmp* 79 | 以下のディレクトリに格納し、デフォルトのソケットは 80 | *default* と名付けられます。 81 | このオプションで違うソケット名を指定でき、いくつかの独立した 82 | **tmux** サーバーを実行することができます。 83 | **-S** とは違いフルパスは必要なく、 84 | 全てのソケットは同じディレクトリ内に作成されます。 85 | 86 | ソケットが誤って削除された場合、再作成するよう 87 | **tmux** サーバーに SIGUSR1 シグナルが送信されます。 88 | 89 | -q サーバーが様々な情報メッセージ 90 | (例えばウィンドウフラグが変更されたとき) を送るのを防ぎます。 91 | 92 | -S socket-path サーバーソケットの別のフルパスを指定します。 93 | **-S** が指定された場合、 94 | デフォルトのソケット用ディレクトリは使われず、 95 | **-L** フラグは無視されます。 96 | 97 | -U サーバーをアンロックします。 98 | 99 | -u **tmux** は環境変数 LC_ALL, LC_CTYPE, LANG の先頭に文字列 100 | "UTF-8" が設定されているか調べることで、 101 | UTF-8 サポートの有無を推測します。 102 | これは常にうまくいくとは限らないので、 103 | **-u** フラグを使って UTF-8 がサポートされていることを 104 | **tmux** に明確に伝えます。 105 | 106 | サーバーがクライアントから **-u** を渡されたり 107 | UTF-8 を検出した環境で起動された場合、 **utf8** 及び 108 | **status-utf8** オプションがグローバルウィンドウとセッションオプションでそれぞれ有効になります。 109 | 110 | -v 冗長なロギングを要求します。 111 | このオプションを複数回指定することで冗長度を上げることができます。 112 | ログメッセージはカレントディレクトリの 113 | *tmux-client-PID.log* 及び 114 | *tmux-server-PID.log* ファイルに保存され、 115 | *PID* はサーバーまたはクライアントの PID になります。 116 | 117 | *command* [*flags*] 118 | 後の節で説明する、 **tmux** を制御するためのコマンド集合を 119 | 1 つ指定します。 120 | コマンドが 1 つも指定されなかった場合、 121 | **new-session** コマンドが指定されたものとします。 122 | 123 | ============================================================================== 124 | キーバインド 125 | ============================================================================== 126 | 127 | アタッチしたクライアントから 128 | **tmux** をデフォルトでは 'C-b (Ctrl-b)' のプレフィックスキーと、 129 | それに続くコマンドキーの組み合わせで制御することができます。 130 | 131 | デフォルトのキーバインドのいくつか: 132 | 133 | === =================================== 134 | `c` 新しいウィンドウを作成。 135 | `d` カレントクライアントをデタッチ。 136 | `l` 直前に選択されていたウィンドウに移動。 137 | `n` 次のウィンドウに切り替え。 138 | `p` 前のウィンドウに切り替え。 139 | `&` カレントウィンドウをkill。 140 | `,` カレントウィンドウをリネーム。 141 | `?` 全キーバインドを列挙。 142 | === =================================== 143 | 144 | 完全なリストは (デフォルトでは '?' に割り当てられている) 145 | **list-keys** コマンドで得られます。 146 | キーバインドは **bind-key** 及び **unbind-key** コマンドで変更できます。 147 | 148 | ============================================================================== 149 | コマンド 150 | ============================================================================== 151 | 152 | この節は **tmux** でサポートされるコマンドのリストを含みます。 153 | ほとんどのコマンドは *target-client*, *target-session*, *target-window*, 154 | *target-pane* のどれかひとつを持つ **-t** 引数を受け付けます。 155 | これらはコマンドを作用させるクライアント、セッション、ウィンドウ、 156 | ペインを指定します。 *target-client* はクライアントが接続された 157 | pty(4) ファイル名で、例えば */dev/ttyp1* か、 158 | */dev/ttyp1* にアタッチされた *ttyp1* のいずれかです。 159 | クライアントが指定されなかった場合、可能ならカレントクライアントが選ばれ、 160 | そうでなければエラーが報告されます。 161 | クライアントは **list-clients** コマンドで列挙することができます。 162 | 163 | *target-session* は (**list-sessions** コマンドで列挙される) セッション名か、 164 | *target-client* と同じ書式のクライアント名で、 165 | この場合アタッチされているセッションになります。セッション名を探すとき、 166 | **tmux** は始めに完全なマッチを探し、見つからなければ 167 | *target-session* が先頭で一致するものか、 168 | fnmatch(3) パターンでマッチするものを調べます。マッチが 1 つだけ見つかった場合、 169 | それが対象セッションになり、マッチが複数の場合はエラーになります。 170 | セッションが省略された場合、可能ならカレントセッションが利用され、 171 | カレントセッションが利用できなければ一番最後に作られたものが選ばれます。 172 | 173 | *target-window* は *session*:*window* という形式でウィンドウを指定します。 174 | *session* は *target-session* と同じルールに従い、 *window* は 175 | `mysession:1` のようなウィンドウ番号、 176 | `mysession:mywindow` のような完全なウィンドウ名、 177 | `mysession:mywin*` や `mysession:mywin` のような 178 | fnmatch(3) パターンやウィンドウ名の先頭として、順に検索されます。 179 | 空のウィンドウ名は (**new-window** や **link-window** コマンドのように) 180 | 適切なら次の使われていない番号になり、 181 | そうでなければセッションのカレントウィンドウが選ばれます。 182 | 引数がコロンを含んでいなければ **tmux** はまずウィンドウとして解析してみて、 183 | それが失敗した場合、セッションにマッチしないか試みます。 184 | 185 | *target-pane* は *target-window* と同じような形式を取りますが、 186 | `mysession:mywindow.1` 187 | のようなピリオドに続くペイン番号の追加オプションがあるところが違います。 188 | ペイン番号が省略された場合、 189 | 指定されたウィンドウのそのときアクティブなペインが使われます。 190 | コロンもピリオドもなければ、 191 | **tmux** はまずペイン番号として引数を使おうとします。それが失敗した場合、 192 | *target-window* として検索します。 193 | 194 | 複合コマンドは\ *コマンド列*\ の一部として合わせて指定することができます。 195 | 各コマンドはスペースとセミコロンで分離され、 196 | コマンドは左から右へ続けて実行されます。 197 | (例えばコマンド列を **bind-key** で指定する場合などで) 198 | リテラルのセミコロンはバックスラッシュでエスケープすることで含めることができます。 199 | 200 | 例を挙げると:: 201 | 202 | refresh-client -t/dev/ttyp2 203 | 204 | rename-session -tfirst newname 205 | 206 | set-window-option -t:0 monitor-activity on 207 | 208 | new-window ; split-window -d 209 | 210 | bind-key D detach-client \; lock-server 211 | 212 | ============================================================================== 213 | クライアントとセッション 214 | ============================================================================== 215 | 216 | 以下のコマンドが利用できます: 217 | 218 | **attach-session** [**-d**] [**-t** *target-session*] 219 | (別名: **attach**) 220 | **tmux** の外部で実行した場合、現在の端末の中で新しいクライアントを作成し、 221 | *target-session* にアタッチします。内部で実行した場合、 222 | カレントクライアントに切り替えます。 **-d** が指定された場合、 223 | このセッションにアタッチしている他のクライアントはデタッチされます。 224 | 225 | サーバーが起動していなければ **attach-session** はサーバーを起動しようとし、 226 | セッションが設定ファイル中で作成されなければ失敗します。 227 | 228 | **detach-client** [**-t** *target-client*] 229 | (別名: **detach**) 230 | キーバインドからならカレントクライアントを、 231 | または **-t** で指定されたクライアントをデタッチします。 232 | 233 | **has-session** [**-t** *target-session*] 234 | (別名: **has**) 235 | 指定したセッションが存在しなければエラーを報告し 1 で終了します。 236 | 存在すれば 0 で終了します。 237 | 238 | **kill-server** 239 | **tmux** サーバーとクライアントを kill し全セッションを破棄します。 240 | 241 | **kill-session** [**-t** *target-session*] 242 | 与えられたセッションを破棄し、 243 | このセッションにだけリンクしているウィンドウを閉じ、 244 | アタッチしている全クライアントをデタッチします。 245 | 246 | **list-clients** 247 | (別名: **lsc**) 248 | サーバーにアタッチしている全クライアントを列挙します。 249 | 250 | **list-commands** 251 | (別名: **lscm**) 252 | **tmux** でサポートしている全コマンドの書式を列挙します。 253 | 254 | **list-sessions** 255 | (別名: **ls**) 256 | サーバーで管理されている全セッションを列挙します。 257 | 258 | **new-session** [**-d**] [**-n** *window-name*] [**-s** *session-name*] [*command*] 259 | (別名: **new**) 260 | *session-name* という名前で新しいセッションを作成します。 261 | **-d** が与えられなければ、新しいセッションは現在の端末にアタッチされます。 262 | *window-name* は初期ウィンドウの名前で、 263 | *command* はそこで実行されるコマンドです。 264 | 265 | ターミナルから実行された場合、 266 | termios(4) の特殊文字は保存され、 267 | 新しいセッションの新しいウィンドウで使われます。 268 | 269 | **refresh-client** [**-t** *target-client*] 270 | (別名: **refresh**) 271 | キーバインドからならカレントクライアントを、 272 | または **-t** で指定された 1 つのクライアントを更新します。 273 | 274 | **rename-session** [**-t** *target-session*] *new-name* 275 | (別名: **rename**) 276 | セッションを *new-name* へリネームします。 277 | 278 | **source-file** *path* 279 | (別名: **source**) 280 | *path* からコマンドを実行します。 281 | 282 | **start-server** 283 | (別名: **start**) 284 | 既に起動されいなければ、セッションを作成せずに 285 | **tmux** サーバーを起動します。 286 | 287 | **suspend-client** [**-c** *target-client*] 288 | (別名: **suspendc**) 289 | SIGTSTP (tty stop) を送信してクライアントをサスペンドします。. 290 | 291 | **switch-client** [**-c** *target-client*] [**-t** *target-session*] 292 | (別名: **switchc**) 293 | クライアント *target-client* のカレントセッションを 294 | *target-session* に切り替えます。 295 | 296 | ============================================================================== 297 | ウィンドウとペイン 298 | ============================================================================== 299 | 300 | **tmux** ウィンドウは、いくつかあるモードのいずれかになっています。 301 | デフォルトではウィンドウにアタッチされた端末に直接アクセスできます。 302 | 他は以下の通りです: 303 | 304 | *出力モード* 305 | **list-keys** のような出力を発生するコマンドが 306 | キーバインドから実行されたときにこのモードに入ります。 307 | 308 | *スクロールモード* 309 | (デフォルトで '=' に割り当てられている) 310 | **scroll-mode** コマンドでこのモードに入り、 311 | ウィンドウ履歴バッファの閲覧ができます。 312 | 313 | *コピーモード* 314 | このモードではウィンドウやその履歴の一部を、 315 | 後で別のウィンドウへ挿入するために\ *ペーストバッファ*\ へコピーすることができます。 316 | デフォルトで '[' に割り当てられている **copy-mode** でこのモードに入ります。 317 | 318 | 利用可能なキーは emacs モードまたは vi モード 319 | (**mode-keys** オプションを参照) のどちらが選択されているかに依存します。 320 | モードに適合するように以下のキーがサポートされています: 321 | 322 | ===================== ======== =========== 323 | Function vi emacs 324 | ===================== ======== =========== 325 | インデント位置 `^` `M-m` 326 | 選択範囲解除 `Escape` `C-g` 327 | 選択範囲コピー `Enter` `M-w` 328 | カーソル下 `j` `Down` 329 | カーソル左 `h` `Left` 330 | カーソル右 `l` `Right` 331 | カーソル上 `k` `Up` 332 | 行全体削除 `d` `C-u` 333 | 行末尾まで削除 `D` `C-k` 334 | 行末尾 `$` `C-e` 335 | 行番号移動 `g` `g` 336 | 次ページ `C-f` `Page down` 337 | 次単語 `w` `M-f` 338 | バッファ貼り付け `p` `C-y` 339 | 前ページ `C-u` `Page up` 340 | 前単語 `b` `M-b` 341 | モード終了 `q` `Escape` 342 | 検索繰り返し `n` `n` 343 | 後方検索 `?` `C-r` 344 | 前方検索 `/` `C-s` 345 | 行先頭 `0` `C-a` 346 | 選択範囲開始 `Space` `C-Space` 347 | Transpose chars `C-t` 348 | ===================== ======== =========== 349 | 350 | これらのキーバインドは名前付けられたテーブル集合で定義されています。 351 | *vi-edit* 及び *emacs-edit* 352 | はコマンドプロンプトで行編集するときに使われるキーで、 353 | *vi-choice* 及び *emacs-choice* 354 | は (**window-choice** コマンドで発生するような) 355 | リストから選択するときや出力モードで使われるキーで、 356 | *vi-copy* 及び *emacs-copy* 357 | はコピーモードとスクロールモードで使われるキーです。 358 | このテーブルは **list-keys** コマンドで観ることができ、 359 | **bind-key** 及び **unbind-key** コマンドでキーを変更したり削除したりできます。 360 | 361 | バッファ貼り付けキーはスタックの先頭のペーストバッファから最初の行を貼り付けます。 362 | 363 | モードのコマンドは以下の通りです: 364 | 365 | **copy-mode** [**-u**] [**-t** *target-pane*] 366 | コピーモードに入ります。 **-u** オプションは 1 ページ上にスクロールします。 367 | 368 | **scroll-mode** [**-u**] [**-t** *target-pane*] 369 | スクロールモードに入ります。 **-u** は **copy-mode** と同様です。 370 | 371 | **tmux** で表示される各ウィンドウは 1 つ以上の\ *ペイン*\ に分割することができ、 372 | 各ペインはディスプレイの領域をいくぶんか占有し、それぞれ独立した端末です。 373 | ウィンドウは **split-window** コマンドで複数のペインに分割することができます。 374 | ウィンドウは(**-h** フラグで) 水平または垂直に分割できます [1]_ 。 375 | ペインは (デフォルトでは 376 | 'C-up', 'C-down', 'C-left', 'C-right' に割り当てられている) 377 | **resize-pane** コマンドでリサイズでき、カレントペインは **up-pane** 及び 378 | **down-pane** コマンドで切り替えられ、 **rotate-window** 及び **swap-pane** 379 | コマンドで位置を変更することなくペインを入れ替えることができます。 380 | ペインには番号が作成順に 0 から割り振られます。 381 | 382 | \ *レイアウト*\ のプリセットがいくつか利用できます。 383 | **select-layout** コマンドで選択したり、 384 | (デフォルトでは 'C-Space' に割り当てられている) 385 | **next-layout** コマンドで循環したりでき、 386 | レイアウトが選択されれば関連するペインは基本状態へ移動・リサイズされます。 387 | 388 | 以下のレイアウトがサポートされています: 389 | 390 | **even-horizontal** 391 | ウィンドウ全体で均等に左から右へペインを並べます。 392 | 393 | **even-vertical** 394 | 均等に上から下へペインを並べます。 395 | 396 | **main-horizontal** 397 | 大きい(主)ペインをウィンドウ上方に表示し、 398 | 残りのペインを下方の余りスペースで左から右へ並べます。 399 | 上のペインの高さを指定するには 400 | *main-pane-height* ウィンドウオプションを利用してください。 401 | 402 | **main-vertical** 403 | 大きいペインを左に配置し他を右側で上から下へ並べる点以外は 404 | **main-horizontal** と同様です。 405 | *main-pane-width* ウィンドウオプションを参照してください。 406 | 407 | ウィンドウとペインに関するコマンドは以下の通りです: 408 | 409 | **break-pane** [**-d**] [**-t** *target-pane*] 410 | (別名: **breakp**) 411 | *target-pane* をそれを含んでいるウィンドウから切り離し 412 | 新しいウィンドウで単独のペインにします。 **-d** が与えられた場合、 413 | 新しいウィンドウはカレントウィンドウにはなりません。 414 | 415 | **choose-client** [**-t** *target-window*] [*template*] 416 | ウィンドウをクライアント選択モードにし、 417 | クライアントをリストから対話的に選択できるようにします。 418 | クライアントが選択された後、 *template* の 419 | '%%' をクライアントの pty(4) パスで置き換えた結果をコマンドとして実行します。 420 | *template* が与えられなければ `"detach-client -t '%%'"` が使われます。 421 | このコマンドは **tmux** 内部でのみ動作します。 422 | 423 | **choose-session** [**-t** *target-window*] [*template*] 424 | ウィンドウをセッション選択モードにし、 425 | セッションをリストから対話的に選択できるようにします。 426 | セッションが選択された後、 *template* の 427 | '%%' をセッション名で置き換えた結果をコマンドとして実行します。 428 | *template* が与えられなければ `"switch-client -t '%%'"` が使われます。 429 | このコマンドは **tmux** 内部でのみ動作します。 430 | 431 | **choose-window** [**-t** *target-window*] [*template*] 432 | ウィンドウをウィンドウ選択モードにし、 433 | ウィンドウをリストから対話的に選択できるようにします。 434 | ウィンドウが選択された後、 *template* の 435 | '%%' をセッション名とウィンドウ番号で置き換えた結果をコマンドとして実行します。 436 | *template* が与えられなければ `"select-window -t '%%'"` が使われます。 437 | このコマンドは **tmux** 内部でのみ動作します。 438 | 439 | **display-panes** [**-t** *target-client*] 440 | (別名: **displayp**) 441 | *target-client* で表示されている各ペインにインジケータを表示します。 442 | **display-panes-time** 及び 443 | **display-panes-colour** セッションオプションを参照してください。 444 | インジケータがスクリーン上にある間、ペインを 445 | '0' から '9' キーで選択することができます。 446 | 447 | **down-pane** [**-t** *target-pane*] 448 | (別名: **downp**) 449 | 下のペインへ移動します。 450 | 451 | **find-window** [**-t** *target-window*] *match-string* 452 | (別名: **findw**) 453 | fnmatch(3) パターンの *match-string* 454 | でウィンドウ名、タイトル、表示されている内容 (履歴は除く) 455 | から検索します。ウィンドウが 1 つだけマッチした場合、それが自動的に選択され、 456 | そうでなければ選択リストが表示されます。 457 | このコマンドは **tmux** 内部でのみ動作します。 458 | 459 | **kill-pane** [**-t** *target-pane*] 460 | (別名: **killp**) 461 | 与えられたペインを破棄します。 462 | それが含まれていたウィンドウにペインが残っていない場合、 463 | そのウィンドウも破棄されます。 464 | 465 | **kill-window** [**-t** *target-window*] 466 | (別名: **killw**) 467 | カレントウィンドウまたは *target-window* のウィンドウを kill します。 468 | リンクしているセッションからそれを取り除きます。 469 | 470 | **last-window** [**-t** *target-session*] 471 | (別名: **last**) 472 | 最後の (直前に選択されていた) ウィンドウを選択します。 473 | *target-session* が指定されなかった場合、 474 | カレントセッションの最後のウィンドウを選択します。 475 | 476 | **link-window** [**-dk**] [**-s** *src-window*] [**-t** *dst-window*] 477 | (別名: **linkw**) 478 | *src-window* のウィンドウを指定された *dst-window* へリンクします。 479 | *dst-window* が指定されそのようなウィンドウが存在しない場合、 480 | *src-window* はそこへリンクされます。 481 | **-k** が与えられ *dst-window* が存在する場合、それは kill されます。 482 | そうでなければエラーになります。 **-d** が与えられた場合、 483 | 新しくリンクされたウィンドウは選択されません。 484 | 485 | **list-windows** [**-t** *target-session*] 486 | (別名: **lsw**) 487 | カレントセッションまたは *target-session* のウィンドウを列挙します。 488 | 489 | **move-window** [**-d**] [**-s** *src-window*] [**-t** *dst-window*] 490 | (別名: **movew**) 491 | *src-window* のウィンドウが *dst-window* へ移動される点以外は 492 | **link-window** と同様です。 493 | 494 | **new-window** [**-dk**] [**-n** *window-name*] [**-t** *target-window*] [*command*] 495 | (別名: **neww**) 496 | 新しいウィンドウを作成します。 **-d** が与えられた場合、 497 | セッションは新しいウィンドウをカレントウィンドウにはしません。 498 | *target-window* は作成されるウィンドウを表現し、 499 | 対象が既に存在している場合、それを破棄する 500 | **-k** フラグが使われていない限りはエラーが表示されます。 501 | *command* は実行するコマンドです。 502 | *command* が指定されなければ、デフォルトコマンドが使われます。 503 | 504 | **tmux** 内部で実行される全てのプログラムでは、 505 | 環境変数 TERM に 'screen' が設定されていなければなりません。 506 | 新しいウィンドウは環境に "TERM=screen" を自動的に追加しますが、 507 | シェルのスタートアップファイルでこれをリセットしないよう注意してください。 508 | 509 | **next-layout** [**-t** *target-window*] 510 | (別名: **nextl**) 511 | ウィンドウを次のレイアウトにし、ペインを再配置して合わせます。 512 | 513 | **next-window** [**-a**] [**-t** *target-session*] 514 | (別名: **next**) 515 | セッションの次のウィンドウへ移動します。 **-a** が使われた場合、 516 | 次のウィンドウへの移動時にベル、動作、アラートを発生させます。 517 | 518 | **previous-window** [**-a**] [**-t** *target-session*] 519 | (別名: **prev**) 520 | セッションの前のウィンドウへ移動します。 **-a** が使われた場合、 521 | 前のウィンドウへの移動時にベル、動作、アラートを発生させます。 522 | 523 | **rename-window** [**-t** *target-window*] *new-name* 524 | (別名: **renamew**) 525 | カレントウィンドウまたは指定されているなら 526 | *target-window* のウィンドウを *new-name* へリネームします。 527 | 528 | **resize-pane** [**-DLRU**] [**-t** *target-pane*] [*adjustment*] 529 | (別名: **resizep**) 530 | ペインを **-U** なら上へ (デフォルト)、 **-D** なら下へ、 531 | **-L** なら左へ、**-R** なら右へリサイズします。 532 | *adjustment* は行数かセル数で与えます (デフォルトは1)。 533 | 534 | **respawn-window** [**-k**] [**-t** *target-window*] [*command*] 535 | (別名: **respawnw**) 536 | コマンドが終了しているウィンドウを再度アクティブにします 537 | (**remain-on-exit** ウィンドウオプションを参照)。 538 | *command* が与えられなければ、 539 | ウィンドウが作成されたときのコマンドが実行されます。 540 | ウィンドウは、動作中のコマンドを kill する **-k** が与えられていない限り、 541 | 非アクティブになっていなければなりません。 542 | 543 | **rotate-window** [**-DU**] [**-t** *target-window*] 544 | (別名: **rotatew**) 545 | ウィンドウ内のペインの位置を、 **-U** で上へ (数的に低い方へ)、または下へ 546 | (数的に高い方へ) 回転します。 547 | 548 | **select-layout** [**-t** *target-window*] [*layout-name*] 549 | (別名: **selectl**) 550 | ウィンドウの特定のレイアウトを選びます。 *layout-name* が与えられなければ、 551 | 最後に使われたレイアウトが (あれば) 再度適用されます。 552 | 553 | **select-pane** [**-t** *target-pane*] 554 | (別名: **selectp**) 555 | ペイン *target-pane* をウィンドウ *target-window* でアクティブにします。 556 | 557 | **select-window** [**-t** *target-window*] 558 | (別名: **selectw**) 559 | *target-window* のウィンドウを選択します。 560 | 561 | **split-window** [**-dhv**] [**-l** *size* | **-p** *percentage*] [**-t** *target-window*] [*command*] 562 | (別名: **splitw**) 563 | アクティブペインを分割して新しいペインを作成します。 564 | **-h** で水平分割、 **-v** で垂直分割、 565 | どちらも指定されなければ **-v** になります [1]_ 。 566 | **-l**, **-p** オプションでは新しいウィンドウのサイズを 567 | (垂直分割なら) 行数、(水平分割なら) セル数で、 568 | またはパーセンテージでそれぞれ指定します。 569 | その他のオプションは全て **new-window** コマンドと同様です。 570 | 571 | **swap-pane** [**-dDU**] [**-s** *src-pane*] [**-t** *dst-pane*] 572 | (別名: **swapp**) 573 | 2 つのペインを入れ替えます。 574 | **-U** が使われ **-s** で入力ペインが指定されなかった場合、 575 | *dst-pane* は前のペイン(数的に前)と、もしくは 576 | **-D** なら次のペイン(数的に後)と入れ替えられます。 577 | 578 | **swap-window** [**-d**] [**-s** *src-window*] [**-t** *dst-window*] 579 | (別名: **swapw**) 580 | 入力ウィンドウと出力ウィンドウが入れ替えられる点以外は 581 | **link-window** と同様です。 582 | *src-window* のウィンドウが存在しなければエラーになります。 583 | 584 | **unlink-window** [**-k**] [**-t** *target-window*] 585 | (別名: **unlinkw**) 586 | *target-window* のリンクを解除します。 **-k** が与えられなければ、 587 | ウィンドウは複数のセッションにリンクしている場合のみリンクを解除できます。 588 | ウィンドウはどのセッションにもリンクしていない状態にはできません。 589 | **-k** が指定されウィンドウが 1 つのセッションにだけリンクしている場合、 590 | リンクが解除され破棄されます。 591 | 592 | **up-pane** [**-t** *target-pane*] 593 | (別名: **upp**) 594 | 上のペインへ移動します。 595 | 596 | .. [1] 訳注: 水平分割はペインが水平に並ぶように分割する。 597 | VIM における水平分割/垂直分割の意味とは逆。 598 | 599 | ============================================================================== 600 | キーバインド 601 | ============================================================================== 602 | 603 | キーバインドに関するコマンドは以下の通りです: 604 | 605 | **bind-key** [**-cnr**] [**-t** *key-table*] *key* *command* [*arguments*] 606 | (別名: **bind**) 607 | キー *key* を *command* に割り当てます。キーは 608 | Ctrl キーとして 'C-' または '^' を、 609 | Alt (meta) キーとして 'M-' を先頭に指定できます。 610 | デフォルト (**-t** なし) では (普通プレフィックスキーでアクティブになる) 611 | プライマリキーバインドが変更され、このケースで **-n** が指定された場合、 612 | プレフィックスキーは使わなくてもよくなり、 613 | コマンドは単独のキーに割り当てられます。 614 | **-r** フラグはこのキーをリピートできるようにします。 615 | **repeat-time** オプションを参照してください。 616 | 617 | **-t** が与えられた場合、 *key* は *key-table* 内に割り当てられ、 618 | **-c** ありでコマンドモード用に、 **-c** なしでノーマルモード用になります。 619 | デフォルトの割り当てと使えるコマンドを観るには 620 | **list-keys** コマンドを観てください。 621 | 622 | **list-keys** [**-t** *key-table*] 623 | (別名: **lsk**) 624 | 全てのキーバインドを列挙します。 **-t** なしだとプライマリキーバインド 625 | ―これらはプレフィックスキーに続いたときに実行される― が出力されます。 626 | プレフィックスキーなしで割り当てられたキー 627 | (**bind-key** **-n** を参照) は角括弧で囲まれます。 628 | 629 | **-t** ありだと *key-table* 内のキーバインドが列挙され、 630 | これは *vi-edit*, *emacs-edit*, *vi-choice*, *emacs-choice*, 631 | *vi-copy*, *emacs-copy* のいずれかです。 632 | 633 | **send-keys** [**-t** *target-pane*] *key* *...* 634 | (別名: **send**) 635 | ウィンドウに 1 つ以上のキーを送信します。各引数 *key* は 636 | ('C-a' や 'npage' のような) キー名で、文字列がキーとして認識できなければ、 637 | 一連の文字群として送信されます。全引数は最初から最後まで連続的に送信されます。 638 | 639 | **send-prefix** [**-t** *target-pane*] 640 | プレフィックスキーを、それが押されたものとしてウィンドウに送信します。 641 | 642 | **unbind-key** [**-cn**] [**-t** *key-table*] *key* 643 | (別名: **unbind**) 644 | *key* に割り当てられたコマンドを解除します。 645 | **-t** なしだとプライマリキーバインドが変更され、 646 | このケースで **-n** が指定された場合、 647 | プレフィックスなしで *key* に割り当てられたコマンドが(あれば)取り除かれます。 648 | 649 | **-t** が与えられた場合、 **-c** ありでコマンドモード用の、 650 | **-c** なしでノーマルモード用の *key* が *key-table* から解除されます。 651 | 652 | ============================================================================== 653 | オプション 654 | ============================================================================== 655 | 656 | 様々なオプションを変更することで 657 | **tmux** の見た目と振る舞いを変更することができます。 658 | \ *セッションオプション*\ と\ *ウィンドウオプション*\ の 659 | 2 種類のオプションがあります。 660 | 661 | セッションのそれぞれが個別にセッションオプションの集合を保持し、 662 | それとは別のグローバルなセッションオプションの集合が存在します。 663 | 特に設定されたオプションを持たないセッションオプションはグローバルなセッションオプションから値を引き継ぎます。 664 | セッションオプションは **set-option** コマンドで設定や設定の解除がされ、 665 | **show-options** コマンドで列挙することができます。 666 | 利用できるセッションオプションは **set-option** コマンドの項で列挙されています。 667 | 668 | 同様に、ウィンドウオプションの集合は各ウィンドウに属しており、 669 | 設定されていないオプションに引き継がれるグローバルなウィンドウオプションの集合があります。 670 | ウィンドウオプションは **set-window-option** コマンドで変更され、 671 | **show-window-options** コマンドで列挙することができます。 672 | 全ウィンドウオプションは 673 | **set-window-option** コマンドの項でドキュメントされています。 674 | 675 | オプションを設定するコマンドは以下の通りです: 676 | 677 | **set-option** [**-agu**] [**-t** *target-session*] *option* *value* 678 | (別名: **set**) 679 | セッションオプションを設定します。 680 | **-a** ありで、オプションが文字列を受け付けるなら 681 | *value* は既存の設定に追加されます。 682 | **-g** が指定された場合、グローバルなセッションオプションに設定されます。 683 | **-u** フラグはオプションの設定を解除し、 684 | セッションはそのオプションをグローバルオプションから引き継ぎます。 685 | グローバルオプションの設定を解除することはできません。 686 | 687 | 利用可能なセッションオプション: 688 | 689 | **base-index** *index* 690 | 新しいウィンドウが作成されたときに、 691 | 使用されていない番号を探し始めるベースの番号を設定します。 692 | デフォルトは 0 です。 693 | 694 | **bell-action** [**any** | **none** | **current**] 695 | ウィンドウベルのアクションを設定します。 696 | **any** はセッションにリンクしているウィンドウのどれかでベルが発生すると、 697 | そのセッションのカレントウィンドウでベルを発生させます。 698 | **none** は全てのベルを無視し、 699 | **current** はカレントウィンドウ以外のベルを無視します。 700 | 701 | **buffer-limit** *number* 702 | 各セッションで保持するバッファ数を設定します。 703 | 新しいバッファはスタックの先頭に追加され、 704 | この最大数を超えないよう古いものを底から削除されます。 705 | 706 | **default-command** *command* 707 | 新しいウィンドウで使われるコマンドを *command* に設定します。 708 | これには sh(1) コマンドの一種が指定できます。 709 | デフォルトは空文字列で、これは **tmux** に **default-shell** 710 | オプションの値をつかってログインシェルを実行することを指示します。 711 | 712 | **default-shell** *path* 713 | デフォルトのシェルを指定します。これは **default-command** 714 | オプションが空の場合に新しいウィンドウのログインシェルとして利用されるもので、 715 | 実行可能ファイルのフルパスでなければなりません。 716 | **tmux** は開始時に環境変数 SHELL 、またはシェルが 717 | *getpwuid(3)* で返す値、または 718 | */bin/sh* の中から一番適したものをデフォルト値として設定します。 719 | **tmux** をログインシェルとして使うなら、 720 | このオプションは設定しておくべきです。 721 | 722 | **default-path** *path* 723 | キーまたはプロンプトから対話的に作成されるプロセスの、 724 | デフォルトの作業ディレクトリを設定します。 725 | デフォルトはサーバー起動時のカレント作業ディレクトリです。 726 | 727 | **default-terminal** *terminal* 728 | このセッションで作成される新しいウィンドウのデフォルトの端末を設定します。 729 | これは環境変数 TERM のデフォルト値です。 **tmux** を正しく動作させるために、 730 | これには 'screen' かそれから派生したものを設定\ *しなければなりません*\ 。 731 | 732 | **display-panes-colour** *colour* 733 | **display-panes** コマンドで使う色を設定します。 734 | 735 | **display-panes-time** *time* 736 | **display-panes** コマンドで表示されたインジケータが消えるまでの時間をミリ秒で設定します。 737 | 738 | **display-time** *time* 739 | ステータスラインメッセージや他のスクリーン上のインジケータが表示される時間を設定します。 740 | *time* はミリ秒です。 741 | 742 | **history-limit** *lines* 743 | ウィンドウ履歴で保持される最大行数を設定します。 744 | この設定は新しいウィンドウにのみ適用され、既存のウィンドウ履歴はリサイズされず、 745 | それらが作成されたときの制限を保ちます。 746 | 747 | **lock-after-time** *number* 748 | *number* 秒の無操作でサーバーをロックします。 749 | デフォルトはオフ (0 に設定) です。 750 | これはセッションオプションとしては効果がなく、 751 | **-g** をつかってグローバルオプションとして設定されなければなりません。 752 | 間違ったパスワードが入力されたとき、 753 | **tmux** は login(1) の振る舞いに従って、 754 | 次のパスワード入力を、延長したタイムアウトまで無視します。 755 | 756 | **message-attr** *attributes* 757 | ステータスラインメッセージの属性を設定します。 758 | *attributes* は **default** か、 759 | **bright** (または **bold**), **dim**, **underscore**, **blink**, 760 | **reverse**, **hidden**, **italics** の 761 | 1 つ以上のコンマ区切りリストのどちらかです。 762 | 763 | **message-bg** *colour* 764 | ステータスラインメッセージの背景色を設定します。 765 | *colour* は **black**, **red**, **green**, **yellow**, **blue**, 766 | **magenta**, **cyan**, **white**, 767 | 256 色パレットの **colour0** から **colour255**, 768 | **default** のいずれか 1 つです。 769 | 770 | **message-fg** *colour* 771 | ステータスラインメッセージの前景色を設定します。 772 | 773 | **prefix** *key* 774 | プレフィックスキーを設定します。 775 | 776 | **repeat-time** *time* 777 | 指定した *time* ミリ秒 (デフォルトは500) の間、 778 | 複数のコマンドを再度プレフィックスキーを押さずに入力することができます。 779 | キーを割り当てるときに **bind-key** で 780 | **-r** フラグを使うことでキーリピートができるようになります。 781 | **resize-pane** コマンドのデフォルトのキーバインドはリピートが有効になっています。 782 | 783 | **set-remain-on-exit** [**on** | **off**] 784 | このセッションから作られたウィンドウに対して、 785 | **remain-on-exit** ウィンドウオプションを設定します。 786 | 787 | **set-titles** [**on** | **off**] 788 | 端末が xterm のようなら xterm コード 789 | `\e]2;...\007` を使ってウィンドウタイトルを設定しようとします。 790 | このオプションはデフォルトでオフです。 791 | elinks は環境変数 STY が設定されている場合、 792 | ウィンドウタイトルを設定しようとするだけであることに注意してください。 793 | 794 | **set-titles-string** *string* 795 | **set-titles** がオンならウィンドウタイトルに *string* が使われます。 796 | キャラクタシーケンスは 797 | **status-left** オプションと同じように置き換えられます。 798 | 799 | **status** [**on** | **off**] 800 | ステータスラインを表示または非表示にします。 801 | 802 | **status-attr** *attributes* 803 | ステータスラインの属性を設定します。 804 | 805 | **status-bg** *colour* 806 | ステータスラインの背景色を設定します。 807 | 808 | **status-fg** *colour* 809 | ステータスラインの前景色を設定します。 810 | 811 | **status-interval** *interval* 812 | ステータスバーを *interval* 秒毎に更新します。 813 | デフォルトでは更新は 15 秒毎に発生します。 814 | 0 を設定すると周期的な再描画は無効になります。 815 | 816 | **status-justify** [**left** | **centre** | **right**] 817 | ステータスラインのウィンドウ一覧部の位置を、左、中央、右揃えで設定します。 818 | 819 | **status-keys** [**vi** | **emacs**] 820 | コマンドプロンプトなど、ステータスラインで 821 | vi または emacs スタイルのキーバインドを利用します。デフォルトはemacsです。 822 | 823 | **status-left** *string* 824 | ステータスバーの左に *string* を表示します。 825 | *string* は先に strftime(3) を通してから使われます。 826 | デフォルトではセッション名が表示されます。 827 | *string* に次の特別なキャラクタシーケンス [2]_ を含めることができます: 828 | 829 | =================== ========================== 830 | キャラクタペア [2]_ 置換先 831 | =================== ========================== 832 | #(コマンド) コマンドの出力の 1 行目 833 | #[属性] 色または属性の変更 834 | #H ローカルホストのホスト名 835 | #I カレントウィンドウ番号 836 | #P カレントペイン番号 837 | #S セッション名 838 | #T カレントウィンドウタイトル 839 | #W カレントウィンドウ名 840 | ## リテラルの '#' 841 | =================== ========================== 842 | 843 | #(コマンド)形は 'コマンド' をシェルコマンドとして実行し、 844 | その出力の 1 行目を挿入します。 845 | #[属性]は属性をコンマ区切りリストで指定でき、 846 | それらは前景色を設定する 'fg=色' 、背景色を設定する 'bg=色'、 847 | **message-attr** オプションの項で述べられている属性のいずれかになります。 848 | 例:: 849 | 850 | #(sysctl vm.loadavg) 851 | #[fg=yellow,bold]#(apm -l)%%#[default] [#S] 852 | 853 | 必要に応じて '#24T' のように、 854 | 最大長を指定するために数値を前に付けることができます。 855 | 856 | デフォルトでは、 *string* を UTF-8 とは解釈しないので、 857 | UTF-8 を有効にするには **status-utf8** オプションを使用してください。 858 | 859 | .. [2] 訳注:キャラクタシーケンス (character sequence) 860 | とキャラクタペア (character pair) は同義だと思われる。 861 | 862 | **status-left-attr** *attributes* 863 | ステータスラインの左部分の属性を設定します。 864 | 865 | **status-left-fg** *colour* 866 | ステータスラインの左部分の前景色を設定します。 867 | 868 | **status-left-bg** *colour* 869 | ステータスラインの左部分の背景色を設定します。 870 | 871 | **status-left-length** *length* 872 | ステータスバーの左部の最大長を設定します。デフォルトは 10 です。 873 | 874 | **status-right** *string* 875 | ステータスバーの右に *string* を表示します。 876 | デフォルトでは日付と時刻が表示されます。 877 | **status-left** と同じように *string* は strftime(3) に通され、 878 | キャラクタペアは置換され、 879 | UTF-8 は **status-utf8** オプションに依存します。 880 | 881 | **status-right-attr** *attributes* 882 | ステータスラインの右部分の属性を設定します。 883 | 884 | **status-right-fg** *colour* 885 | ステータスラインの右部分の前景色を設定します。 886 | 887 | **status-right-bg** *colour* 888 | ステータスラインの右部分の背景色を設定します。 889 | 890 | **status-right-length** *length* 891 | ステータスバーの右部の最大長を設定します。デフォルトは 40 です。 892 | 893 | **status-utf8** [**on** | **off**] 894 | **status-left** 及び **status-right** の文字列中のtop-bit-set文字 [3]_ を 895 | UTF-8 として扱うように **tmux** に指示します。 896 | これはワイド文字に対して特に重要です。 897 | このオプションはデフォルトでオフです。 898 | 899 | .. [3] 訳注: 非ASCII文字 900 | 901 | **terminal-overrides** *string* 902 | terminfo(5) を使って読み込まれた端末の記述を上書きするエントリーのリストです。 903 | *string* はコンマ区切りリストで、 904 | 各アイテムは (fnmatch(3) を使ってマッチする) 端末タイプのパターンと 905 | *name=value* 項目のエントリーからなるコロン区切り文字列です。 906 | 907 | 例として、全ての端末タイプで terminfo(5) エントリー 'clear' を 908 | '`\e[H\e[2J`' に、端末タイプ 'rxvt' でエントリー 'dch1' を 909 | '`\e[P`' に設定するには、 910 | このような文字列がオプションにセットされるでしょう:: 911 | 912 | "*:clear=\e[H\e[2J,rxvt:dch1=\e[P" 913 | 914 | 端末エントリーの値は解釈される前に strunvis(3) に通されます。 915 | デフォルト値は、 88 または 256 色をサポートする端末の 916 | 'colors' エントリーを強制的に修正します:: 917 | 918 | "*88col*:colors=88,*256col*:colors=256" 919 | 920 | 921 | **update-environment** *variables* 922 | 新しいセッションが作成されたときまたは既存のセッションがアタッチされたときに、 923 | セッションの環境にコピーされる環境変数のリストのスペース区切り文字列を設定します。 924 | コピー元の環境に存在しない変数を設定するとセッションの環境から削除されます 925 | (**-r** が与えられた **set-environment** コマンドのように)。 926 | デフォルトは "DISPLAY WINDOWID SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID 927 | SSH_CONNECTION" です。 928 | 929 | **visual-activity** [**on** | **off**] 930 | オンなら、 **monitor-activity** 931 | ウィンドウオプションを有効にしたウィンドウで動作があったとき、 932 | ステータスラインメッセージを表示します。 933 | 934 | 935 | **visual-bell** [**on** | **off**] 936 | このオプションがオンなら、ベルを端末に通す (普通それは音を鳴らす) 937 | 代わりにメッセージを表示します。 **bell-action** も参照してください。 938 | 939 | **visual-content** [**on** | **off**] 940 | **visual-activity** のように、 941 | **monitor-content** ウィンドウオプションを有効にしたウィンドウで、 942 | 指定した内容が現れたときメッセージを表示します。 943 | 944 | **set-window-option** [**-agu**] [**-t** *target-window*] *option* *value* 945 | (別名: **setw**) 946 | ウィンドウオプションを設定します。 **-a**, **-g**, **-u** フラグは 947 | **set-option** コマンドと同じように動作します。 948 | 949 | サポートされるウィンドウオプション: 950 | 951 | **aggressive-resize** [**on** | **off**] 952 | 選択されたウィンドウを積極的にリサイズします。これは **tmux** が、 953 | アタッチされた中での最小のセッションではなく、 954 | カレントウィンドウが同じ中での最小のセッションのサイズに、 955 | ウィンドウをリサイズするという意味です。ウィンドウは、 956 | 別のセッションでカレントウィンドウが変更されたときにリサイズします。 957 | このオプションは SIGWINCH をサポートするフルスクリーンプログラムには向いていますが、 958 | シェルのような対話型プログラムには向いていません。 959 | 960 | **automatic-rename** [**on** | **off**] 961 | ウィンドウの自動リネームを制御します。 962 | ―サポートしているプラットフォーム上で― この設定が有効なとき、 963 | **tmux** はそこで実行されているコマンドを反映した名前でウィンドウをリネームしようとします。 964 | 名前の指定を **new-window** や **new-session** での作成時や、 965 | その後の **rename-window** で行ったとき、 966 | このフラグは自動的に無効になります。 967 | 以下のようにしてグローバルでオフに切り替えることができます:: 968 | 969 | set-window-option -g automatic-rename off 970 | 971 | **clock-mode-colour** *colour* 972 | 時計の色を設定します。 973 | 974 | **clock-mode-style** [**12** | **24**] 975 | 時計の時のフォーマットを設定します。 976 | 977 | **force-height** *height* 978 | 979 | **force-width** *width* 980 | **tmux** がウィンドウを 981 | *width* または *height* を超えてリサイズしないようにします。 982 | 値 0 はデフォルトの無制限の設定に戻します。 983 | 984 | **main-pane-width** *width* 985 | 986 | **main-pane-height** *height* 987 | **main-horizontal** または **main-vertical** レイアウトにおける 988 | (左または上の) 主ペインの、 *width* または *height* を設定します。 989 | 990 | **mode-attr** *attributes* 991 | ウィンドウモードの属性を設定します。 992 | 993 | **mode-bg** *colour* 994 | ウィンドウモードの背景色を設定します。 995 | 996 | **mode-fg** *colour* 997 | ウィンドウモードの前景色を設定します。 998 | 999 | **mode-keys** [**vi** | **emacs**] 1000 | スクロールモード、コピーモード、選択モードで 1001 | vi または emacs スタイルのキーバインドを使います。 1002 | キーバインドのデフォルトは emacs です。 1003 | 1004 | **mode-mouse** [**on** | **off**] 1005 | モードでのマウスの状態です。 オンなら **tmux** はマウスクリックに対して、 1006 | コピーモードでカーソルを動かしたり選択モードで選択することで反応します。 1007 | 1008 | **monitor-activity** [**on** | **off**] 1009 | ウィンドウでの動作を監視します。 1010 | ウィンドウで動作があるとステータスラインでハイライトされます。 1011 | 1012 | **monitor-content** *match-string* 1013 | ウィンドウの内容を監視します。 1014 | ウィンドウで fnmatch(3) パターンの *match-string* が現れたとき、 1015 | ステータスラインでハイライトされます。 1016 | 1017 | **remain-on-exit** [**on** | **off**] 1018 | このフラグが設定されたウィンドウは、 1019 | そこで実行されているプログラムが終了しても破棄されません。 1020 | そのウィンドウは 1021 | **respawn-window** コマンドで再度アクティブにすることができます。 1022 | 1023 | **utf8** [**on** | **off**] 1024 | このウィンドウで UTF-8 シーケンスが現れることに備えるよう **tmux** に指示します。 1025 | 1026 | **window-status-attr** *attributes* 1027 | ステータスラインの各ウィンドウの属性を設定します。 1028 | 1029 | **window-status-bg** *colour* 1030 | ステータスラインの各ウィンドウの背景色を設定します。 1031 | 1032 | **window-status-fg** *colour* 1033 | ステータスラインの各ウィンドウの前景色を設定します。 1034 | 1035 | **window-status-current-attr** *attributes* 1036 | ステータスラインのアクティブウィンドウの属性を設定します。 1037 | 1038 | **window-status-current-bg** *colour* 1039 | ステータスラインのアクティブウィンドウの背景色を設定します。 1040 | 1041 | **window-status-current-fg** *colour* 1042 | ステータスラインのアクティブウィンドウの前景色を設定します。 1043 | 1044 | **xterm-keys** [**on** | **off**] 1045 | このオプションが設定されると、 **tmux** は 1046 | xterm(1) スタイルのファンクションキーシーケンスを生成します。 1047 | Shift, Alt, Ctrl のようなモディファイヤを表すものも含まれます。 1048 | 1049 | **show-options** [**-g**] [**-t** *target-session*] 1050 | (別名: **show**) 1051 | *target-session* の、または **-g** ありならグローバルセッションの、 1052 | セッションオプションを表示します。 1053 | 1054 | 1055 | **show-window-options** [**-g**] [**-t** *target-window*] 1056 | (別名: **showw**) 1057 | *target-window* の、または **-g** ありならグローバルウィンドウの、 1058 | ウィンドウオプションを表示します。 1059 | 1060 | ============================================================================== 1061 | 環境 1062 | ============================================================================== 1063 | 1064 | サーバーの起動時に **tmux** は環境を\ *グローバル環境*\ にコピーします。 1065 | 加えて、各セッションは\ *セッション環境*\ を持っています。 1066 | ウィンドウの作成時にセッション環境とグローバル環境は、 1067 | セッション環境で上書きしながらマージされます。 1068 | これが新しいプロセスに引き継がれる初期環境です。 1069 | 1070 | **update-environment** セッションオプションは、 1071 | 新しいセッションが作成されたときや古いセッションが再度アタッチされたときに、 1072 | セッション環境をクライアントから更新するのに使えます。 1073 | **tmux** は 内部からコマンドを実行できるよう、 1074 | TMUX 変数をいくつかの内部情報で、 1075 | TERM 変数を正しい端末設定である 'screen' に初期化します。 1076 | 1077 | 環境を変更・閲覧するコマンド: 1078 | 1079 | **set-environment** [**-gru**] [**-t** *target-session*] *name* [*value*] 1080 | 環境変数を設定または設定解除します。 1081 | **-g** が使われると変更はグローバル環境に対して行われます。 1082 | そうでなければ、 *target-session* のセッション環境に適用されます。 1083 | **-u** フラグは設定を解除します。 1084 | **-r** は新しいプロセスが開始される前に環境から変数が削除されるようにします。 1085 | 1086 | **show-environment** [**-g**] [**-t** *target-session*] 1087 | *target-session* の環境を、 1088 | または **-g** ありならグローバル環境を、表示します。 1089 | 環境から削除された変数は '-' で始まります。 1090 | 1091 | ============================================================================== 1092 | ステータスライン 1093 | ============================================================================== 1094 | 1095 | **tmux** は各端末の最下行に表示される任意のステータスラインを持っています。 1096 | デフォルトではステータスラインは有効で 1097 | (**status** セッションオプションで無効にできます)、 1098 | 左から順に、角括弧付きカレントセッション名、ウィンドウリスト、 1099 | ダブルクォート付きカレントウィンドウタイトル、時刻、日付が配置されています。 1100 | 1101 | ステータスラインは 3 つの部分から成ります。設定可能な左と右のセクション 1102 | (時刻やシェルコマンドの出力のような動的コンテンツを置くことができます。 1103 | **status-left**, **status-left-length**, **status-right**, 1104 | **status-right-length** オプションを参照してください。) 1105 | と中央のウィンドウリストです。 1106 | ウィンドウリストはカレントセッションでのウィンドウの番号、名前、 1107 | (あれば) フラグを数値の昇順で表示します。 1108 | フラグはウィンドウ名に付加される、以下に挙げた記号のいずれかです: 1109 | 1110 | ==== ============================================ 1111 | 記号 意味 1112 | ==== ============================================ 1113 | `*` カレントウィンドウ 1114 | `-` (直前に選択された) 最後のウィンドウ 1115 | `#` ウィンドウは監視されていて動作が検出された 1116 | `!` ウィンドウでベルが発生した 1117 | `+` ウィンドウの内容が監視されていてそれが現れた 1118 | ==== ============================================ 1119 | 1120 | 記号 `#` は **monitor-activity** ウィンドウオプションに、 1121 | `+` は **monitor-content** ウィンドウオプションに関係しています。 1122 | アラート (ベル、動作、内容) があると、ウィンドウ名は反転色で表示されます。 1123 | ステータスラインの色と属性は設定可能で、ステータスライン全体は 1124 | **status-attr**, **status-fg**, **status-bg** セッションオプションを、 1125 | 個々のウィンドウは **window-status-attr**, **window-status-fg**, 1126 | **window-status-bg** ウィンドウオプションを使います。 1127 | 1128 | ステータスラインは変更があれば周期的に自動更新され、その周期は 1129 | **status-interval** セッションオプションで制御できます。 1130 | 1131 | ステータスラインに関するコマンドは以下の通りです: 1132 | 1133 | **command-prompt** [**-p** *prompts*] [**-t** *target-client*] [*template*] 1134 | クライアントでコマンドプロンプトを開きます。 1135 | **tmux** 内部からコマンドを対話的に実行するのに使えます。 1136 | *template* が指定された場合、コマンドとして使われます。 1137 | **-p** が与えられた場合、 1138 | *prompts* は順に表示されるプロンプトのコンマ区切りリストです。 1139 | そうでなければ 1 つのプロンプトが表示され、それは 1140 | *template* が与えられているならそこから構築し、それ以外なら ':' になります。 1141 | コマンドが実行される前に、最初に現れる文字列 '%%' と全ての '%1' 1142 | は最初のプロンプトでの入力で置き換えられ、 1143 | 次の '%%' と全ての '%2' 1144 | は 2 回目のプロンプトでの入力で置き換えられ、以下同様の処理が行われます。 1145 | 9 回までプロンプトでの入力が置き換えられます('%1' から '%9')。 1146 | 1147 | **confirm-before** [**-t** *target-client*] *command* 1148 | (別名: **confirm**) 1149 | コマンドを実行する前に確認します。 1150 | このコマンドは **tmux** 内部でのみ動作します。 1151 | 1152 | **display-message** [**-t** *target-client*] [*message*] 1153 | (別名: **display**) 1154 | ステータスラインにメッセージ 1155 | (**status-left** オプションを参照) を表示します。 1156 | 1157 | **select-prompt** [**-t** *target-client*] 1158 | *target-client* の内部で、 1159 | ウィンドウ番号を対話的に入力できるプロンプトを開きます。 1160 | 1161 | ============================================================================== 1162 | バッファ 1163 | ============================================================================== 1164 | 1165 | **tmux** は各セッションで\ *ペーストバッファ*\ のスタックが管理されています。 1166 | **buffer-limit** オプションの値までは保持され、 1167 | 新しいバッファが追加されたとき、スタックの底のバッファが削除されます。 1168 | バッファは **copy-mode** 及び 1169 | **set-buffer** コマンドを使って追加することができ、 1170 | **paste-buffer** コマンドでウィンドウに貼り付けることができます。 1171 | 1172 | 各ウィンドウで設定可能な履歴バッファもまた管理されています。 1173 | デフォルトでは 2000 行まで保持され、これは 1174 | **history-limit** オプションで変更できます(**set-option** コマンド参照)。 1175 | 1176 | バッファのコマンドは以下の通りです: 1177 | 1178 | **clear-history** [**-t** *target-pane*] 1179 | (別名: **clearhist**) 1180 | 指定されたペインで履歴を削除して解放します。 1181 | 1182 | **copy-buffer** [**-a** *src-index*] [**-b** *dst-index*] [**-s** *src-session*] [**-t** *dst-session*] 1183 | (別名: **copyb**) 1184 | セッションのペーストバッファを別のセッションへコピーします。 1185 | セッションが指定されなければ、カレントセッションが代わりに使われます。 1186 | 1187 | **delete-buffer** [**-b** *buffer-index*] [**-t** *target-session*] 1188 | (別名: **deleteb**) 1189 | *buffer-index* の、または指定されなければ先頭のバッファが削除されます。 1190 | 1191 | **list-buffers** [**-t** *target-session*] 1192 | (別名: **lsb**) 1193 | 与えられたセッションのバッファを列挙します。 1194 | 1195 | **load-buffer** [**-b** *buffer-index*] [**-t** *target-session*] *path* 1196 | (別名: **loadb**) 1197 | 指定されたペーストバッファの内容を *path* から読み込みます。 1198 | 1199 | **paste-buffer** [**-dr**] [**-b** *buffer-index*] [**-t** *target-window*] 1200 | (別名: **pasteb**) 1201 | ペーストバッファの内容をカレントウィンドウに挿入します。 1202 | **-d** を付けるとスタックからそのペーストバッファの削除も行います。 1203 | 出力するとき、ペーストバッファに含まれるラインフィード (LF) 1204 | はキャリッジリターン (CR) に置き換えられます。 1205 | この変換は **-r** フラグで無効にできます。 1206 | 1207 | **save-buffer** [**-a**] [**-b** *buffer-index*] [**-t** *target-session*] *path* 1208 | (別名: **saveb**) 1209 | 指定されたペーストバッファの内容を *path* に保存します。 1210 | **-a** オプションは上書きではなく追記を行います。 1211 | 1212 | **set-buffer** [**-b** *buffer-index*] [**-t** *target-session*] *data* 1213 | (別名: **setb**) 1214 | 指定されたバッファの内容を *data* にします。 1215 | 1216 | **show-buffer** [**-b** *buffer-index*] [**-t** *target-session*] 1217 | (別名: **showb**) 1218 | 指定されたバッファの内容を表示します。 1219 | 1220 | ============================================================================== 1221 | その他 1222 | ============================================================================== 1223 | 1224 | その他のコマンドは以下の通りです: 1225 | 1226 | **clock-mode** [**-t** *target-pane*] 1227 | 大きな時計を表示します。 1228 | 1229 | **if-shell** *shell-command* *command* 1230 | (別名: **if**) 1231 | *shell-command* が成功した場合に *command* を実行します。 1232 | 1233 | 1234 | **lock-server** 1235 | (別名: **lock**) 1236 | Lock the server until a password is entered. 1237 | パスワードが入力されるまでサーバーをロックします。 1238 | 1239 | **server-info** 1240 | (別名: **info**) 1241 | サーバーの情報と端末の詳細を表示します。 1242 | 1243 | **set-password** [**-c**] *password* 1244 | (別名: **pass**) 1245 | サーバーのパスワードを設定します。 1246 | **-c** オプションを与えることで暗号化されたパスワードを指定することができます。 1247 | デフォルトではパスワードは空なので、サーバーをアンロックするとき 1248 | (**lock-server** コマンドを参照) 入力されたパスワードは何でも受け入れます。 1249 | 設定ファイルから暗号化されたパスワードを読み込ませるときに、 1250 | 変数の展開を防ぐには、シングルクォートで囲ってください。 1251 | 1252 | ============================================================================== 1253 | ファイル 1254 | ============================================================================== 1255 | 1256 | ~/.tmux.conf 1257 | デフォルトの **tmux** 設定ファイル。 1258 | 1259 | /etc/tmux.conf 1260 | システム全体の設定ファイル。 1261 | 1262 | ============================================================================== 1263 | 例 1264 | ============================================================================== 1265 | 1266 | 新しい **tmux** セッションを作成して vi(1) を実行:: 1267 | 1268 | $ tmux new-session vi 1269 | 1270 | コマンドの多くは別名(alias)という省略形を持っています。 1271 | new-session だと **new** になります:: 1272 | 1273 | $ tmux new vi 1274 | 1275 | また、コマンドの最短で一意な形を受け付けます。 1276 | 複数のコマンドがある場合は列挙されます:: 1277 | 1278 | $ tmux n 1279 | ambiguous command: n, could be: new-session, new-window, next-window 1280 | 1281 | アクティブなセッションにおいて、 'C-b c' (Ctrlに続いて 'b', 'c') 1282 | を入力することで新しいウィンドウを作成することができます。 1283 | 1284 | 'C-b 0' (ウィンドウ 0 を選択) や 'C-b 1' (ウィンドウ 1 を選択) 1285 | などでウィンドウを操作することができます。 'C-b n' で次のウィンドウを選択し、 1286 | 'C-b p' で前のウィンドウを選択します。 1287 | 1288 | 'C-b d' (または ssh(1) の切断のような外部イベント) 1289 | でセッションをデタッチでき、以下のコマンドで再アタッチできます:: 1290 | 1291 | $ tmux attach-session 1292 | 1293 | 'C-b ?' を入力するとカレントウィンドウの現在のキーバインドを列挙し、 1294 | 上と下でリストを操作し、 'q' でそれを終了します。 1295 | 1296 | **tmux** サーバーが起動したときに実行されるコマンドは 1297 | *~/.tmux.conf* 設定ファイルに配置することができます。一般的な例を挙げると: 1298 | 1299 | デフォルトのプレフィックスキーを変更:: 1300 | 1301 | set-option -g prefix C-a 1302 | unbind-key C-b 1303 | bind-key C-a send-prefix 1304 | 1305 | ステータスラインをOFF、または色変更:: 1306 | 1307 | set-option -g status off 1308 | set-option -g status-bg blue 1309 | 1310 | 他のオプションを設定、例えばデフォルトコマンドや 30 分の無操作でのロック:: 1311 | 1312 | set-option -g default-command "exec /bin/ksh" 1313 | set-option -g lock-after-time 1800 1314 | 1315 | 新しいキーバインドの作成:: 1316 | 1317 | bind-key b set-option status 1318 | bind-key / command-prompt "split-window 'exec man %%'" 1319 | bind-key S command-prompt "new-window -n %1 'ssh %1'" 1320 | 1321 | ============================================================================== 1322 | 関連項目 1323 | ============================================================================== 1324 | 1325 | pty(4) 1326 | 1327 | ============================================================================== 1328 | 著者 1329 | ============================================================================== 1330 | 1331 | Nicholas Marriott 1332 | 1333 | ============================================================================== 1334 | 日本語訳について 1335 | ============================================================================== 1336 | 1337 | これは tmux の man page を日本語に翻訳したものです。 1338 | 1339 | :オリジナル: http://tmux.sourceforge.net/ 1340 | :訳者: Takeshi NISHIDA 1341 | :ライセンス: オリジナルに準拠 1342 | :対象バージョン: 1.0 1343 | 1344 | -------------------------------------------------------------------------------- /tmux-raw.txt: -------------------------------------------------------------------------------- 1 | TMUX(1) BSD General Commands Manual TMUX(1) 2 | 3 | NAME 4 | tmux -- terminal multiplexer 5 | 6 | SYNOPSIS 7 | tmux [-28dlqUuv] [-f file] [-L socket-name] [-S socket-path] [command [flags]] 8 | 9 | DESCRIPTION 10 | tmux is a terminal multiplexer: it enables a number of terminals to be created, accessed, 11 | and controlled from a single screen. tmux may be detached from a screen and continue run- 12 | ning in the background, then later reattached. 13 | 14 | When tmux is started it creates a new session with a single window and displays it on 15 | screen. A status line at the bottom of the screen shows information on the current session 16 | and is used to enter interactive commands. 17 | 18 | A session is a single collection of pseudo terminals under the management of tmux. Each 19 | session has one or more windows linked to it. A window occupies the entire screen and may 20 | be split into rectangular panes, each of which is a separate pseudo terminal (the pty(4) 21 | manual page documents the technical details of pseudo terminals). Any number of tmux 22 | instances may connect to the same session, and any number of windows may be present in the 23 | same session. Once all sessions are killed, tmux exits. 24 | 25 | Each session is persistent and will survive accidental disconnection (such as ssh(1) connec- 26 | tion timeout) or intentional detaching (with the 'C-b d' key strokes). tmux may be reat- 27 | tached using: 28 | 29 | $ tmux attach 30 | 31 | In tmux, a session is displayed on screen by a client and all sessions are managed by a sin- 32 | gle server. The server and each client are separate processes which communicate through a 33 | socket in /tmp. 34 | 35 | The options are as follows: 36 | 37 | -2 Force tmux to assume the terminal supports 256 colours. 38 | 39 | -8 Like -2, but indicates that the terminal supports 88 colours. 40 | 41 | -d Force tmux to assume the terminal supports default colours. 42 | 43 | -f file Specify an alternative configuration file. By default, tmux loads the system 44 | configuration file from /etc/tmux.conf, if present, then looks for a user con- 45 | figuration file at ~/.tmux.conf. The configuration file is a set of tmux com- 46 | mands which are executed in sequence when the server is first started. 47 | 48 | If a command in the configuration file fails, tmux will report an error and 49 | exit without executing further commands. 50 | 51 | -l Behave as a login shell. This flag currently has no effect and is for compat- 52 | ibility with other shells when using tmux as a login shell. 53 | 54 | -L socket-name 55 | tmux stores the server socket in a directory under /tmp; the default socket is 56 | named default. This option allows a different socket name to be specified, 57 | allowing several independent tmux servers to be run. Unlike -S a full path is 58 | not necessary: the sockets are all created in the same directory. 59 | 60 | If the socket is accidentally removed, the SIGUSR1 signal may be sent to the 61 | tmux server process to recreate it. 62 | 63 | -q Prevent the server sending various informational messages, for example when 64 | window flags are altered. 65 | 66 | -S socket-path 67 | Specify a full alternative path to the server socket. If -S is specified, the 68 | default socket directory is not used and any -L flag is ignored. 69 | 70 | -U Unlock the server. 71 | 72 | -u tmux attempts to guess if the terminal is likely to support UTF-8 by checking 73 | the first of the LC_ALL, LC_CTYPE and LANG environment variables to be set for 74 | the string "UTF-8". This is not always correct: the -u flag explicitly 75 | informs tmux that UTF-8 is supported. 76 | 77 | If the server is started from a client passed -u or where UTF-8 is detected, 78 | the utf8 and status-utf8 options are enabled in the global window and session 79 | options respectively. 80 | 81 | -v Request verbose logging. This option may be specified multiple times for 82 | increasing verbosity. Log messages will be saved into tmux-client-PID.log and 83 | tmux-server-PID.log files in the current directory, where PID is the PID of 84 | the server or client process. 85 | 86 | command [flags] 87 | This specifies one of a set of commands used to control tmux, as described in 88 | the following sections. If no commands are specified, the new-session command 89 | is assumed. 90 | 91 | KEY BINDINGS 92 | tmux may be controlled from an attached client by using a key combination of a prefix key, 93 | 'C-b' (Ctrl-b) by default, followed by a command key. 94 | 95 | Some of the default key bindings are: 96 | 97 | c Create a new window. 98 | d Detach the current client. 99 | l Move to the previously selected window. 100 | n Change to the next window. 101 | p Change to the previous window. 102 | & Kill the current window. 103 | , Rename the current window. 104 | ? List all key bindings. 105 | 106 | A complete list may be obtained with the list-keys command (bound to '?' by default). Key 107 | bindings may be changed with the bind-key and unbind-key commands. 108 | 109 | COMMANDS 110 | This section contains a list of the commands supported by tmux. Most commands accept the 111 | optional -t argument with one of target-client, target-session target-window, or 112 | target-pane. These specify the client, session, window or pane which a command should 113 | affect. target-client is the name of the pty(4) file to which the client is connected, for 114 | example either of /dev/ttyp1 or ttyp1 for the client attached to /dev/ttyp1. If no client 115 | is specified, the current client is chosen, if possible, or an error is reported. Clients 116 | may be listed with the list-clients command. 117 | 118 | target-session is either the name of a session (as listed by the list-sessions command) or 119 | the name of a client with the same syntax as target-client, in which case the session 120 | attached to the client is used. When looking for the session name, tmux initially searches 121 | for an exact match; if none is found, the session names are checked for any for which 122 | target-session is a prefix or for which it matches as an fnmatch(3) pattern. If a single 123 | match is found, it is used as the target session; multiple matches produce an error. If a 124 | session is omitted, the current session is used if available; if no current session is 125 | available, the most recently created is chosen. 126 | 127 | target-window specifies a window in the form session:window. session follows the same rules 128 | as for target-session, and window is looked for in order: as a window index, for example 129 | mysession:1; as an exact window name, such as mysession:mywindow; then as an fnmatch(3) pat- 130 | tern or the start of a window name, such as mysession:mywin* or mysession:mywin. An empty 131 | window name specifies the next unused index if appropriate (for example the new-window and 132 | link-window commands) otherwise the current window in session is chosen. When the argument 133 | does not contain a colon, tmux first attempts to parse it as window; if that fails, an 134 | attempt is made to match a session. 135 | 136 | target-pane takes a similar form to target-window but with the optional addition of a period 137 | followed by a pane index, for example: mysession:mywindow.1. If the pane index is omitted, 138 | the currently active pane in the specified window is used. If neither a colon nor period 139 | appears, tmux first attempts to use the argument as a pane index; if that fails, it is 140 | looked up as for target-window. 141 | 142 | Multiple commands may be specified together as part of a command sequence. Each command 143 | should be separated by spaces and a semicolon; commands are executed sequentially from left 144 | to right. A literal semicolon may be included by escaping it with a backslash (for example, 145 | when specifying a command sequence to bind-key). 146 | 147 | Examples include: 148 | 149 | refresh-client -t/dev/ttyp2 150 | 151 | rename-session -tfirst newname 152 | 153 | set-window-option -t:0 monitor-activity on 154 | 155 | new-window ; split-window -d 156 | 157 | bind-key D detach-client \; lock-server 158 | 159 | CLIENTS AND SESSIONS 160 | The following commands are available: 161 | 162 | attach-session [-d] [-t target-session] 163 | (alias: attach) 164 | If run from outside tmux, create a new client in the current terminal and attach it 165 | to target-session. If used from inside, switch the current client. If -d is speci- 166 | fied, any other clients attached to the session are detached. 167 | 168 | If no server is started, attach-session will attempt to start it; this will fail 169 | unless sessions are created in the configuration file. 170 | 171 | detach-client [-t target-client] 172 | (alias: detach) 173 | Detach the current client if bound to a key, or the specified client with -t. 174 | 175 | has-session [-t target-session] 176 | (alias: has) 177 | Report an error and exit with 1 if the specified session does not exist. If it does 178 | exist, exit with 0. 179 | 180 | kill-server 181 | Kill the tmux server and clients and destroy all sessions. 182 | 183 | kill-session [-t target-session] 184 | Destroy the given session, closing any windows linked to it and no other sessions, 185 | and detaching all clients attached to it. 186 | 187 | list-clients 188 | (alias: lsc) 189 | List all clients attached to the server. 190 | 191 | list-commands 192 | (alias: lscm) 193 | List the syntax of all commands supported by tmux. 194 | 195 | list-sessions 196 | (alias: ls) 197 | List all sessions managed by the server. 198 | 199 | new-session [-d] [-n window-name] [-s session-name] [command] 200 | (alias: new) 201 | Create a new session with name session-name. The new session is attached to the 202 | current terminal unless -d is given. window-name and command are the name of and 203 | command to execute in the initial window. 204 | 205 | If run from a terminal, any termios(4) special characters are saved and used for new 206 | windows in the new session. 207 | 208 | refresh-client [-t target-client] 209 | (alias: refresh) 210 | Refresh the current client if bound to a key, or a single client if one is given 211 | with -t. 212 | 213 | rename-session [-t target-session] new-name 214 | (alias: rename) 215 | Rename the session to new-name. 216 | 217 | source-file path 218 | (alias: source) 219 | Execute commands from path. 220 | 221 | start-server 222 | (alias: start) 223 | Start the tmux server, if not already running, without creating any sessions. 224 | 225 | suspend-client [-c target-client] 226 | (alias: suspendc) 227 | Suspend a client by sending SIGTSTP (tty stop). 228 | 229 | switch-client [-c target-client] [-t target-session] 230 | (alias: switchc) 231 | Switch the current session for client target-client to target-session. 232 | 233 | WINDOWS AND PANES 234 | A tmux window may be in one of several modes. The default permits direct access to the ter- 235 | minal attached to the window. The others are: 236 | 237 | output mode 238 | This is entered when a command which produces output, such as list-keys, is executed 239 | from a key binding. 240 | 241 | scroll mode 242 | This is entered with the scroll-mode command (bound to '=' by default) and permits 243 | the window history buffer to be inspected. 244 | 245 | copy mode 246 | This permits a section of a window or its history to be copied to a paste buffer for 247 | later insertion into another window. This mode is entered with the copy-mode com- 248 | mand, bound to ['' by default. 249 | 250 | The keys available depend on whether emacs or vi mode is selected (see the mode-keys 251 | option). The following keys are supported as appropriate for the mode: 252 | 253 | Function vi emacs 254 | Back to indentation ^ M-m 255 | Clear selection Escape C-g 256 | Copy selection Enter M-w 257 | Cursor down j Down 258 | Cursor left h Left 259 | Cursor right l Right 260 | Cursor up k Up 261 | Delete entire line d C-u 262 | Delete to end of line D C-k 263 | End of line $ C-e 264 | Goto line g g 265 | Next page C-f Page down 266 | Next word w M-f 267 | Paste buffer p C-y 268 | Previous page C-u Page up 269 | Previous word b M-b 270 | Quit mode q Escape 271 | Search again n n 272 | Search backward ? C-r 273 | Search forward / C-s 274 | Start of line 0 C-a 275 | Start selection Space C-Space 276 | Transpose chars C-t 277 | 278 | These key bindings are defined in a set of named tables: vi-edit and emacs-edit for keys 279 | used when line editing at the command prompt; vi-choice and emacs-choice for keys used when 280 | choosing from lists (such as produced by the window-choose command) or in output mode; and 281 | vi-copy and emacs-copy used in copy and scroll modes. The tables may be viewed with the 282 | list-keys command and keys modified or removed with bind-key and unbind-key. 283 | 284 | The paste buffer key pastes the first line from the top paste buffer on the stack. 285 | 286 | The mode commands are as follows: 287 | 288 | copy-mode [-u] [-t target-pane] 289 | Enter copy mode. The -u option scrolls one page up. 290 | 291 | scroll-mode [-u] [-t target-pane] 292 | Enter scroll mode. The -u has the same meaning as in the copy-mode command. 293 | 294 | Each window displayed by tmux may be split into one or more panes; each pane takes up a cer- 295 | tain area of the display and is a separate terminal. A window may be split into panes using 296 | the split-window command. Windows may be split horizontally (with the -h flag) or verti- 297 | cally. Panes may be resized with the resize-pane command (bound to 'C-up', 'C-down' 298 | 'C-left' and 'C-right' by default), the current pane may be changed with the up-pane and 299 | down-pane commands and the rotate-window and swap-pane commands may be used to swap panes 300 | without changing their position. Panes are numbered beginning from zero in the order they 301 | are created. 302 | 303 | A number of preset layouts are available. These may be selected with the select-layout com- 304 | mand or cycled with next-layout (bound to 'C-space' by default); once a layout is chosen, 305 | panes within it may be moved and resized as normal. 306 | 307 | The following layouts are supported: 308 | 309 | even-horizontal 310 | Panes are spread out evenly from left to right across the window. 311 | 312 | even-vertical 313 | Panes are spread evenly from top to bottom. 314 | 315 | main-horizontal 316 | A large (main) pane is shown at the top of the window and the remaining panes are 317 | spread from left to right in the leftover space at the bottom. Use the 318 | main-pane-height window option to specify the height of the top pane. 319 | 320 | main-vertical 321 | Similar to main-horizontal but the large pane is placed on the left and the others 322 | spread from top to bottom along the right. See the main-pane-width window option. 323 | 324 | Commands related to windows and panes are as follows: 325 | 326 | break-pane [-d] [-t target-pane] 327 | (alias: breakp) 328 | Break target-pane off from its containing window to make it the only pane in a new 329 | window. If -d is given, the new window does not become the current window. 330 | 331 | choose-client [-t target-window] [template] 332 | Put a window into client choice mode, allowing a client to be selected interactively 333 | from a list. After a client is chosen, '%%' is replaced by the client pty(4) path 334 | in template and the result executed as a command. If template is not given, 335 | "detach-client -t '%%'" is used. This command works only from inside tmux. 336 | 337 | choose-session [-t target-window] [template] 338 | Put a window into session choice mode, where a session may be selected interactively 339 | from a list. When one is chosen, '%%' is replaced by the session name in template 340 | and the result executed as a command. If template is not given, "switch-client -t 341 | '%%'" is used. This command works only from inside tmux. 342 | 343 | choose-window [-t target-window] [template] 344 | Put a window into window choice mode, where a window may be chosen interactively 345 | from a list. After a window is selected, '%%' is replaced by the session name and 346 | window index in template and the result executed as a command. If template is not 347 | given, "select-window -t '%%'" is used. This command works only from inside tmux. 348 | 349 | display-panes [-t target-client] 350 | (alias: displayp) 351 | Display a visible indicator of each pane shown by target-client. See the 352 | display-panes-time and display-panes-colour session options. While the indicator is 353 | on screen, a pane may be selected with the '0' to '9' keys. 354 | 355 | down-pane [-t target-pane] 356 | (alias: downp) 357 | Move down a pane. 358 | 359 | find-window [-t target-window] match-string 360 | (alias: findw) 361 | Search for the fnmatch(3) pattern match-string in window names, titles, and visible 362 | content (but not history). If only one window is matched, it'll be automatically 363 | selected, otherwise a choice list is shown. This command only works from inside 364 | tmux. 365 | 366 | kill-pane [-t target-pane] 367 | (alias: killp) 368 | Destroy the given pane. If no panes remain in the containing window, it is also 369 | destroyed. 370 | 371 | kill-window [-t target-window] 372 | (alias: killw) 373 | Kill the current window or the window at target-window, removing it from any ses- 374 | sions to which it is linked. 375 | 376 | last-window [-t target-session] 377 | (alias: last) 378 | Select the last (previously selected) window. If no target-session is specified, 379 | select the last window of the current session. 380 | 381 | link-window [-dk] [-s src-window] [-t dst-window] 382 | (alias: linkw) 383 | Link the window at src-window to the specified dst-window. If dst-window is speci- 384 | fied and no such window exists, the src-window is linked there. If -k is given and 385 | dst-window exists, it is killed, otherwise an error is generated. If -d is given, 386 | the newly linked window is not selected. 387 | 388 | list-windows [-t target-session] 389 | (alias: lsw) 390 | List windows in the current session or in target-session. 391 | 392 | move-window [-d] [-s src-window] [-t dst-window] 393 | (alias: movew) 394 | This is similar to link-window, except the window at src-window is moved to 395 | dst-window. 396 | 397 | new-window [-dk] [-n window-name] [-t target-window] [command] 398 | (alias: neww) 399 | Create a new window. If -d is given, the session does not make the new window the 400 | current window. target-window represents the window to be created; if the target 401 | already exists an error is shown, unless the -k flag is used, in which case it is 402 | destroyed. command is the command to execute. If command is not specified, the 403 | default command is used. 404 | 405 | The TERM environment variable must be set to "screen" for all programs running 406 | inside tmux. New windows will automatically have "TERM=screen" added to their envi- 407 | ronment, but care must be taken not to reset this in shell start-up files. 408 | 409 | next-layout [-t target-window] 410 | (alias: nextl) 411 | Move a window to the next layout and rearrange the panes to fit. 412 | 413 | next-window [-a] [-t target-session] 414 | (alias: next) 415 | Move to the next window in the session. If -a is used, move to the next window with 416 | a bell, activity or content alert. 417 | 418 | previous-window [-a] [-t target-session] 419 | (alias: prev) 420 | Move to the previous window in the session. With -a, move to the previous window 421 | with a bell, activity or content alert. 422 | 423 | rename-window [-t target-window] new-name 424 | (alias: renamew) 425 | Rename the current window, or the window at target-window if specified, to new-name. 426 | 427 | resize-pane [-DLRU] [-t target-pane] [adjustment] 428 | (alias: resizep) 429 | Resize a pane, upward with -U (the default), downward with -D, to the left with -L 430 | and to the right with -R. The adjustment is given in lines or cells (the default is 431 | 1). 432 | 433 | respawn-window [-k] [-t target-window] [command] 434 | (alias: respawnw) 435 | Reactive a window in which the command has exited (see the remain-on-exit window 436 | option). If command is not given, the command used when the window was created is 437 | executed. The window must be already inactive, unless -k is given, in which case 438 | any existing command is killed. 439 | 440 | rotate-window [-DU] [-t target-window] 441 | (alias: rotatew) 442 | Rotate the positions of the panes within a window, either upward (numerically lower) 443 | with -U or downward (numerically higher). 444 | 445 | select-layout [-t target-window] [layout-name] 446 | (alias: selectl) 447 | Choose a specific layout for a window. If layout-name is not given, the last layout 448 | used (if any) is reapplied. 449 | 450 | select-pane [-t target-pane] 451 | (alias: selectp) 452 | Make pane target-pane the active pane in window target-window. 453 | 454 | select-window [-t target-window] 455 | (alias: selectw) 456 | Select the window at target-window. 457 | 458 | split-window [-dhv] [-l size | -p percentage] [-t target-window] [command] 459 | (alias: splitw) 460 | Creates a new pane by splitting the active pane: -h does a horizontal split and -v a 461 | vertical split; if neither is specified, -v is assumed. The -l and -p options spec- 462 | ify the size of the new window in lines (for vertical split) or in cells (for hori- 463 | zontal split), or as a percentage, respectively. All other options have the same 464 | meaning as in the new-window command. 465 | 466 | swap-pane [-dDU] [-s src-pane] [-t dst-pane] 467 | (alias: swapp) 468 | Swap two panes. If -U is used and no source pane is specified with -s, dst-pane is 469 | swapped with the previous pane (before it numerically); -D swaps with the next pane 470 | (after it numerically). 471 | 472 | swap-window [-d] [-s src-window] [-t dst-window] 473 | (alias: swapw) 474 | This is similar to link-window, except the source and destination windows are 475 | swapped. It is an error if no window exists at src-window. 476 | 477 | unlink-window [-k] [-t target-window] 478 | (alias: unlinkw) 479 | Unlink target-window. Unless -k is given, a window may be unlinked only if it is 480 | linked to multiple sessions - windows may not be linked to no sessions; if -k is 481 | specified and the window is linked to only one session, it is unlinked and 482 | destroyed. 483 | 484 | up-pane [-t target-pane] 485 | (alias: upp) 486 | Move up a pane. 487 | 488 | KEY BINDINGS 489 | Commands related to key bindings are as follows: 490 | 491 | bind-key [-cnr] [-t key-table] key command [arguments] 492 | (alias: bind) 493 | Bind key key to command. Keys may be specified prefixed with 'C-' or '^' for Ctrl 494 | keys, or 'M-' for Alt (meta) keys. 495 | 496 | By default (without -t) the primary key bindings are modified (those normally acti- 497 | vated with the prefix key); in this case, if -n is specified, it is not necessary to 498 | use the prefix key, command is bound to key alone. The -r flag indicates this key 499 | may repeat, see the repeat-time option. 500 | 501 | If -t is present, key is bound in key-table: the binding for command mode with -c or 502 | for normal mode without. To view the default bindings and possible commands, see 503 | the list-keys command. 504 | 505 | list-keys [-t key-table] 506 | (alias: lsk) 507 | List all key bindings. Without -t the primary key bindings - those executed when 508 | preceded by the prefix key - are printed. Keys bound without the prefix key (see 509 | bind-key -n) are enclosed in square brackets. 510 | 511 | With -t, the key bindings in key-table are listed; this may be one of: vi-edit, 512 | emacs-edit, vi-choice, emacs-choice, vi-copy or emacs-copy. 513 | 514 | send-keys [-t target-pane] key ... 515 | (alias: send) 516 | Send a key or keys to a window. Each argument key is the name of the key (such as 517 | 'C-a' or 'npage' ) to send; if the string is not recognised as a key, it is sent as 518 | a series of characters. All arguments are sent sequentially from first to last. 519 | 520 | send-prefix [-t target-pane] 521 | Send the prefix key to a window as if it was pressed. 522 | 523 | unbind-key [-cn] [-t key-table] key 524 | (alias: unbind) 525 | Unbind the command bound to key. Without -t the primary key bindings are modified; 526 | in this case, if -n is specified, the command bound to key without a prefix (if any) 527 | is removed. 528 | 529 | If -t is present, key in key-table is unbound: the binding for command mode with -c 530 | or for normal mode without. 531 | 532 | OPTIONS 533 | The appearance and behaviour of tmux may be modified by changing the value of various 534 | options. There are two types of option: session options and window options. 535 | 536 | Each individual session may have a set of session options, and there is a separate set of 537 | global session options. Sessions which do not have a particular option configured inherit 538 | the value from the global session options. Session options are set or unset with the 539 | set-option command and may be listed with the show-options command. The available session 540 | options are listed under the set-option command. 541 | 542 | Similarly, a set of window options is attached to each window, and there is a set of global 543 | window options from which any unset options are inherited. Window options are altered with 544 | the set-window-option command and can be listed with the show-window-options command. All 545 | window options are documented with the set-window-option command. 546 | 547 | Commands which set options are as follows: 548 | 549 | set-option [-agu] [-t target-session] option value 550 | (alias: set) 551 | Set a session option. With -a, and if the option expects a string, value is 552 | appended to the existing setting. If -g is specified, the global session option is 553 | set. The -u flag unsets an option, so a session inherits the option from the global 554 | options - it is not possible to unset a global option. 555 | 556 | Available session options are: 557 | 558 | base-index index 559 | Set the base index from which an unused index should be searched when a new 560 | window is created. The default is zero. 561 | 562 | bell-action [any | none | current] 563 | Set action on window bell. any means a bell in any window linked to a ses- 564 | sion causes a bell in the current window of that session, none means all 565 | bells are ignored and current means only bell in windows other than the cur- 566 | rent window are ignored. 567 | 568 | buffer-limit number 569 | Set the number of buffers kept for each session; as new buffers are added to 570 | the top of the stack, old ones are removed from the bottom if necessary to 571 | maintain this maximum length. 572 | 573 | default-command command 574 | Set the command used for new windows (if not specified when the window is 575 | created) to command, which may be any sh(1) command. The default is an 576 | empty string, which instructs tmux to create a login shell using the value 577 | of the default-shell option. 578 | 579 | default-shell path 580 | Specify the default shell. This is used as the login shell for new windows 581 | when the default-command option is set to empty, and must be the full path 582 | of the executable. When started tmux tries to set a default value from the 583 | first suitable of the SHELL environment variable, the shell returned by 584 | getpwuid(3), or /bin/sh. This option should be configured when tmux is used 585 | as a login shell. 586 | 587 | default-path path 588 | Set the default working directory for processes created from keys, or inter- 589 | actively from the prompt. The default is the current working directory when 590 | the server is started. 591 | 592 | default-terminal terminal 593 | Set the default terminal for new windows created in this session - the 594 | default value of the TERM environment variable. For tmux to work correctly, 595 | this must be set to 'screen' or a derivative of it. 596 | 597 | display-panes-colour colour 598 | Set the colour used for the display-panes command. 599 | 600 | display-panes-time time 601 | Set the time in milliseconds for which the indicators shown by the 602 | display-panes command appear. 603 | 604 | display-time time 605 | Set the amount of time for which status line messages and other on-screen 606 | indicators are displayed. time is in milliseconds. 607 | 608 | history-limit lines 609 | Set the maximum number of lines held in window history. This setting 610 | applies only to new windows - existing window histories are not resized and 611 | retain the limit at the point they were created. 612 | 613 | lock-after-time number 614 | Lock the server after number seconds of inactivity. The default is off (set 615 | to 0). This has no effect as a session option; it must be set as a global 616 | option using -g. When passwords are entered incorrectly, tmux follows the 617 | behaviour of login(1) and ignores further password attempts for an increas- 618 | ing timeout. 619 | 620 | message-attr attributes 621 | Set status line message attributes, where attributes is either default or a 622 | comma-delimited list of one or more of: bright (or bold), dim, underscore, 623 | blink, reverse, hidden, or italics. 624 | 625 | message-bg colour 626 | Set status line message background colour, where colour is one of: black, 627 | red, green, yellow, blue, magenta, cyan, white, colour0 to colour255 from 628 | the 256-colour palette, or default. 629 | 630 | message-fg colour 631 | Set status line message foreground colour. 632 | 633 | prefix key 634 | Set the current prefix key. 635 | 636 | repeat-time time 637 | Allow multiple commands to be entered without pressing the prefix-key again 638 | in the specified time milliseconds (the default is 500). Whether a key 639 | repeats may be set when it is bound using the -r flag to bind-key. Repeat 640 | is enabled for the default keys bound to the resize-pane command. 641 | 642 | set-remain-on-exit [on | off] 643 | Set the remain-on-exit window option for any windows first created in this 644 | session. 645 | 646 | set-titles [on | off] 647 | Attempt to set the window title using the \e]2;...\007 xterm code if the 648 | terminal appears to be an xterm. This option is off by default. Note that 649 | elinks will only attempt to set the window title if the STY environment 650 | variable is set. 651 | 652 | set-titles-string string 653 | String used to set the window title if set-titles is on. Character 654 | sequences are replaced as for the status-left option. 655 | 656 | status [on | off] 657 | Show or hide the status line. 658 | 659 | status-attr attributes 660 | Set status line attributes. 661 | 662 | status-bg colour 663 | Set status line background colour. 664 | 665 | status-fg colour 666 | Set status line foreground colour. 667 | 668 | status-interval interval 669 | Update the status bar every interval seconds. By default, updates will 670 | occur every 15 seconds. A setting of zero disables redrawing at interval. 671 | 672 | status-justify [left | centre | right] 673 | Set the position of the window list component of the status line: left, cen- 674 | tre or right justified. 675 | 676 | status-keys [vi | emacs] 677 | Use vi or emacs-style key bindings in the status line, for example at the 678 | command prompt. Defaults to emacs. 679 | 680 | status-left string 681 | Display string to the left of the status bar. string will be passed through 682 | strftime(3) before being used. By default, the session name is shown. 683 | string may contain any of the following special character sequences: 684 | 685 | Character pair Replaced with 686 | #(command) First line of command's output 687 | #[attributes] Colour or attribute change 688 | #H Hostname of local host 689 | #I Current window index 690 | #P Current pane index 691 | #S Session name 692 | #T Current window title 693 | #W Current window name 694 | ## A literal '#' 695 | 696 | The #(command) form executes 'command' as a shell command and inserts the 697 | first line of its output. #[attributes] allows a comma-separated list of 698 | attributes to be specified, these may be 'fg=colour' to set the foreground 699 | colour, 'bg=colour' to set the background colour, or one of the attributes 700 | described under the message-attr option. Examples are: 701 | 702 | #(sysctl vm.loadavg) 703 | #[fg=yellow,bold]#(apm -l)%%#[default] [#S] 704 | 705 | Where appropriate, these may be prefixed with a number to specify the maxi- 706 | mum length, for example '#24T'. 707 | 708 | By default, UTF-8 in string is not interpreted, to enable UTF-8, use the 709 | status-utf8 option. 710 | 711 | status-left-attr attributes 712 | Set the attribute of the left part of the status line. 713 | 714 | status-left-fg colour 715 | Set the foreground colour of the left part of the status line. 716 | 717 | status-left-bg colour 718 | Set the background colour of the left part of the status line. 719 | 720 | status-left-length length 721 | Set the maximum length of the left component of the status bar. The default 722 | is 10. 723 | 724 | status-right string 725 | Display string to the right of the status bar. By default, the date and 726 | time will be shown. As with status-left, string will be passed to 727 | strftime(3), character pairs are replaced, and UTF-8 is dependent on the 728 | status-utf8 option. 729 | 730 | status-right-attr attributes 731 | Set the attribute of the right part of the status line. 732 | 733 | status-right-fg colour 734 | Set the foreground colour of the right part of the status line. 735 | 736 | status-right-bg colour 737 | Set the background colour of the right part of the status line. 738 | 739 | status-right-length length 740 | Set the maximum length of the right component of the status bar. The 741 | default is 40. 742 | 743 | status-utf8 [on | off] 744 | Instruct tmux to treat top-bit-set characters in the status-left and 745 | status-right strings as UTF-8; notably, this is important for wide charac- 746 | ters. This option defaults to off. 747 | 748 | terminal-overrides string 749 | Contains a list of entries which override terminal descriptions read using 750 | terminfo(5). string is a comma-separated list of items each a colon-sepa- 751 | rated string made up of a terminal type pattern (matched using fnmatch(3)) 752 | and a set of name=value entries. 753 | 754 | For example, to set the 'clear' terminfo(5) entry to '\e[H\e[2J' for all 755 | terminal types and the 'dch1' entry to '\e[P' for the 'rxvt' terminal type, 756 | the option could be set to the string: 757 | 758 | "*:clear=\e[H\e[2J,rxvt:dch1=\e[P" 759 | 760 | The terminal entry value is passed through strunvis(3) before interpreta- 761 | tion. The default value forcibly corrects the 'colors' entry for terminals 762 | which support 88 or 256 colours: 763 | 764 | "*88col*:colors=88,*256col*:colors=256" 765 | 766 | update-environment variables 767 | Set a space-separated string containing a list of environment variables to 768 | be copied into the session environment when a new session is created or an 769 | existing session is attached. Any variables that do not exist in the source 770 | environment are set to be removed from the session environment (as if -r was 771 | given to the set-environment command). The default is "DISPLAY WINDOWID 772 | SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION". 773 | 774 | visual-activity [on | off] 775 | If on, display a status line message when activity occurs in a window for 776 | which the monitor-activity window option is enabled. 777 | 778 | visual-bell [on | off] 779 | If this option is on, a message is shown on a bell instead of it being 780 | passed through to the terminal (which normally makes a sound). Also see the 781 | bell-action option. 782 | 783 | visual-content [on | off] 784 | Like visual-activity, display a message when content is present in a window 785 | for which the monitor-content window option is enabled. 786 | 787 | set-window-option [-agu] [-t target-window] option value 788 | (alias: setw) 789 | Set a window option. The -a, -g and -u flags work similarly to the set-option com- 790 | mand. 791 | 792 | Supported window options are: 793 | 794 | aggressive-resize [on | off] 795 | Aggressively resize the chosen window. This means that tmux will resize the 796 | window to the size of the smallest session for which it is the current win- 797 | dow, rather than the smallest session to which it is attached. The window 798 | may resize when the current window is changed on another sessions; this 799 | option is good for full-screen programs which support SIGWINCH and poor for 800 | interactive programs such as shells. 801 | 802 | automatic-rename [on | off] 803 | Control automatic window renaming. When this setting is enabled, tmux will 804 | attempt - on supported platforms - to rename the window to reflect the com- 805 | mand currently running in it. This flag is automatically disabled for an 806 | individual window when a name is specified at creation with new-window or 807 | new-session, or later with rename-window. It may be switched off globally 808 | with: 809 | 810 | set-window-option -g automatic-rename off 811 | 812 | clock-mode-colour colour 813 | Set clock colour. 814 | 815 | clock-mode-style [12 | 24] 816 | Set clock hour format. 817 | 818 | force-height height 819 | force-width width 820 | Prevent tmux from resizing a window to greater than width or height. A 821 | value of zero restores the default unlimited setting. 822 | 823 | main-pane-width width 824 | main-pane-height height 825 | Set the width or height of the main (left or top) pane in the 826 | main-horizontal or main-vertical layouts. 827 | 828 | mode-attr attributes 829 | Set window modes attributes. 830 | 831 | mode-bg colour 832 | Set window modes background colour. 833 | 834 | mode-fg colour 835 | Set window modes foreground colour. 836 | 837 | mode-keys [vi | emacs] 838 | Use vi or emacs-style key bindings in scroll, copy and choice modes. Key 839 | bindings default to emacs. 840 | 841 | mode-mouse [on | off] 842 | Mouse state in modes. If on, tmux will respond to mouse clicks by moving 843 | the cursor in copy mode or selecting an option in choice mode. 844 | 845 | monitor-activity [on | off] 846 | Monitor for activity in the window. Windows with activity are highlighted 847 | in the status line. 848 | 849 | monitor-content match-string 850 | Monitor content in the window. When fnmatch(3) pattern match-string appears 851 | in the window, it is highlighted in the status line. 852 | 853 | remain-on-exit [on | off] 854 | A window with this flag set is not destroyed when the program running in it 855 | exits. The window may be reactivated with the respawn-window command. 856 | 857 | utf8 [on | off] 858 | Instructs tmux to expect UTF-8 sequences to appear in this window. 859 | 860 | window-status-attr attributes 861 | Set status line attributes for a single window. 862 | 863 | window-status-bg colour 864 | Set status line background colour for a single window. 865 | 866 | window-status-fg colour 867 | Set status line foreground colour for a single window. 868 | 869 | window-status-current-attr attributes 870 | Set status line attributes for the currently active window. 871 | 872 | window-status-current-bg colour 873 | Set status line background colour for the currently active window. 874 | 875 | window-status-current-fg colour 876 | Set status line foreground colour for the currently active window. 877 | 878 | xterm-keys [on | off] 879 | If this option is set, tmux will generate xterm(1) -style function key 880 | sequences; these have a number included to indicate modifiers such as Shift, 881 | Alt or Ctrl. 882 | 883 | show-options [-g] [-t target-session] 884 | (alias: show) 885 | Show the session options for target session, or the global session options with -g. 886 | 887 | show-window-options [-g] [-t target-window] 888 | (alias: showw) 889 | List the window options for target-window, or the global window options if -g is 890 | used. 891 | 892 | ENVIRONMENT 893 | When the server is started, tmux copies the environment into the global environment; in 894 | addition, each session has a session environment. When a window is created, the session and 895 | global environments are merged with the session environment overriding any variable present 896 | in both. This is the initial environment passed to the new process. 897 | 898 | The update-environment session option may be used to update the session environment from the 899 | client when a new session is created or an old reattached. tmux also initialises the TMUX 900 | variable with some internal information to allow commands to be executed from inside, and 901 | the TERM variable with the correct terminal setting of 'screen'. 902 | 903 | Commands to alter and view the environment are: 904 | 905 | set-environment [-gru] [-t target-session] name [value] 906 | Set or unset an environment variable. If -g is used, the change is made in the 907 | global environment; otherwise, it is applied to the session environment for 908 | target-session. The -u flag unsets a variable. -r indicates the variable is to be 909 | removed from the environment before starting a new process. 910 | 911 | show-environment [-g] [-t target-session] 912 | Display the environment for target-session or the global environment with -g. Vari- 913 | ables removed from the environment are prefixed with '-'. 914 | 915 | STATUS LINE 916 | tmux includes an optional status line which is displayed in the bottom line of each termi- 917 | nal. By default, the status line is enabled (it may be disabled with the status session 918 | option) and contains, from left-to-right: the name of the current session in square brack- 919 | ets; the window list; the current window title in double quotes; and the time and date. 920 | 921 | The status line is made of three parts: configurable left and right sections (which may con- 922 | tain dynamic content such as the time or output from a shell command, see the status-left, 923 | status-left-length, status-right, and status-right-length options below), and a central win- 924 | dow list. The window list shows the index, name and (if any) flag of the windows present in 925 | the current session in ascending numerical order. The flag is one of the following symbols 926 | appended to the window name: 927 | 928 | Symbol Meaning 929 | * Denotes the current window. 930 | - Marks the last window (previously selected). 931 | # Window is monitored and activity has been detected. 932 | ! A bell has occurred in the window. 933 | + Window is monitored for content and it has appeared. 934 | 935 | The # symbol relates to the monitor-activity and + to the monitor-content window options. 936 | The window name is printed in inverted colours if an alert (bell, activity or content) is 937 | present. 938 | 939 | The colour and attributes of the status line may be configured, the entire status line using 940 | the status-attr, status-fg and status-bg session options and individual windows using the 941 | window-status-attr, window-status-fg and window-status-bg window options. 942 | 943 | The status line is automatically refreshed at interval if it has changed, the interval may 944 | be controlled with the status-interval session option. 945 | 946 | Commands related to the status line are as follows: 947 | 948 | command-prompt [-p prompts] [-t target-client] [template] 949 | Open the command prompt in a client. This may be used from inside tmux to execute 950 | commands interactively. If template is specified, it is used as the command. If -p 951 | is given, prompts is a comma-separated list of prompts which are displayed in order; 952 | otherwise a single prompt is displayed, constructed from template if it is present, 953 | or ':' if not. Before the command is executed, the first occurrence of the string 954 | '%%' and all occurrences of '%1' are replaced by the response to the first prompt, 955 | the second '%%' and all '%2' are replaced with the response to the second prompt, 956 | and so on for further prompts. Up to nine prompt responses may be replaced ('%1' to 957 | '%9'). 958 | 959 | confirm-before [-t target-client] command 960 | (alias: confirm) 961 | Ask for confirmation before executing command. This command works only from inside 962 | tmux. 963 | 964 | display-message [-t target-client] [message] 965 | (alias: display) 966 | Display a message (see the status-left option below) in the status line. 967 | 968 | select-prompt [-t target-client] 969 | Open a prompt inside target-client allowing a window index to be entered interac- 970 | tively. 971 | 972 | BUFFERS 973 | tmux maintains a stack of paste buffers for each session. Up to the value of the 974 | buffer-limit option are kept; when a new buffer is added, the buffer at the bottom of the 975 | stack is removed. Buffers may be added using copy-mode or the set-buffer command, and 976 | pasted into a window using the paste-buffer command. 977 | 978 | A configurable history buffer is also maintained for each window. By default, up to 2000 979 | lines are kept; this can be altered with the history-limit option (see the set-option com- 980 | mand above). 981 | 982 | The buffer commands are as follows: 983 | 984 | clear-history [-t target-pane] 985 | (alias: clearhist) 986 | Remove and free the history for the specified pane. 987 | 988 | copy-buffer [-a src-index] [-b dst-index] [-s src-session] [-t dst-session] 989 | (alias: copyb) 990 | Copy a session paste buffer to another session. If no sessions are specified, the 991 | current one is used instead. 992 | 993 | delete-buffer [-b buffer-index] [-t target-session] 994 | (alias: deleteb) 995 | Delete the buffer at buffer-index, or the top buffer if not specified. 996 | 997 | list-buffers [-t target-session] 998 | (alias: lsb) 999 | List the buffers in the given session. 1000 | 1001 | load-buffer [-b buffer-index] [-t target-session] path 1002 | (alias: loadb) 1003 | Load the contents of the specified paste buffer from path. 1004 | 1005 | paste-buffer [-dr] [-b buffer-index] [-t target-window] 1006 | (alias: pasteb) 1007 | Insert the contents of a paste buffer into the current window. With -d, also delete 1008 | the paste buffer from the stack. When output, any linefeed (LF) characters in the 1009 | paste buffer are replaced with carriage returns (CR). This translation may be dis- 1010 | abled with the -r flag. 1011 | 1012 | save-buffer [-a] [-b buffer-index] [-t target-session] path 1013 | (alias: saveb) 1014 | Save the contents of the specified paste buffer to path. The -a option appends to 1015 | rather than overwriting the file. 1016 | 1017 | set-buffer [-b buffer-index] [-t target-session] data 1018 | (alias: setb) 1019 | Set the contents of the specified buffer to data. 1020 | 1021 | show-buffer [-b buffer-index] [-t target-session] 1022 | (alias: showb) 1023 | Display the contents of the specified buffer. 1024 | 1025 | MISCELLANEOUS 1026 | Miscellaneous commands are as follows: 1027 | 1028 | clock-mode [-t target-pane] 1029 | Display a large clock. 1030 | 1031 | if-shell shell-command command 1032 | (alias: if) 1033 | Execute command if shell-command returns success. 1034 | 1035 | lock-server 1036 | (alias: lock) 1037 | Lock the server until a password is entered. 1038 | 1039 | server-info 1040 | (alias: info) 1041 | Show server information and terminal details. 1042 | 1043 | set-password [-c] password 1044 | (alias: pass) 1045 | Set the server password. If the -c option is given, a pre-encrypted password may be 1046 | specified. By default, the password is blank, thus any entered password will be 1047 | accepted when unlocking the server (see the lock-server command). To prevent vari- 1048 | able expansion when an encrypted password is read from a configuration file, enclose 1049 | it in single quotes ('). 1050 | 1051 | FILES 1052 | ~/.tmux.conf Default tmux configuration file. 1053 | /etc/tmux.conf System-wide configuration file. 1054 | 1055 | EXAMPLES 1056 | To create a new tmux session running vi(1): 1057 | 1058 | $ tmux new-session vi 1059 | 1060 | Most commands have a shorter form, known as an alias. For new-session, this is new: 1061 | 1062 | $ tmux new vi 1063 | 1064 | Alternatively, the shortest unambiguous form of a command is accepted. If there are several 1065 | options, they are listed: 1066 | 1067 | $ tmux n 1068 | ambiguous command: n, could be: new-session, new-window, next-window 1069 | 1070 | Within an active session, a new window may be created by typing 'C-b c' (Ctrl followed by 1071 | the 'b' key followed by the 'c' key). 1072 | 1073 | Windows may be navigated with: 'C-b 0' (to select window 0), 'C-b 1' (to select window 1), 1074 | and so on; 'C-b n' to select the next window; and 'C-b p' to select the previous window. 1075 | 1076 | A session may be detached using 'C-b d' (or by an external event such as ssh(1) disconnec- 1077 | tion) and reattached with: 1078 | 1079 | $ tmux attach-session 1080 | 1081 | Typing 'C-b ?' lists the current key bindings in the current window; up and down may be used 1082 | to navigate the list or 'q' to exit from it. 1083 | 1084 | Commands to be run when the tmux server is started may be placed in the ~/.tmux.conf config- 1085 | uration file. Common examples include: 1086 | 1087 | Changing the default prefix key: 1088 | 1089 | set-option -g prefix C-a 1090 | unbind-key C-b 1091 | bind-key C-a send-prefix 1092 | 1093 | Turning the status line off, or changing its colour: 1094 | 1095 | set-option -g status off 1096 | set-option -g status-bg blue 1097 | 1098 | Setting other options, such as the default command, or locking after 30 minutes of inactiv- 1099 | ity: 1100 | 1101 | set-option -g default-command "exec /bin/ksh" 1102 | set-option -g lock-after-time 1800 1103 | 1104 | Creating new key bindings: 1105 | 1106 | bind-key b set-option status 1107 | bind-key / command-prompt "split-window 'exec man %%'" 1108 | bind-key S command-prompt "new-window -n %1 'ssh %1'" 1109 | 1110 | SEE ALSO 1111 | pty(4) 1112 | 1113 | AUTHORS 1114 | Nicholas Marriott ?nicm@users.sourceforge.net? 1115 | 1116 | BSD October 13, 2009 BSD 1117 | --------------------------------------------------------------------------------