title: How to make trigger command using watchman?
body: <p>Hi I will be using watchman to upload images. The images will have folders so I will be using <code>.json</code> to make the command.</p>
  
  <p>These are my images:</p>
  
  <pre><code>/home/user/Documents/Images/folder1/image1.png
  /home/user/Documents/Images/folder2/image2.png
  </code></pre>
  
  <p>I have a list of export environment variables <code>watchman_env</code></p>
  
  <pre><code>export CONDA_ENV=image_uploader
  export IMG_FOLDER=/home/user/Documents/Images
  export UPLOADER_SCRIPT=/home/user/Documents/Script/uploader.sh
  export PYTHON_UPLOADER=/home/user/Documents/Script/img_uploader.py
  export JSON_TRIGGER=/home/user/Documents/Script/uploader.json
  </code></pre>
  
  <p>This is my uploader script, <code>~/Script/uploader.sh</code></p>
  
  <pre><code>. watchman_env
  conda run -n $CONDA_ENV python $PYTHON_UPLOADER $IMG_FOLDER
  </code></pre>
  
  <p>This is my json configuration, <code>~/Script/uploader.json</code>:</p>
  
  <pre><code>["trigger", "/home/user/Documents/Images", {
    "name": "img_uploader",
    "expression": ["match", "**/*.png"],
    "command": ["/home/user/Documents/Script/uploader.sh"]
  }]
  </code></pre>
  
  <p>I run the command using another bash file, <code>init.sh</code>, since I want to run some few more commands.</p>
  
  <pre><code>. watchman_env
  watchman --json-command &lt; $JSON_TRIGGER
  </code></pre>
  
  <p>When I run <code>uploader.sh</code> my python script uploads the two images. However, when I run <code>init.sh</code>, it does not trigger. What is wrong with my code? And is that correctly how to use json trigger?</p>
  
  <p>wathman version: 4.9.0</p>