Skip to content

Commit 4d3981f

Browse files
committed
docs: Even more highlighting improvesments
1 parent 8f21249 commit 4d3981f

File tree

5 files changed

+49
-47
lines changed

5 files changed

+49
-47
lines changed

docs/cli.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ See the [click library's documentation on shell completion](https://click.pallet
1414

1515
In bash (`~/.bashrc`):
1616

17-
```{code-block} sh
17+
```console
1818

1919
eval "$(_TMUXP_COMPLETE=bash_source tmuxp)"
2020

2121
```
2222

2323
In zsh (`~/.zshrc`):
2424

25-
```{code-block} sh
25+
```console
2626

2727
eval "$(_TMUXP_COMPLETE=zsh_source tmuxp)"
2828

@@ -78,7 +78,7 @@ Pane(%6 Window(@3 1:your_window, Session($1 your_project)))
7878
Python 3.7 supports [PEP 553][pep 553]'s `PYTHONBREAKPOINT` and supports
7979
compatible debuggers, for instance [ipdb][ipdb]:
8080
81-
```{code-block} sh
81+
```console
8282
8383
$ pip install --user ipdb
8484
$ env PYTHONBREAKPOINT=ipdb.set_trace tmuxp shell
@@ -87,7 +87,7 @@ $ env PYTHONBREAKPOINT=ipdb.set_trace tmuxp shell
8787
You can also pass in python code directly, similar to `python -c`, do
8888
this via `tmuxp -c`:
8989

90-
```{code-block} shell
90+
```consoleell
9191
9292
$ tmuxp shell -c 'print(session.name); print(window.name)'
9393
my_server
@@ -157,25 +157,25 @@ shorthands:
157157
2. The name of the project file in your {}`$HOME/.tmuxp` folder
158158
3. The direct path of the tmuxp file you want to load
159159

160-
```
160+
```console
161161
# path to folder with .tmuxp.{yaml,yml,json}
162-
tmuxp load .
163-
tmuxp load ../
164-
tmuxp load path/to/folder/
165-
tmuxp load /path/to/folder/
162+
$ tmuxp load .
163+
$ tmuxp load ../
164+
$ tmuxp load path/to/folder/
165+
$ tmuxp load /path/to/folder/
166166

167167
# name of the config, assume $HOME/.tmuxp/myconfig.yaml
168-
tmuxp load myconfig
168+
$ tmuxp load myconfig
169169

170170
# direct path to json/yaml file
171-
tmuxp load ./myfile.yaml
172-
tmuxp load /abs/path/to/myfile.yaml
173-
tmuxp load ~/myfile.yaml
171+
$ tmuxp load ./myfile.yaml
172+
$ tmuxp load /abs/path/to/myfile.yaml
173+
$ tmuxp load ~/myfile.yaml
174174
```
175175

176176
Absolute and relative directory paths are supported.
177177

178-
```{code-block} bash
178+
```console
179179

180180
$ tmuxp load <filename>
181181

@@ -184,7 +184,7 @@ $ tmuxp load <filename>
184184
Files named `.tmuxp.yaml` or `.tmuxp.json` in the current working
185185
directory may be loaded with:
186186

187-
```{code-block} bash
187+
```console
188188

189189
$ tmuxp load .
190190

@@ -202,15 +202,17 @@ Or (a)ppend windows in the current active session?
202202

203203
All of these options can be preselected to skip the prompt:
204204

205-
```{code-block} bash $ tmuxp load -y config # load attached $ tmuxp load -d config # load detached $ tmuxp load -a config # append windows
206-
205+
```console
206+
$ tmuxp load -y config # load attached
207+
$ tmuxp load -d config # load detached
208+
$ tmuxp load -a config # append windows
207209
```
208210

209211
Multiple sessions can be loaded at once. The first ones will be created
210212
without being attached. The last one will be attached if there is no
211213
`-d` flag on the command line.
212214

213-
```{code-block} bash
215+
```console
214216

215217
$ tmuxp load <filename1> <filename2> ...
216218

@@ -219,7 +221,7 @@ $ tmuxp load <filename1> <filename2> ...
219221
A session name can be provided at the terminal. If multiple sessions
220222
are created, the last session is named from the terminal.
221223

222-
```{code-block} bash
224+
```console
223225

224226
$ tmuxp load -s <new_session_name> <filename1> ...
225227

@@ -229,7 +231,7 @@ The output of the `load` command can be logged to a file for
229231
debugging purposes. the log level can be controlled with the global
230232
`--log-level` option (defaults to INFO).
231233

232-
```{code-block} bash
234+
```console
233235

234236
$ tmuxp load <filename> --log-file <log_filename>
235237
$ tmuxp --log-level <LEVEL> load <filename> --log-file <log_filename>
@@ -243,7 +245,7 @@ $ tmuxp --log-level <LEVEL> load <filename> --log-file <log_filename>
243245
Use to collect all relevant information for submitting an issue to
244246
the project.
245247

246-
```{code-block} bash
248+
```console
247249

248250
$ tmuxp debug-info
249251
--------------------------

docs/developing.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ using `$ tmux -L test_case`.
2323

2424
To begin developing, check out the code from github:
2525

26-
```{code-block} bash
26+
```console
2727

2828
$ git clone git@github.com:tmux-python/tmuxp.git
2929
$ cd tmuxp
@@ -35,23 +35,23 @@ $ cd tmuxp
3535
Now create a virtualenv, if you don't know how to, you can create a
3636
virtualenv with:
3737

38-
```{code-block} bash
38+
```console
3939

4040
$ virtualenv .venv
4141

4242
```
4343

4444
Then activate it to your current tty / terminal session with:
4545

46-
```{code-block} bash
46+
```console
4747

4848
$ source .venv/bin/activate
4949

5050
```
5151

5252
Good! Now let's run this:
5353

54-
```{code-block} bash
54+
```console
5555

5656
$ pip install -e .
5757

@@ -61,7 +61,7 @@ This has `pip`, a python package manager install the python package
6161
in the current directory. `-e` means `--editable`, which means you can
6262
adjust the code and the installed software will reflect the changes.
6363

64-
```{code-block} bash
64+
```console
6565

6666
$ tmuxp
6767

@@ -75,7 +75,7 @@ For information on installing poetry visit the [poetry's documentation][poetry's
7575

7676
To begin developing, check out the code from github:
7777

78-
```{code-block} bash
78+
```console
7979

8080
$ git clone git@github.com:tmux-python/tmuxp.git
8181
$ cd tmuxp
@@ -85,7 +85,7 @@ $ cd tmuxp
8585
You can create a virtualenv, and install all of the locked
8686
packages as listed in poetry.lock:
8787

88-
```{code-block} bash
88+
```console
8989

9090
$ poetry install
9191

@@ -95,7 +95,7 @@ If you ever need to update packages during your development session, the
9595
following command can be used to update all packages as per poetry settings or
9696
individual package (second command):
9797

98-
```{code-block} bash
98+
```console
9999

100100
$ poetry update
101101
$ poetry update requests
@@ -104,7 +104,7 @@ $ poetry update requests
104104

105105
Then activate it to your current tty / terminal session with:
106106

107-
```{code-block} bash
107+
```console
108108

109109
$ poetry shell
110110

@@ -122,7 +122,7 @@ since you are in the virtual environment, your {}`PATH` environment was
122122
updated to include a special version of `python` inside your `.venv`
123123
folder with its own packages.
124124

125-
```{code-block} bash
125+
```console
126126

127127
$ make test
128128

@@ -139,15 +139,15 @@ If you found a problem or are trying to write a test, you can file an
139139

140140
Test only a file:
141141

142-
```{code-block} bash
142+
```console
143143

144144
$ py.test tests/test_config.py
145145

146146
```
147147

148148
will test the `tests/test_config.py` tests.
149149

150-
```{code-block} bash
150+
```console
151151

152152
$ py.test tests/test_config.py::test_export_json
153153

@@ -157,7 +157,7 @@ tests `test_export_json` inside of `tests/test_config.py`.
157157

158158
Multiple can be separated by spaces:
159159

160-
```{code-block} bash
160+
```console
161161

162162
$ py.test tests/test_{window,pane}.py tests/test_config.py::test_export_json
163163

@@ -200,7 +200,7 @@ variants, including Debian, Ubuntu, FreeBSD, OS X.
200200
201201
To run all tests upon editing any `.py` file:
202202
203-
```{code-block} bash
203+
```console
204204
205205
$ make watch_test
206206
@@ -209,7 +209,7 @@ $ make watch_test
209209
You can also re-run a specific test file or any other [py.test usage
210210
argument][py.test usage argument]:
211211

212-
```{code-block} bash
212+
```console
213213

214214
$ make watch_test test=tests/test_config.py
215215

@@ -221,7 +221,7 @@ $ make watch_test test='-x tests/test_config.py tests/test_util.py'
221221

222222
Rebuild the documentation when an `.rst` file is edited:
223223

224-
```{code-block} bash
224+
```console
225225

226226
$ cd doc
227227
$ make watch
@@ -242,7 +242,7 @@ $ make SPHINXBUILD='poetry run sphinx-build' watch
242242

243243
After you {ref}`install_dev_env`, when inside the tmuxp checkout:
244244

245-
```{code-block} bash
245+
```console
246246

247247
$ tmuxp load .
248248

docs/examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ You can load your software project in tmux by placing a `.tmuxp.yaml` or
501501
tmuxp supports loading configs via absolute filename with `tmuxp load`
502502
and via `$ tmuxp load .` if config is in directory.
503503

504-
```{code-block} bash
504+
```console
505505

506506
$ tmuxp load ~/workspaces/myproject.yaml
507507

docs/plugin_system.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ suggested to use it when developing plugins; however, `pip` will work
3939
just as well. Only one of the configuration files is needed for the packaging
4040
tool that the package developer desides to use.
4141

42-
```{code-block} bash
42+
```console
4343

4444
python_module
4545
├── tmuxp_plugin_my_plugin_module

docs/quickstart.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66

77
Assure you have at least tmux **>= 1.8** and python **>= 2.6**.
88

9-
```{code-block} bash
9+
```console
1010

1111
$ pip install --user tmuxp
1212

1313
```
1414

1515
You can upgrade to the latest release with:
1616

17-
```{code-block} bash
17+
```console
1818

1919
$ pip install --user tmuxp -U
2020

@@ -24,7 +24,7 @@ Then install {ref}`completion`.
2424

2525
If you are a Homebrew user you can install it with:
2626

27-
```{code-block} bash
27+
```console
2828

2929
$ brew install tmuxp
3030

@@ -56,7 +56,7 @@ Create a file, `~/.tmuxp/example.yaml`:
5656
5757
```
5858

59-
```{code-block} bash
59+
```console
6060

6161
$ tmuxp load example.yaml
6262

@@ -66,7 +66,7 @@ This creates your tmuxp session.
6666

6767
Load multiple tmux sessions at once:
6868

69-
```{code-block} bash
69+
```console
7070

7171
$ tmuxp load example.yaml anothersession.yaml
7272

@@ -79,15 +79,15 @@ the current active session.
7979
You can also have a custom tmuxp config directory by setting the
8080
`TMUX_CONFIGDIR` in your environment variables.
8181

82-
```{code-block} bash
82+
```console
8383

8484
$ TMUXP_CONFIGDIR=$HOME/.tmuxpmoo tmuxp load cpython
8585

8686
```
8787

8888
Or in your `~/.bashrc` / `~/.zshrc` you can set:
8989

90-
```{code-block} bash
90+
```console
9191

9292
export TMUXP_CONFIGDIR=$HOME/.yourconfigdir/tmuxp
9393

0 commit comments

Comments
 (0)