cristianoliveira / funzzy

A lightweight blazingly fast file watcher.
MIT License
237 stars 11 forks source link

feat: allow reading environment variables for paths #159

Open cristianoliveira opened 4 months ago

cristianoliveira commented 4 months ago

Just an idea I had while having to debug nix builds and there was issues with permissions

- name: task with absolute path @valid
  run:
    - "echo 'this file has changed: {{filepath}}'"
  change: 
    - "/tmp/fzz/accepts_full_or_relativepaths.txt"
    - "/tmp/fzz/accepts_full_or_relativepaths2.txt"
    - "examples/workdir/**/*"
  ignore: 
    - "examples/workdir/ignored/**/*.txt"

And I would like to set env virable to watch different paths

- name: task with absolute path @valid
  run:
    - "echo 'this file has changed: {{filepath}}'"
  change: 
    - "$MY_CUSTOM_PATH/fzz/accepts_full_or_relativepaths.txt"
    - "{{MY_VARIABLE?}}/fzz/accepts_full_or_relativepaths2.txt"
    - "examples/workdir/**/*"
  ignore: 
    - "examples/workdir/ignored/**/*.txt"