Skip to content

Commit 8c6ec3f

Browse files
authored
Merge branch 'master' into add-output-file-and-format-cmdline-options
2 parents 3fe3a0f + c2b57ee commit 8c6ec3f

27 files changed

+1257
-710
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/workflows/publish-docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: [ '3.x' ]
14+
python-version: [ '3.10' ]
1515
steps:
1616
- uses: actions/checkout@v1
1717
- name: Configure git
@@ -52,8 +52,8 @@ jobs:
5252
- name: Install poetry
5353
if: env.PUBLISH == 'true'
5454
run: |
55-
curl -O -sSL https://raw.githubusercontent.com/sdispater/poetry/master/install-poetry.py
56-
python install-poetry.py -y --version 1.1.7
55+
curl -O -sSL https://install.python-poetry.org/install-poetry.py
56+
python install-poetry.py -y --version 1.1.12
5757
echo "PATH=${HOME}/.poetry/bin:${PATH}" >> $GITHUB_ENV
5858
rm install-poetry.py
5959

.github/workflows/tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python-version: [ '3.x' ]
13+
python-version: [ '3.10' ]
1414
tmux-version: [ '2.6', '2.7', '2.8', '3.0a', '3.1b', '3.2a', 'master' ]
1515
steps:
1616
- uses: actions/checkout@v1
@@ -27,8 +27,8 @@ jobs:
2727

2828
- name: Install poetry
2929
run: |
30-
curl -O -sSL https://raw.githubusercontent.com/sdispater/poetry/master/install-poetry.py
31-
python install-poetry.py -y --version 1.1.7
30+
curl -O -sSL https://install.python-poetry.org/install-poetry.py
31+
python install-poetry.py -y --version 1.1.12
3232
echo "PATH=${HOME}/.poetry/bin:${PATH}" >> $GITHUB_ENV
3333
rm install-poetry.py
3434
@@ -50,8 +50,8 @@ jobs:
5050
with:
5151
path: |
5252
.venv
53-
{{ env.poetry_cache_dir }}
54-
{{ env.poetry_virtualenvs_path }}
53+
${{ env.poetry_cache_dir }}
54+
${{ env.poetry_virtualenvs_path }}
5555
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
5656

5757
- name: Ensure cache is healthy

.pre-commit-config.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 22.1.0
4+
hooks:
5+
- id: black
6+
language_version: python3.10
7+
- repo: https://github.com/pycqa/isort
8+
rev: 5.10.1
9+
hooks:
10+
- id: isort
11+
name: isort (python)
12+
- repo: https://github.com/PyCQA/flake8
13+
rev: 4.0.1
14+
hooks:
15+
- id: flake8

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
poetry 1.1.7
1+
poetry 1.1.12

CHANGES

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,107 @@
33
## current
44

55
- _Insert changes/features/fixes for next release here_
6+
7+
#### What's new
8+
9+
- #672: Panes now accept `shell` for their initial command.
10+
11+
Equivalent to `tmux split-windows`'s `[shell-command]`
12+
13+
```yaml
14+
session_name: Pane shell example
15+
windows:
16+
- window_name: first
17+
window_shell: /usr/bin/python2
18+
layout: even-vertical
19+
suppress_history: false
20+
options:
21+
remain-on-exit: true
22+
panes:
23+
- shell: /usr/bin/python3
24+
shell_command:
25+
- print('This is python 3')
26+
- shell: /usr/bin/vim -u none
27+
shell_command:
28+
- iAll panes have the `remain-on-exit` setting on.
29+
- When you exit out of the shell or application, the panes will remain.
30+
- Use tmux command `:kill-pane` to remove the pane.
31+
- Use tmux command `:respawn-pane` to restart the shell in the pane.
32+
- Use <Escape> and then `:q!` to get out of this vim window. :-)
33+
- shell_command:
34+
- print('Hello World 2')
35+
- shell: /usr/bin/top
36+
```
37+
38+
Credit: @jerri
39+
40+
#### Improvements
41+
42+
- Improve `tmuxp freeze` UX flow, credit @joseph-flinn (#657, in re: #627)
43+
- `tmuxp freeze` will now detect the attached session if no session name
44+
is specified. Credit: @will-ockmore. (#660)
45+
46+
#### Bugs
47+
48+
- Fix loading of `.yml` files with `tmuxp convert`, thank you @kalixi! (#725)
49+
50+
## tmuxp 1.9.4 (2022-01-10)
51+
52+
#### Packaging
53+
54+
- `poetry build` used to package in place of `python setup.py build` (#729)
55+
56+
Package maintainers: If you run into any issues check in at
57+
[#625](https://github.com/tmux-python/tmuxp/issues/625) and file an issue.
58+
59+
Additionally, `libtmux` has been pinned to a similar release at
60+
[0.10.3](https://pypi.org/project/libtmux/0.10.3/) which has used the new
61+
build process.
62+
63+
- `poetry publish` instead of `twine upload dist/*` (#729)
64+
65+
Similar to the above, reach out to the #625 issue if you bump into problems.
66+
67+
#### What's new
68+
69+
- `tmuxp edit` for configuration changes (#707, @GlebPoljakov)
70+
71+
Inside of configuration directory: `tmuxp edit yourconfig`
72+
73+
Inside a project: `tmuxp edit .`
74+
75+
### Removed support
76+
77+
- Python 3.6 support has been removed (#726)
78+
79+
### Development
80+
81+
- We are trying `.pre-commit-config.yaml` in pull requests to automate
82+
black, isort and flake8 for those who forget (#726)
83+
- Poetry update 1.1.7 -> 1.1.12 and use new installer URL (#726)
84+
- Black updated 21.9b0 -> 21.12b0 (#726)
85+
86+
## tmuxp 1.9.3 (2021-10-30)
87+
88+
- #700: Add `-h` / `--help` option, thanks @GHPS
689
- #689: Update poetry to 1.1
790
- CI: Use poetry 1.1.7 and `install-poetry.py` installer
891
- Relock poetry.lock at 1.1 (w/ 1.1.7's fix)
92+
- #696: Typo fix, thanks @inkch
993

1094
## tmuxp 1.9.2 (2021-06-17)
95+
1196
- #686: Allow click 8.0.x
1297
- Remove `manual/`, move to https://github.com/tmux-python/tmux-manuals
1398

1499
## tmuxp 1.9.1 (2021-06-16)
100+
15101
- libtmux: Update to 0.10.1+ to include `Window.select_window()` fix
16102

17103
https://github.com/tmux-python/libtmux/pull/271
18104

19105
## tmuxp 1.9.0 (2021-06-16)
106+
20107
- libtmux: Update to 0.10.x
21108

22109
## tmuxp 1.8.2 (2021-06-15)

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
include README.md LICENSE CHANGES pyproject.toml .tmuxp.yaml
2-
include requirements/*.txt
32
recursive-include docs *.md
43
recursive-include tests *.py *.yaml *.json *.sh
54
recursive-include examples *.yaml *.json

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ $ tmuxp load mysession ./another/project/
7474
Name a session:
7575

7676
```bash
77-
$ tmxup load -s session_name ./mysession.yaml
77+
$ tmuxp load -s session_name ./mysession.yaml
7878
```
7979

8080
[simple](http://tmuxp.git-pull.com/examples.html#short-hand-inline) and
@@ -239,7 +239,7 @@ See donation options at <https://git-pull.com/support.html>.
239239
# Project details
240240
241241
- tmux support: 1.8, 1.9a, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
242-
- python support: >= 3.6, pypy, pypy3
242+
- python support: >= 3.7, pypy, pypy3
243243
- Source: <https://github.com/tmux-python/tmuxp>
244244
- Docs: <https://tmuxp.git-pull.com>
245245
- API: <https://tmuxp.git-pull.com/api.html>

docs/cli.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,19 @@ my_window
130130
## Freeze sessions
131131

132132
```
133+
tmuxp freeze
133134
tmuxp freeze <session_name>
135+
tmuxp freeze --force <session_name>
134136
```
135137

136138
You can save the state of your tmux session by freezing it.
137139

138140
Tmuxp will offer to save your session state to `.json` or `.yaml`.
139141

142+
If no session is specified, it will default to the attached session.
143+
144+
If the `--force` argument is passed, it will overwrite any existing config file with the same name.
145+
140146
(cli-load)=
141147

142148
## Load session
@@ -212,7 +218,7 @@ are created, the last session is named from the terminal.
212218

213219
```{code-block} bash
214220
215-
$ tmxup load -s <new_session_name> <filename1> ...
221+
$ tmuxp load -s <new_session_name> <filename1> ...
216222
217223
```
218224

docs/examples.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,26 @@ without `window_index` will use the lowest available window index.
307307

308308
```
309309

310+
## Shell per pane
311+
312+
Every pane can have its own shell or application started. This allows for usage
313+
of the ``remain-on-exit`` setting to be used properly, but also to have
314+
different shells on different panes.
315+
316+
### YAML
317+
318+
```{literalinclude} ../examples/pane-shell.yaml
319+
:language: yaml
320+
321+
```
322+
323+
### JSON
324+
325+
```{literalinclude} ../examples/pane-shell.json
326+
:language: json
327+
328+
```
329+
310330
## Set tmux options
311331

312332
Works with global (server-wide) options, session options
@@ -387,7 +407,6 @@ pane during creation.
387407

388408
```
389409

390-
391410
## Multi-line commands
392411

393412
You can use YAML's multiline syntax to easily split multiple
@@ -396,7 +415,7 @@ commands into the same shell command: https://stackoverflow.com/a/21699210
396415
```{code-block} yaml
397416
398417
session_name: my project
399-
shell_command_before:
418+
shell_command_before:
400419
- >
401420
[ -d `.venv/bin/activate` ] &&
402421
source .venv/bin/activate &&

0 commit comments

Comments
 (0)