The following UNIX one-liner looks for Python files below the CWD and adds them to a TAGS file for Emacs (or we could do the same with Ctags).
find . -name *.py -print | xargs etags
This breaks if the CWD has a space or other unusual character in its name. -print0 or -ls don’t seem to help, in spite of what man find says. Is there a neat way around this?
should do the trick — you need the
-0arg to xargs to match the-print0properly.edit
you probably need the quotes around
*.pyas well, if there are any .py files in the current directory.