diff --git a/config.go b/config.go index f45136b..841cd93 100644 --- a/config.go +++ b/config.go @@ -38,7 +38,7 @@ type Config struct { func addDefaultEnvs(c *Config, path string) { c.Env["SMUG_SESSION"] = c.Session - c.Env["SMUG_SESSION_NAME"] = c.Session + c.Env["SMUG_SESSION_CONFIG_PATH"] = path } func EditConfig(path string) error { diff --git a/main.go b/main.go index 02a6d2f..e004004 100644 --- a/main.go +++ b/main.go @@ -87,15 +87,8 @@ func main() { var configPath string if options.Config != "" { configPath = options.Config - } else if options.Project != "" { - configPath = filepath.Join(userConfigDir, options.Project+".yml") } else { - s, err := tmux.SessionName() - if err != nil { - fmt.Fprintln(os.Stderr, err.Error()) - os.Exit(1) - } - configPath = filepath.Join(userConfigDir, s+".yml") + configPath = filepath.Join(userConfigDir, options.Project+".yml") } switch options.Command {