From a3a14f168ecf0638470ab8467e1e7ff11582a94e Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Thu, 27 Oct 2022 11:58:06 -0700 Subject: [PATCH] ctags (and update xcode ignores) --- .config/git/ignore | 18 +++--------------- .git_templates/hooks/ctags | 11 ++++++----- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/.config/git/ignore b/.config/git/ignore index fee115e..daf04c8 100644 --- a/.config/git/ignore +++ b/.config/git/ignore @@ -5,8 +5,9 @@ # scratch scratch.* -# vim -doc/tags +# ctags +.ctags.d +tags # direnv *.envrc @@ -19,17 +20,4 @@ doc/tags .DS_Store # Xcode -build/* -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -*.xcworkspace -!default.xcworkspace xcuserdata -profile -*.moved-aside diff --git a/.git_templates/hooks/ctags b/.git_templates/hooks/ctags index 44cd3be..6f09de9 100755 --- a/.git_templates/hooks/ctags +++ b/.git_templates/hooks/ctags @@ -1,8 +1,9 @@ #!/bin/sh + +# Overrides for --exclude and --languages can be put into .ctags.d/*.ctags + set -e PATH="/usr/local/bin:$PATH" -dir="`git rev-parse --git-dir`" -trap 'rm -f "$dir/$$.tags"' EXIT -git ls-files | \ - ctags --tag-relative -L - -f"$dir/$$.tags" # --languages=-javascript,sql -mv "$dir/$$.tags" "$dir/tags" +trap 'rm -f "$$.tags"' EXIT +git ls-files | ctags --tag-relative -L - -f"$$.tags" +mv "$$.tags" "tags"