Merge pull request #90 from Calinou/update-env-variable-documentation

Update the environment variable documentation in README
This commit is contained in:
Félix Saparelli 2018-08-19 20:45:11 +12:00 committed by GitHub
commit 83a3e3b085
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 4 deletions

View File

@ -25,8 +25,14 @@ Example use cases:
* Support for filtering/ignoring events based on glob patterns
* Launches child processes in a new process group
* Sets the following environment variables in the child process:
* `$WATCHEXEC_UPDATED_PATH` the path of the first file that triggered a change
* `$WATCHEXEC_COMMON_PATH` the longest common path of all of the files that triggered a change
* If a single file changed (depending on the event type):
* `$WATCHEXEC_CREATED_PATH`, the path of the file that was created
* `$WATCHEXEC_REMOVED_PATH`, the path of the file that was removed
* `$WATCHEXEC_RENAMED_PATH`, the path of the file that was renamed
* `$WATCHEXEC_WRITTEN_PATH`, the path of the file that was modified
* `$WATCHEXEC_META_CHANGED_PATH`, the path of the file whose metadata changed
* If multiple files changed:
* `$WATCHEXEC_COMMON_PATH`, the longest common path of all of the files that triggered a change
* Optionally clears screen between executions
* Optionally restarts the command with every modification (good for servers)
* Does not require a language runtime