Question

I have Exuberant Ctags 5.8 and i'm trying to ignore the .build directory in: packages/ANY/.build. I'm also using ZSH via the oh-my-zsh addon.

I've tried using --exclude=packages/*/.build/, but I just get a
zsh: no matches found: --exclude=packages/*/.build/

The full command i'm using is:
ctags -R --exclude=node_modules --exclude=.meteor --exclude=packages/*/.build/

If I ls the same pattern with ls packages/*/.build/ then I get a list of each .build directory contents.

Is this a limitation of ctags?

Was it helpful?

Solution

You have to quote the * else it is interpreted by the shell. Here zsh tries to find files matching --exclude=packages/*/.build, which of course do not exist.

So this should do the trick:

ctags -R --exclude=node_modules --exclude=.meteor --exclude='packages/*/.build/'

Also, from ctags(1)

--exclude=[pattern]
[...] (be sure to quote the option parameter to protect the wildcards from being expanded by the shell before being passed to ctags; also be aware that wildcards can match the slash character, '/') [...]

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top