Skip to content

Instantly share code, notes, and snippets.

@placek
Created October 26, 2022 14:00
Show Gist options
  • Save placek/5e087bd006e764f20d4867a27dab4048 to your computer and use it in GitHub Desktop.
Save placek/5e087bd006e764f20d4867a27dab4048 to your computer and use it in GitHub Desktop.
git hooks ctags
#!/usr/bin/env bash
set -eux
root="$(git rev-parse --show-toplevel)"
dir="$root/$(git rev-parse --git-dir)"
trap 'rm -f "$dir/$$.tags"' EXIT
hasktags -cxRf "$dir/$$.tags" "$root"
mv "$dir/$$.tags" "$dir/tags"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment