cespare / reflex

Run a command when files change
MIT License
3.38k stars 136 forks source link

multiple globs doesn't seem to work #66

Closed bburdette closed 3 years ago

bburdette commented 5 years ago

I have a little build script that compiles a rust program. I want reflex to rebuild whenever files in src or example/src change. I can set up globs for each case, but it doesn't work with both together.

# this doesn't work.
# reflex -g 'example/src/*.rs' -g 'src/*.rs' -s -- sh -c 'cd example && clear && cargo build'

# this works.
reflex -g 'src/*.rs' -s -- sh -c 'cd example && clear && cargo build'

# this one works also.
# reflex -g 'example/src/*.rs' -s -- sh -c 'cd example && clear && cargo build'
bburdette commented 5 years ago

Another problem I ran in to here was that a glob that includes a parent directory doesn't work. For instance, this one:

[nix-shell:~/code/touchpage/example]$ reflex -g '../src/*.rs' -- sh 'clear && cargo build'

paddatrapper commented 4 years ago

See #35

cespare commented 3 years ago

Duplicate of #35.