Skip to content

Commit

Permalink
Watch: allow changing directory
Browse files Browse the repository at this point in the history
  • Loading branch information
rakoo committed Mar 5, 2024
1 parent ff0314d commit 335b6af
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions acme/Watch/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,16 @@ func runBackground(id int) {
}

cmd := exec.Command(rc, "-c", string(line))
windows, err := acme.Windows()
if err == nil {
// TODO at least log it
for _, w := range windows {
if win.ID() == w.ID {
cmd.Dir = path.Dir(w.Name)
break
}
}
}
r, w, err := os.Pipe()
if err != nil {
log.Fatal(err)
Expand Down

0 comments on commit 335b6af

Please sign in to comment.