Skip to content

Commit 5e998c7

Browse files
authored
feat: use filepath matching to support wildcard matching for startup scripts (#81)
1 parent e003271 commit 5e998c7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tmux/tmux.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"log"
77
"os"
88
"os/exec"
9+
"path/filepath"
910
"strings"
1011

1112
"github.com/joshmedeski/sesh/config"
@@ -132,7 +133,8 @@ func execStartupScript(name string, scriptPath string) error {
132133

133134
func getStartupScript(sessionPath string, config *config.Config) string {
134135
for _, script := range config.StartupScripts {
135-
if dir.FullPath(script.SessionPath) == sessionPath {
136+
match, _ := filepath.Match(dir.FullPath(script.SessionPath), sessionPath)
137+
if match {
136138
return dir.FullPath(script.ScriptPath)
137139
}
138140
}

0 commit comments

Comments
 (0)