1

I am using exuberant ctags command line tool.

% ctags --version
Exuberant Ctags 5.9~svn20110310, Copyright (C) 1996-2009 Darren Hiebert

I would like to get a list of the regex definitions that ctags will use when indexing files.
For example I can see what languages ctags supports with:

% ctags --list-languages
BETA
C
C++
C#
Cobol
DosBatch
Eiffel
Erlang
Flex
Fortran
Go
HTML [disabled]
Java
JavaScript
Ruby
Scheme
Sh
SLang

Im interested in Sh, so I can see what file extensions will trigger ctags will look for Sh identifiers with:

% ctags --list-maps=Sh
Sh       *.sh *.SH *.bsh *.bash *.ksh *.zsh

Now I would like an output of the regex definition mappings for the Sh language, e.g. Im looking for something like:

ctags --list-definitions=Sh

and it would hopefully print something like

--regex-sh=/function[ \t]*([A-Za-z0-9._$()]+)[ \t]*\(/\1/F,function,functions/
--regex-sh=/^[ \t]*(local)?[ \t]*([A-Za-z0-9_-]+)=/\2/v,variable,variables/

Is this possible with ctags?

2

short: it doesn't do that.

long: nothing like that is in the manual page.

There's no point in asking for a new feature, since it's not been touched for a while (see website). There is another website promoting itself as a "maintained ctags", but a quick read of its manual page shows little difference (none of what you're looking for).

If it's important, keep in mind that these projects are self-service: if you need a feature, you might get it faster if you do the work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.