cespare / reflex

Run a command when files change

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

multiple globs doesn't seem to work

bburdette opened this issue · comments

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'

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'

Duplicate of #35.