Since I want to keep my macOS repo always updated, I made a macro to open the README file in Sublime Text so I can quickly make a change, save and the change will instantly be commited with
update readme message.
The Hazel rule for this is simple and looks like this:
With this as the shell script:
Here it is in code:
git add README.md git commit -m "update readme" git push
To have Hazel know about commands I installed with Nix. I need to run this code first in the shell script:
export USER=nikitavoloboev if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' fi
If you want to have your rules to be applied onto subfolders as well as the directory chosen, add this rule.
If extensions are hidden, don't add extensions in the rule editor too.