Support ~ in globs

This commit is contained in:
2025-04-01 11:29:00 +02:00
parent 5a31703840
commit 633eebfd2a

View File

@@ -110,6 +110,7 @@ func AggregateGlobs(commands []ModifyCommand) map[string]struct{} {
globs := make(map[string]struct{}) globs := make(map[string]struct{})
for _, command := range commands { for _, command := range commands {
for _, glob := range command.Files { for _, glob := range command.Files {
glob = strings.Replace(glob, "~", os.Getenv("HOME"), 1)
globs[glob] = struct{}{} globs[glob] = struct{}{}
} }
} }