@@ -34,11 +34,17 @@ eval "$(_TMUXP_COMPLETE=zsh_source tmuxp)"
34
34
35
35
``` console
36
36
$ tmuxp shell
37
+ ```
37
38
39
+ ``` console
38
40
$ tmuxp shell [session_name]
41
+ ```
39
42
43
+ ``` console
40
44
$ tmuxp shell [session_name] [window_name]
45
+ ```
41
46
47
+ ``` console
42
48
$ tmuxp shell -c ' python code'
43
49
```
44
50
@@ -76,36 +82,45 @@ Python 3.7 supports [PEP 553][pep 553]'s `PYTHONBREAKPOINT` and supports
76
82
compatible debuggers, for instance [ ipdb] [ ipdb ] :
77
83
78
84
``` console
79
-
80
85
$ pip install --user ipdb
86
+ ```
87
+
88
+ ``` console
81
89
$ env PYTHONBREAKPOINT=ipdb.set_trace tmuxp shell
82
90
```
83
91
84
92
You can also pass in python code directly, similar to ` python -c ` , do
85
93
this via ` tmuxp -c ` :
86
94
87
95
``` console
88
-
89
96
$ tmuxp shell -c ' print(session.name); print(window.name)'
90
97
my_server
91
98
my_window
99
+ ```
92
100
101
+ ``` console
93
102
$ tmuxp shell my_server -c ' print(session.name); print(window.name)'
94
103
my_server
95
104
my_window
105
+ ```
96
106
107
+ ``` console
97
108
$ tmuxp shell my_server my_window -c ' print(session.name); print(window.name)'
98
109
my_server
99
110
my_window
111
+ ```
100
112
113
+ ``` console
101
114
$ tmuxp shell my_server my_window -c ' print(window.name.upper())'
102
115
MY_WINDOW
116
+ ```
117
+
118
+ Assuming inside a tmux pane or one is attached on default server:
103
119
104
- # Assuming inside a tmux pane or one is attached on default server
120
+ ``` console
105
121
$ tmuxp shell -c ' print(pane.id); print(pane.window.name)'
106
122
%2
107
123
my_window
108
-
109
124
```
110
125
111
126
[ pep 553 ] : https://www.python.org/dev/peps/pep-0553/
@@ -154,37 +169,54 @@ shorthands:
154
169
2 . The name of the project file in your {}` $HOME/.tmuxp ` folder
155
170
3 . The direct path of the tmuxp file you want to load
156
171
172
+ Path to folder with ` .tmuxp.yaml ` , ` .tmuxp.yml ` , ` .tmuxp.json ` :
173
+
157
174
``` console
158
- # path to folder with .tmuxp.{yaml,yml,json}
159
175
$ tmuxp load .
176
+ ```
177
+
178
+ ``` console
160
179
$ tmuxp load ../
180
+ ```
181
+
182
+ ``` console
161
183
$ tmuxp load path/to/folder/
184
+ ```
185
+
186
+ ``` console
162
187
$ tmuxp load /path/to/folder/
188
+ ```
163
189
164
- # name of the config, assume $HOME /.tmuxp/myconfig.yaml
190
+ Name of the config, assume ` $HOME/.tmuxp/myconfig.yaml ` :
191
+ ``` console
165
192
$ tmuxp load myconfig
193
+ ```
194
+
195
+ Direct path to json/yaml file:
166
196
167
- # direct path to json/yaml file
197
+ ``` console
168
198
$ tmuxp load ./myfile.yaml
199
+ ```
200
+
201
+ ``` console
169
202
$ tmuxp load /abs/path/to/myfile.yaml
203
+ ```
204
+
205
+ ``` console
170
206
$ tmuxp load ~ /myfile.yaml
171
207
```
172
208
173
209
Absolute and relative directory paths are supported.
174
210
175
211
``` console
176
-
177
212
$ tmuxp load [filename]
178
-
179
213
```
180
214
181
215
Files named ` .tmuxp.yaml ` or ` .tmuxp.json ` in the current working
182
216
directory may be loaded with:
183
217
184
218
``` console
185
-
186
219
$ tmuxp load .
187
-
188
220
```
189
221
190
222
If you try to load a config file from within a tmux session, it will ask you
@@ -201,7 +233,13 @@ All of these options can be preselected to skip the prompt:
201
233
202
234
``` console
203
235
$ tmuxp load -y config # load attached
236
+ ```
237
+
238
+ ``` console
204
239
$ tmuxp load -d config # load detached
240
+ ```
241
+
242
+ ``` console
205
243
$ tmuxp load -a config # append windows
206
244
```
207
245
@@ -210,29 +248,23 @@ without being attached. The last one will be attached if there is no
210
248
` -d ` flag on the command line.
211
249
212
250
``` console
213
-
214
251
$ tmuxp load [filename1] [filename2] ...
215
-
216
252
```
217
253
218
254
A session name can be provided at the terminal. If multiple sessions
219
255
are created, the last session is named from the terminal.
220
256
221
257
``` console
222
-
223
258
$ tmuxp load -s [new_session_name] [filename1] ...
224
-
225
259
```
226
260
227
261
The output of the ` load ` command can be logged to a file for
228
262
debugging purposes. the log level can be controlled with the global
229
263
` --log-level ` option (defaults to INFO).
230
264
231
265
``` console
232
-
233
266
$ tmuxp load [filename] --log-file [log_filename]
234
267
$ tmuxp --log-level [LEVEL] load [filename] --log-file [log_filename]
235
-
236
268
```
237
269
238
270
(cli-debug-info)=
0 commit comments