|
|
@ -20,6 +20,11 @@ var testTable = []struct {
|
|
|
|
Session: "ses",
|
|
|
|
Session: "ses",
|
|
|
|
Root: "root",
|
|
|
|
Root: "root",
|
|
|
|
BeforeStart: []string{"command1", "command2"},
|
|
|
|
BeforeStart: []string{"command1", "command2"},
|
|
|
|
|
|
|
|
Windows: []Window{
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Name: "win1",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Options{
|
|
|
|
Options{
|
|
|
|
Windows: []string{},
|
|
|
|
Windows: []string{},
|
|
|
@ -29,8 +34,12 @@ var testTable = []struct {
|
|
|
|
"tmux has-session -t ses:",
|
|
|
|
"tmux has-session -t ses:",
|
|
|
|
"/bin/sh -c command1",
|
|
|
|
"/bin/sh -c command1",
|
|
|
|
"/bin/sh -c command2",
|
|
|
|
"/bin/sh -c command2",
|
|
|
|
"tmux new -Pd -s ses -n -c root",
|
|
|
|
"tmux new -Pd -s ses -n smug_def -c root",
|
|
|
|
"tmux attach -d -t ses:",
|
|
|
|
"tmux neww -Pd -t ses: -n win1 -c root",
|
|
|
|
|
|
|
|
"tmux select-layout -t ses:win1 even-horizontal",
|
|
|
|
|
|
|
|
"tmux kill-window -t ses:smug_def",
|
|
|
|
|
|
|
|
"tmux move-window -r -s ses: -t ses:",
|
|
|
|
|
|
|
|
"tmux attach -d -t ses:win1",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
[]string{
|
|
|
|
[]string{
|
|
|
|
"tmux kill-session -t ses",
|
|
|
|
"tmux kill-session -t ses",
|
|
|
@ -67,10 +76,13 @@ var testTable = []struct {
|
|
|
|
Context{},
|
|
|
|
Context{},
|
|
|
|
[]string{
|
|
|
|
[]string{
|
|
|
|
"tmux has-session -t ses:",
|
|
|
|
"tmux has-session -t ses:",
|
|
|
|
"tmux new -Pd -s ses -n win1 -c root",
|
|
|
|
"tmux new -Pd -s ses -n smug_def -c root",
|
|
|
|
"tmux split-window -Pd -t ses:win1 -c root -h",
|
|
|
|
"tmux neww -Pd -t ses: -n win1 -c root",
|
|
|
|
"tmux select-layout -t ses:win1 main-horizontal",
|
|
|
|
"tmux select-layout -t ses:win1 main-horizontal",
|
|
|
|
"tmux attach -d -t ses:",
|
|
|
|
"tmux split-window -Pd -t ses:win1 -c root -h",
|
|
|
|
|
|
|
|
"tmux kill-window -t ses:smug_def",
|
|
|
|
|
|
|
|
"tmux move-window -r -s ses: -t ses:",
|
|
|
|
|
|
|
|
"tmux attach -d -t ses:win1",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
[]string{
|
|
|
|
[]string{
|
|
|
|
"/bin/sh -c stop1",
|
|
|
|
"/bin/sh -c stop1",
|
|
|
@ -100,8 +112,11 @@ var testTable = []struct {
|
|
|
|
Context{},
|
|
|
|
Context{},
|
|
|
|
[]string{
|
|
|
|
[]string{
|
|
|
|
"tmux has-session -t ses:",
|
|
|
|
"tmux has-session -t ses:",
|
|
|
|
"tmux new -Pd -s ses -n win2 -c root",
|
|
|
|
"tmux new -Pd -s ses -n smug_def -c root",
|
|
|
|
|
|
|
|
"tmux neww -Pd -t ses: -n win2 -c root",
|
|
|
|
"tmux select-layout -t ses:win2 even-horizontal",
|
|
|
|
"tmux select-layout -t ses:win2 even-horizontal",
|
|
|
|
|
|
|
|
"tmux kill-window -t ses:smug_def",
|
|
|
|
|
|
|
|
"tmux move-window -r -s ses: -t ses:",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
[]string{
|
|
|
|
[]string{
|
|
|
|
"tmux kill-window -t ses:win2",
|
|
|
|
"tmux kill-window -t ses:win2",
|
|
|
@ -131,7 +146,8 @@ var testTable = []struct {
|
|
|
|
Context{},
|
|
|
|
Context{},
|
|
|
|
[]string{
|
|
|
|
[]string{
|
|
|
|
"tmux has-session -t ses:",
|
|
|
|
"tmux has-session -t ses:",
|
|
|
|
"tmux new -Pd -s ses -n win1 -c root",
|
|
|
|
"tmux new -Pd -s ses -n smug_def -c root",
|
|
|
|
|
|
|
|
"tmux neww -Pd -t ses: -n win1 -c root",
|
|
|
|
"tmux send-keys -t ses:win1 command1 Enter",
|
|
|
|
"tmux send-keys -t ses:win1 command1 Enter",
|
|
|
|
"tmux send-keys -t ses:win1 command2 Enter",
|
|
|
|
"tmux send-keys -t ses:win1 command2 Enter",
|
|
|
|
"tmux select-layout -t ses:win1 even-horizontal",
|
|
|
|
"tmux select-layout -t ses:win1 even-horizontal",
|
|
|
@ -139,19 +155,62 @@ var testTable = []struct {
|
|
|
|
"tmux send-keys -t ses:win2 command3 Enter",
|
|
|
|
"tmux send-keys -t ses:win2 command3 Enter",
|
|
|
|
"tmux send-keys -t ses:win2 command4 Enter",
|
|
|
|
"tmux send-keys -t ses:win2 command4 Enter",
|
|
|
|
"tmux select-layout -t ses:win2 even-horizontal",
|
|
|
|
"tmux select-layout -t ses:win2 even-horizontal",
|
|
|
|
"tmux attach -d -t ses:",
|
|
|
|
"tmux kill-window -t ses:smug_def",
|
|
|
|
|
|
|
|
"tmux move-window -r -s ses: -t ses:",
|
|
|
|
|
|
|
|
"tmux attach -d -t ses:win1",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
[]string{
|
|
|
|
|
|
|
|
"tmux kill-session -t ses",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
"xyz",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Config{
|
|
|
|
|
|
|
|
Session: "ses",
|
|
|
|
|
|
|
|
Root: "root",
|
|
|
|
|
|
|
|
Windows: []Window{
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Name: "win1",
|
|
|
|
|
|
|
|
Manual: false,
|
|
|
|
|
|
|
|
Root: "./win1",
|
|
|
|
|
|
|
|
Panes: []Pane{
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Root: "pane1",
|
|
|
|
|
|
|
|
Type: "vertical",
|
|
|
|
|
|
|
|
Commands: []string{
|
|
|
|
|
|
|
|
"command1",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
Options{},
|
|
|
|
|
|
|
|
Context{},
|
|
|
|
|
|
|
|
[]string{
|
|
|
|
|
|
|
|
"tmux has-session -t ses:",
|
|
|
|
|
|
|
|
"tmux new -Pd -s ses -n smug_def -c root",
|
|
|
|
|
|
|
|
"tmux neww -Pd -t ses: -n win1 -c root/win1",
|
|
|
|
|
|
|
|
"tmux select-layout -t ses:win1 even-horizontal",
|
|
|
|
|
|
|
|
"tmux split-window -Pd -t ses:win1 -c root/win1/pane1 -v",
|
|
|
|
|
|
|
|
"tmux send-keys -t ses:win1.1 command1 Enter",
|
|
|
|
|
|
|
|
"tmux kill-window -t ses:smug_def",
|
|
|
|
|
|
|
|
"tmux move-window -r -s ses: -t ses:",
|
|
|
|
|
|
|
|
"tmux attach -d -t ses:win1",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
[]string{
|
|
|
|
[]string{
|
|
|
|
"tmux kill-session -t ses",
|
|
|
|
"tmux kill-session -t ses",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"xyz",
|
|
|
|
"xyz",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Config{
|
|
|
|
Config{
|
|
|
|
Session: "ses",
|
|
|
|
Session: "ses",
|
|
|
|
Root: "root",
|
|
|
|
Root: "root",
|
|
|
|
BeforeStart: []string{"command1", "command2"},
|
|
|
|
BeforeStart: []string{"command1", "command2"},
|
|
|
|
|
|
|
|
Windows: []Window{
|
|
|
|
|
|
|
|
{Name: "win1"},
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Options{},
|
|
|
|
Options{},
|
|
|
|
Context{},
|
|
|
|
Context{},
|
|
|
@ -168,13 +227,22 @@ var testTable = []struct {
|
|
|
|
Config{
|
|
|
|
Config{
|
|
|
|
Session: "ses",
|
|
|
|
Session: "ses",
|
|
|
|
Root: "root",
|
|
|
|
Root: "root",
|
|
|
|
|
|
|
|
Windows: []Window{
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Name: "win1",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Options{Attach: true},
|
|
|
|
Options{Attach: true},
|
|
|
|
Context{InsideTmuxSession: true},
|
|
|
|
Context{InsideTmuxSession: true},
|
|
|
|
[]string{
|
|
|
|
[]string{
|
|
|
|
"tmux has-session -t ses:",
|
|
|
|
"tmux has-session -t ses:",
|
|
|
|
"tmux new -Pd -s ses -n -c root",
|
|
|
|
"tmux new -Pd -s ses -n smug_def -c root",
|
|
|
|
"tmux switch-client -t ses:",
|
|
|
|
"tmux neww -Pd -t ses: -n win1 -c root",
|
|
|
|
|
|
|
|
"tmux select-layout -t ses:win1 even-horizontal",
|
|
|
|
|
|
|
|
"tmux kill-window -t ses:smug_def",
|
|
|
|
|
|
|
|
"tmux move-window -r -s ses: -t ses:",
|
|
|
|
|
|
|
|
"tmux switch-client -t ses:win1",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
[]string{
|
|
|
|
[]string{
|
|
|
|
"tmux kill-session -t ses",
|
|
|
|
"tmux kill-session -t ses",
|
|
|
@ -190,7 +258,9 @@ var testTable = []struct {
|
|
|
|
Context{InsideTmuxSession: true},
|
|
|
|
Context{InsideTmuxSession: true},
|
|
|
|
[]string{
|
|
|
|
[]string{
|
|
|
|
"tmux has-session -t ses:",
|
|
|
|
"tmux has-session -t ses:",
|
|
|
|
"tmux new -Pd -s ses -n -c root",
|
|
|
|
"tmux new -Pd -s ses -n smug_def -c root",
|
|
|
|
|
|
|
|
"tmux kill-window -t ses:smug_def",
|
|
|
|
|
|
|
|
"tmux move-window -r -s ses: -t ses:",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
[]string{
|
|
|
|
[]string{
|
|
|
|
"tmux kill-session -t ses",
|
|
|
|
"tmux kill-session -t ses",
|
|
|
@ -201,6 +271,9 @@ var testTable = []struct {
|
|
|
|
Config{
|
|
|
|
Config{
|
|
|
|
Session: "ses",
|
|
|
|
Session: "ses",
|
|
|
|
Root: "root",
|
|
|
|
Root: "root",
|
|
|
|
|
|
|
|
Windows: []Window{
|
|
|
|
|
|
|
|
{Name: "win1"},
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Options{Attach: true},
|
|
|
|
Options{Attach: true},
|
|
|
|
Context{InsideTmuxSession: true},
|
|
|
|
Context{InsideTmuxSession: true},
|
|
|
|