Command not being run in Linux
azer opened this issue · comments
Reflex is able to watch files for changes but it doesn't run the commands in my Linux computer. Here is the verbose output of a simple ./bin/reflex -v -g '.' echo {}
command:
λ ./bin/reflex -v -g '.' echo {}
Globals set at commandline
| --glob (-g) '[.]' (default: '[]')
| --verbose (-v) 'true' (default: 'false')
+---------
Reflex from [commandline]
| ID: 0
| Inverted regex match: "(^|/)\\.git/"
| Inverted regex match: "(^|/)\\.hg/"
| Inverted regex match: "~$"
| Inverted regex match: "\\.swp$"
| Inverted regex match: "\\.#"
| Inverted regex match: "(^|/)#.*#$"
| Inverted regex match: "(^|/)\\.DS_Store$"
| Glob match: "."
| Substitution symbol {}
| Command: [echo <filename>]
+---------
[info] fsnotify event: "./Makefile": WRITE
-g '.'
means you're using the glob pattern .
, which only matches files named .
(i.e. the current directory). Normally with -g
you'd use a pattern like *.c
or something. If you want to try out reflex with any kind of file then you could use, for instance, -r '.'
.
Closing since I don't think there's a problem here. Leave a comment if you disagree.
I meant to watch for changes in the current directory though.
Yeah, but that's not how -g
works. The glob pattern has to match the file that's changing. If you want to match any regular file in the current directory you could use -g '*'
.