Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse #199

Merged
merged 12 commits into from Jan 9, 2024
Merged

Reuse #199

merged 12 commits into from Jan 9, 2024

Conversation

jmeurin
Copy link
Contributor

@jmeurin jmeurin commented Jan 5, 2024

Add a 'reuse' option to either create the panes the first time, or reuse
the existing panes.

For example:
xpanes -r -B 'ssh ' -c ' {}' server client

will open 2 new panes. When the host reboots, you can rerun the same
command and the existing panes will be reused.

This 'reuse' option either creates the panes the first time, or reuse
the existing panes.

For example:
xpanes -r -B 'ssh <host>' -c '<program> {}' server client

will open 2 new panes.  When host reboots, you can rerun the same
command and the existing panes will the reused.
This 'reuse' option either creates the panes the first time, or reuse
the existing panes.

For example:
xpanes -r -B 'ssh <host>' -c '<program> {}' server client

will open 2 new panes.  When the host reboots, you can rerun the same
command and the existing panes will be reused.
docker run -v $PWD:/tmp -i mvdan/shfmt:v3.1.0-alpine shfmt -i 2 -ci -sr
-kp -w /tmp/bin/xpanes
If tmux session is not active, there should not panes to be reused.

```
$ ./bin/xpanes -r 1 2 3
[xpanes:error] '-r' must be used on the running tmux session.
$ echo $?
1
```
@greymd greymd merged commit 5972625 into greymd:master Jan 9, 2024
182 checks passed
@greymd
Copy link
Owner

greymd commented Jan 9, 2024

Excellent work
merged

@jmeurin jmeurin deleted the reuse branch January 9, 2024 00:44
@jmeurin
Copy link
Contributor Author

jmeurin commented Jan 9, 2024

Thanks for fixing the tests!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants