Skip to content

Reuse#199

Merged
greymd merged 12 commits intogreymd:masterfrom
jmeurin:reuse
Jan 9, 2024
Merged

Reuse#199
greymd merged 12 commits intogreymd:masterfrom
jmeurin:reuse

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.
greymd added 10 commits January 6, 2024 13:32
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
@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.

2 participants