diff --git a/connector/connect.go b/connector/connect.go index 5accd21..243732e 100644 --- a/connector/connect.go +++ b/connector/connect.go @@ -24,6 +24,7 @@ func (c *RealConnector) Connect(name string, opts model.ConnectOpts) (string, er "tmux": connectToTmux, "tmuxinator": connectToTmuxinator, "config": connectToTmux, + "dir": connectToTmux, "zoxide": connectToTmux, } diff --git a/connector/tmux.go b/connector/tmux.go index ea619eb..376ff6f 100644 --- a/connector/tmux.go +++ b/connector/tmux.go @@ -12,15 +12,13 @@ func tmuxStrategy(c *RealConnector, name string) (model.Connection, error) { Session: session, New: false, AddToZoxide: true, - // Switch: true }, nil } func connectToTmux(c *RealConnector, connection model.Connection, opts model.ConnectOpts) (string, error) { if connection.New { - return c.tmux.SwitchOrAttach(connection.Session.Name, opts) + c.tmux.NewSession(connection.Session.Name, connection.Session.Path) + c.startup.Exec(connection.Session) } - c.tmux.NewSession(connection.Session.Name, connection.Session.Path) - c.startup.Exec(connection.Session) return c.tmux.SwitchOrAttach(connection.Session.Name, opts) }