Skip to content

Commit 4373cc2

Browse files
mrjoedangjoshmedeski
authored andcommitted
Fix command flag
1 parent 781fa82 commit 4373cc2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

connector/tmux.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ func tmuxStrategy(c *RealConnector, name string) (model.Connection, error) {
1818
func connectToTmux(c *RealConnector, connection model.Connection, opts model.ConnectOpts) (string, error) {
1919
if connection.New {
2020
c.tmux.NewSession(connection.Session.Name, connection.Session.Path)
21-
c.startup.Exec(connection.Session)
21+
if opts.Command != "" {
22+
c.tmux.SendKeys(connection.Session.Name, opts.Command)
23+
} else {
24+
c.startup.Exec(connection.Session)
25+
}
2226
}
2327
return c.tmux.SwitchOrAttach(connection.Session.Name, opts)
2428
}

0 commit comments

Comments
 (0)