Skip to content

Commit

Permalink
Merge pull request #97 from greymd/develop-3.1.0
Browse files Browse the repository at this point in the history
Develop 3.1.0
  • Loading branch information
greymd authored Aug 2, 2018
2 parents f006af7 + 2bfc6d5 commit cd80722
Show file tree
Hide file tree
Showing 12 changed files with 1,096 additions and 197 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
test/cases_pairwise.sh
tags
132 changes: 66 additions & 66 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,137 +23,137 @@ matrix:
## CASES are generated by pict and Pairwise technique. Refer to ./test/travis.pict.

- os: linux
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=1.8 CASES=3,15,18,26,27,28,38,45
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=1.8 CASES=5,8,15,16,33,42,57,61
- os: linux
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=1.9 CASES=5,7,10,14,16,23,36,57
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=1.9 CASES=1,11,16,18,24,25,39
- os: linux
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=1.9a CASES=12,36,50,55,56
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=1.9a CASES=1,11,21,30,34,40,41,46,47,52,54,55
- os: linux
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=2.0 CASES=7,8,12,16,30,36,41,44,47,50,51,60
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=2.0 CASES=2,4,5,10,13,18,20,27,35,37,53,57
- os: linux
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=2.1 CASES=8,9,23,24,29,32,34,39
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=2.1 CASES=13,20,22,25,29,31,33,37,40,48,49,60
- os: linux
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=2.2 CASES=2,3,8,9,12,32,34,39,40,47,53
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=2.2 CASES=12,14,15,26,27,29,30,33,45,61
- os: linux
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=2.3 CASES=4,8,11,15,16,18,24,28,32,39,58,59
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=2.3 CASES=1,17,36,38,48,65,66
- os: linux
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=2.4 CASES=5,7,9,13,22,29,33,35,37,43,44,46,52
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=2.4 CASES=6,18,28,31,38,41,56,58,63
- os: linux
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=2.5 CASES=2,3,6,10,17,20,22,23,40,48,49,54
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=2.5 CASES=2,3,7,17,19,30,50,57
- os: linux
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=2.6 CASES=1,21,25,26,31,35,36,53,56
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=2.6 CASES=4,6,7,9,24,26,32,33,39,47,51,55,59
- os: linux
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=2.7 CASES=10,13,19,20,27,42,46,48,54,57
env: SH=bash SH_VERSION=3.2 TMUX_VERSION=2.7 CASES=4,7,23,27,42,43,44,48,53,62,64
- os: linux
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=1.8 CASES=4,19,23,24,34,43,48
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=1.8 CASES=1,4,11,20,25,27,60
- os: linux
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=1.9 CASES=9,29,31,33,34,35,41,47
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=1.9 CASES=7,12,15,21,22,23,26,30,37,42,44,47,48,52
- os: linux
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=1.9a CASES=1,10,16,17,21,24,25,27,28,29,32,33,37,60
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=1.9a CASES=15,17,19,27,35,42,51,56,57
- os: linux
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=2.0 CASES=2,13,25,42,54
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=2.0 CASES=9,17,23,26,28,32,34,36,42,44,49,54,63
- os: linux
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=2.1 CASES=15,20,28,37,40,41,42,43,54,57
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=2.1 CASES=11,17,19,24,35,43,46,55
- os: linux
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=2.2 CASES=5,7,13,17,27,38,42,46,48,50,56,57
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=2.2 CASES=2,6,9,16,19,20,31,40,52,53,54,55,57,63,64
- os: linux
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=2.3 CASES=5,7,26,29,33,35,41,46,58
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=2.3 CASES=9,11,22,26,27,31,33,35,57,58,59,64
- os: linux
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=2.4 CASES=1,6,12,16,17,26,31,36,39,40,41,55
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=2.4 CASES=3,5,7,13,20,25,29,32,40,46,50,53
- os: linux
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=2.5 CASES=1,4,7,8,16,18,19,32,38,44,47,59
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=2.5 CASES=1,5,10,16,18,21,36,39,48,55,64
- os: linux
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=2.6 CASES=3,5,6,11,14,23,37,39,42,51,52,54,55
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=2.6 CASES=2,14,23,38,41,44,45,49,61,65,66
- os: linux
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=2.7 CASES=9,11,15,16,22,25,26,30,33,45,49,52,53
env: SH=bash SH_VERSION=4.0 TMUX_VERSION=2.7 CASES=1,6,8,21,38,41,47,51,62
- os: linux
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=1.8 CASES=8,20,25,37,41,55,57
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=1.8 CASES=3,7,10,12,18,26,35,40,41,46,55,63
- os: linux
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=1.9 CASES=1,3,17,37,42,45,46,49,60
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=1.9 CASES=3,8,10,29,32,41,56,57,64
- os: linux
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=1.9a CASES=4,13,20,22,39,40,43,44,45,46,57
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=1.9a CASES=5,9,10,18,22,24,31,43,44,49,50,53
- os: linux
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=2.0 CASES=4,5,11,18,21,26,32,33,46,53,55
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=2.0 CASES=14,19,21,25,30,51
- os: linux
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=2.1 CASES=2,4,10,12,17,31,36,38,52
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=2.1 CASES=6,12,15,30,34,41,54,56
- os: linux
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=2.2 CASES=4,14,19,21,23,26,35,37,41,54
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=2.2 CASES=1,7,22,28,35,37,46,48,56,60
- os: linux
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=2.3 CASES=3,12,13,48,57
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=2.3 CASES=3,4,8,12,13,19,23,39,40,45
- os: linux
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=2.4 CASES=8,11,18,24,25,28,30,48,53
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=2.4 CASES=9,10,14,15,16,21,33,39,42,44,49,52,58,66
- os: linux
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=2.5 CASES=9,15,25,26,27,34,42,51,52
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=2.5 CASES=14,20,22,24,25,27,34,38,43,47,54,61,63
- os: linux
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=2.6 CASES=7,16,18,30,33,38,43,48,49,50,58
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=2.6 CASES=5,17,18,20,37,46,54,59,62
- os: linux
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=2.7 CASES=4,6,29,35,41,44,47,55,56,59
env: SH=bash SH_VERSION=4.1 TMUX_VERSION=2.7 CASES=2,5,11,13,14,32,36,37,61,65
- os: linux
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=1.8 CASES=5,9,14,16,21,36,46,60
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=1.8 CASES=13,22,28,29,30,37,43,45
- os: linux
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=1.9 CASES=2,4,13,19,21,22,26,27,28,30,32,44,53,54
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=1.9 CASES=5,6,19,27,35,38,46,51,53,63
- os: linux
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=1.9a CASES=7,8,31,34,38,42,51
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=1.9a CASES=2,8,13,14,20,26,36,38,39,48,60
- os: linux
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=2.0 CASES=1,9,10,19,23,31,39,45,48,49,56
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=2.0 CASES=1,6,7,16,29,33,40,43,45,46,50,61,64
- os: linux
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=2.1 CASES=6,7,13,18,19,22,30,33,35,47,50
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=2.1 CASES=8,14,16,23,27,32,36,39,45,47,52,53,57,63
- os: linux
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=2.2 CASES=1,11,24,29,30,33,52,55
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=2.2 CASES=4,13,21,24,38,42,44,49
- os: linux
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=2.3 CASES=14,20,23,25,37,43
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=2.3 CASES=7,10,15,24,32,41,43,44,46,55
- os: linux
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=2.4 CASES=3,10,15,38,47,49,51,57
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=2.4 CASES=1,4,11,17,19,22,23,43,47
- os: linux
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=2.5 CASES=21,24,29,41,43,45
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=2.5 CASES=9,11,23,33,37,44,51,58,59,65
- os: linux
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=2.6 CASES=12,20,22,28,40,44,45,47,59
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=2.6 CASES=12,21,29,30,31,35,42,48,56,62,66
- os: linux
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=2.7 CASES=5,12,17,21,24,32,36,39,58
env: SH=bash SH_VERSION=4.2 TMUX_VERSION=2.7 CASES=3,12,15,17,18,25,33,34,40,54
- os: linux
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=1.8 CASES=1,7,11,12,13,22,39,44
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=1.8 CASES=14,17,21,24,34,38,44,47
- os: linux
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=1.9 CASES=8,15,18,20,38,39,43,50,52
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=1.9 CASES=2,33,34,36,40,43,54,55,61
- os: linux
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=1.9a CASES=2,3,5,6,14,35,47,52,54
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=1.9a CASES=6,7,28,37,45,61,63,64
- os: linux
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=2.0 CASES=6,14,15,17,22,29,34,37,38,40,43
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=2.0 CASES=8,15,31,38,41,55,60
- os: linux
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=2.1 CASES=1,11,16,26,44,45,48,49,56
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=2.1 CASES=3,4,9,18,26,28,42,50,61
- os: linux
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=2.2 CASES=18,25,49,51,60
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=2.2 CASES=3,8,10,11,23,25,39,47,50
- os: linux
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=2.3 CASES=9,10,27,30,36,40,42,44,45
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=2.3 CASES=5,21,25,30,34,37,42
- os: linux
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=2.4 CASES=4,14,19,21,23,34,42,50,56,58
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=2.4 CASES=2,8,12,24,27,48,51,57,59,65
- os: linux
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=2.5 CASES=5,28,30,31,33,36,37,46,53,55,56
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=2.5 CASES=4,8,12,29,31,32,35,45,46,52,56,66
- os: linux
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=2.6 CASES=8,9,15,19,24,29,32,34,41,57,59
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=2.6 CASES=1,11,13,15,16,19,28,43,52,53,57,62,63
- os: linux
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=2.7 CASES=1,2,18,23,28,38,40
env: SH=bash SH_VERSION=4.3 TMUX_VERSION=2.7 CASES=9,10,16,19,20,22,24,26,28,29,31,35,49,50,52,58
- os: linux
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=1.8 CASES=10,17,29,30,33,35,40,42,47
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=1.8 CASES=9,19,23,36,39,48,64
- os: linux
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=1.9 CASES=6,11,12,24,25,40,48,51,55,56
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=1.9 CASES=4,9,13,14,17,20,28,31,45,49,50,60
- os: linux
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=1.9a CASES=9,11,15,18,19,23,26,30,41,48,49,53
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=1.9a CASES=3,4,12,16,23,25,29,32,33
- os: linux
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=2.0 CASES=3,20,24,27,28,35,52,57
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=2.0 CASES=3,11,12,22,24,39,47,48,52,56
- os: linux
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=2.1 CASES=3,5,14,21,25,27,46,51,53,55,60
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=2.1 CASES=1,2,5,7,10,21,38,44,51,64
- os: linux
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=2.2 CASES=6,10,15,16,20,22,28,31,36,43,44,45
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=2.2 CASES=5,17,18,32,34,36,41,43,51
- os: linux
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=2.3 CASES=1,17,19,21,22,31,34,38,47,55
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=2.3 CASES=14,16,18,20,28,29,47,63
- os: linux
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=2.4 CASES=2,20,27,32,45,54,59
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=2.4 CASES=26,30,34,35,36,37,45,54,55,61,64
- os: linux
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=2.5 CASES=11,12,13,14,35,39,50,57,58
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=2.5 CASES=6,13,15,26,28,40,41,42,49,53,65
- os: linux
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=2.6 CASES=2,4,10,13,17,27,46
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=2.6 CASES=3,8,10,22,25,27,34,36,40,50,58,64
- os: linux
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=2.7 CASES=3,7,8,14,31,34,37,43,50,51
env: SH=bash SH_VERSION=4.4 TMUX_VERSION=2.7 CASES=30,39,45,46,55,56,57,59,62,63,66

before_script:
- export TMPDIR=$TRAVIS_BUILD_DIR/tmp
Expand Down
68 changes: 60 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
$ xpanes -c "ping {}" 192.168.0.{1..9}
```

#### Connect to multiple hosts over SSH and record each operation log
#### Connect to multiple hosts over SSH and start logging for each operation

```sh
$ xpanes --log=~/log --ssh user1@host1 user2@host2 user2@host3
Expand All @@ -28,14 +28,14 @@ $ xpanes --log=~/log --ssh user1@host1 user2@host2 user2@host3
#### Monitor CPU, Memory, Load, Processes and Disk info every seconds

```sh
$ xpanes -e "top" "vmstat 1" "watch -n 1 df"
$ xpanes -x -e "top" "vmstat 1" "watch -n 1 df"
```


#### Operate running Docker containers on the interactive screen

```sh
$ docker ps -q | xpanes -c "docker exec -it {} sh"
$ docker ps -q | xpanes -s -c "docker exec -it {} sh"
```


Expand Down Expand Up @@ -127,13 +127,16 @@ OPTIONS:
mh main-horizontal
mv main-vertical
-n <number> Set the maximum number of arguments taken for each pane of <utility>.
-s Speedy mode: Run command without creating a login shell.
-ss Speedy mode AND close the pane automatically at the same time as the process ends.
-S <socket-path> Specify a full alternative path to the server socket.
-t Display each argument on the each pane's border.
-t Display each argument on the each pane's border as their title.
-x Create extra panes in the current active window.
--log[=<directory>] Enable logging and store log files to ~/.cache/xpanes/logs or given <directory>.
--log-format=<FORMAT> File name of log files follows given <FORMAT>.
--ssh Same as `-c 'ssh -o StrictHostKeyChecking=no {}' -t`.
--ssh Same as `-t -s -c 'ssh -o StrictHostKeyChecking=no {}'`.
--stay Do not switch to new window.
--debug Print debug message.
```

## Getting Started
Expand Down Expand Up @@ -358,9 +361,11 @@ $ xpanes --ssh myuser1@host1 myuser2@host2
This is same as below.

```
$ xpanes -c "ssh -o StrictHostKeyChecking=no {}" myuser1@host1 myuser2@host2
$ xpanes -t -s -c "ssh -o StrictHostKeyChecking=no {}" myuser1@host1 myuser2@host2
```

`-t` and `-s` options are introduced later.

#### Connecting multiple hosts over SSH **AND logging operations**

```sh
Expand Down Expand Up @@ -431,6 +436,53 @@ $ xpanes -c "ssh -t {} 'sudo some command'" host-{1,2} some-third-host.example.c
+------------------------------------+-------------------------------------+
```

#### Run commands promtply

`-s` option is useful if you have following issues.

* It takes long time to open the multiple new panes because login shell loads a bunch of configures (i.e `~/.zshrc` loads something ).
* If you do not want to leave commands on your shell history.

With `-s` option, `xpanes` does not create a new login shell.
Instead, a command is going to be executed as a direct child process of `xpanes`.

Here is the example.

```sh
$ xpanes -s -c "seq {}" 2 3 4 5
```

As you can see, each pane starts from command's result not `$ seq ...`.

```
+------------------------------------------+------------------------------------------+
│1 │1 │
│2 │2 │
│Pane is dead: Press [Enter] to exit... │3 │
│ │Pane is dead: Press [Enter] to exit... │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
+------------------------------------------+------------------------------------------+
│1 │1 │
│2 │2 │
│3 │3 │
│4 │4 │
│Pane is dead: Press [Enter] to exit... │5 │
│ │Pane is dead: Press [Enter] to exit... │
│ │ │
│ │ │
│ │ │
│ │ │
+------------------------------------------+------------------------------------------+
```

Confirmation message like `Pane is dead...` is shown when process ends.
To suppress the message, use `-ss` instead of `-s`.

#### Display host always

```sh
Expand All @@ -441,7 +493,7 @@ The result is like this.

![png image](https://raw.githubusercontent.com/wiki/greymd/tmux-xpanes/img/ping_pane_title.png)

As you notices that, `-t` displays each argument on the each pane border.
As you notice that, `-t` displays each argument on the each pane border.
It is called "pane title". The pane title is displayed with green background and black characters by default.
See [Environment variables](#shell-variables) section to change the default format.

Expand Down Expand Up @@ -679,7 +731,7 @@ However, giving both `-c` and any arguments causes error. Because the command ca

```bash:tmux_session
$ echo test | xpanes -c 'echo {}' echo
# Error: Both arguments and '-c' option are given.
xpanes:Error: Both arguments and other options (like '-c', '-e') which updates <utility> are given.
```

### Connecting to multiple hosts given by `~/.ssh/config`
Expand Down
Loading

0 comments on commit cd80722

Please sign in to comment.