#!/bin/bash ROOT=$(git rev-parse --show-toplevel) find $ROOT -name '*.py' | xargs etags -o ${ROOT}/TAGS if [ -n "$VIRTUAL_ENV" ]; then find ${VIRTUAL_ENV}/lib -name '*.py' |xargs etags -a -o ${ROOT}/TAGS else echo "No Virtual env enabled, will not add it to TAGS" fi