Skip to content

Instantly share code, notes, and snippets.

@sergeyt
Created July 4, 2016 13:49
Show Gist options
  • Save sergeyt/b8315d0736359b9f895d35d7ccc47f3b to your computer and use it in GitHub Desktop.
Save sergeyt/b8315d0736359b9f895d35d7ccc47f3b to your computer and use it in GitHub Desktop.
helper bash function to run any script on any change in current directory
watch() { while inotifywait --exclude .swp -e modify -r .; do $@; done; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment