Skip to content

Instantly share code, notes, and snippets.

@romainl
Last active March 14, 2024 14:05
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save romainl/5f943706f33ee657f9ba4556c55d4760 to your computer and use it in GitHub Desktop.
Save romainl/5f943706f33ee657f9ba4556c55d4760 to your computer and use it in GitHub Desktop.
Run ctags upon file change/addition/deletion in a Git repository
#!/usr/bin/env sh
# Requirements:
# git: https://git-scm.com/downloads
# entr: http://eradman.com/entrproject/
# ctags: http://ctags.sourceforge.net/ (Exuberant Ctags) or https://ctags.io/ (Universal Ctags)
# Usage:
# $ cd my_project
# $ ctagsd
while true; do
git ls-files --modified --exclude-standard --others | entr -dnp ctags -R .;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment