Add swap content option

This commit is contained in:
2025-07-16 22:01:26 +02:00
parent 84bdc73900
commit d5319e18e2
7 changed files with 179 additions and 43 deletions

View File

@ -46,6 +46,8 @@ func watchAction(ctx *cli.Context) error {
}
for _, p := range opts.Watch.Paths {
w.Ignore(filepath.Join(p, ".git"))
if err := w.AddRecursive(p); err != nil {
fmt.Println(err.Error())
os.Exit(1)
@ -56,7 +58,7 @@ func watchAction(ctx *cli.Context) error {
for {
select {
case event := <-w.Event:
fmt.Printf("File %s changed\n", event.Name())
fmt.Printf("File %s changed\n", event.Path)
pipeline(opts)
case err := <-w.Error:
fmt.Println(err.Error())