dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit c738b320aa77fed1d1a2e11527a166b3799eddbe
parent 6fb21fa20bf3747cbc36a1a76249fa62f390b10a
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon, 16 Nov 2020 15:08:28 +0100

.profile: add wrapper for ctags(1) recursion

Diffstat:
M.profile | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/.profile b/.profile @@ -178,6 +178,17 @@ video_screenshot() { alias julia-fast='julia --procs 1 --optimize=3 --math-mode=fast' +# .[cfh] are POSIX, the rest is implementation specific +ctags_recurse() { + f="$(mktemp)" + find ${1:-.} -type f \ + -iname '*.c' -o -iname '*.h' -o -iname '*.f' -o \ + -iname '*.cc' -o -iname '*.cxx' -o -iname '*.cpp' -o \ + -iname '*.hh' -o -iname '*.hxx' -o -iname '*.hpp' > "$f" + rm -f tags + while read -r; do ctags -a "$REPLY"; done < "$f" +} + addtopath() { for d in "$@"; do if [ -d "$d" ]; then