dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 1cbb80d9ae29b4beb3674ddc918ad28d9defd04b
parent f59bd54e81aea5921203eb36016d37cbdbefce32
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Fri,  9 Jul 2021 17:02:56 +0200

git: make ctags hook also generate Emacs tag file (etags)

Diffstat:
Mgit/git_template/hooks/ctags | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/git/git_template/hooks/ctags b/git/git_template/hooks/ctags @@ -1,8 +1,14 @@ -#!/usr/bin/env bash +#!/bin/sh set -e PATH="/usr/local/bin:$PATH" -dir="`git rev-parse --git-dir`" +dir="$(git rev-parse --git-dir)" trap 'rm -f "$dir/$$.tags"' EXIT +# vim ctags git ls-files | \ ctags --tag-relative=yes -L - -f "$dir/$$.tags" mv "$dir/$$.tags" "$dir/tags" + +# emacs etags +git ls-files | \ + ctags --tag-relative=yes -L - -f "$dir/$$.tags" +mv "$dir/$$.tags" "$dir/etags"