# ctags and exuberent ctags like options



## bhargava (Mar 16, 2011)

Hi,

I've ctags-5.8  installed on my system. I used  

```
ctags -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q .
```
 with vim on linux with exuberant ctags. But using this on the FreeBSD system with ctags-5.8 gives me  


```
ctags: illegal option -- R
usage: ctags [-BFTaduwvx] [-f tagsfile] file ...
```

Questions:
1. is the ctags-5.8 same as the exuberant ctags (I do not think so)
2. How can I get the above behaviour with this version of ctags (c++ code).
3. How can I install exuberant ctags (I could not find in the ports.)

Thank you.


----------



## DutchDaemon (Mar 16, 2011)

```
[/usr/ports/devel/ctags] $ less pkg-descr                                                                                                     
[B]Exuberant Ctags[/B] generates an index (or tag) file of source language
objects in source files that allows these items to be quickly and
easily located by a text editor or other utility.

Alternatively, it can generate a cross reference file which lists,
in human-readable form, information about the various objects found
in a set of source code files.

Supported languages include: Assembler, ASP, AWK, BETA, C, C++, C#,
COBOL, Eiffel, Fortran, HTML, Java, Javascript, Lisp, Lua, Make,
Pascal, Perl, PHP, PL/SQL, Python, REXX, Ruby, S-Lang, Scheme, Shell
(Bourne/Korn/Z), Standard ML, Tcl, Vera, Verilog, Vim and Yacc.

WWW:    http://ctags.sourceforge.net/
```

ctags(1) tells you the options. There's also a *ctags* in base, BTW (/usr/bin/ctags - ctags(1))


----------



## bhargava (Mar 16, 2011)

DutchDaemon said:
			
		

> There's also a *ctags* in base, BTW (/usr/bin/ctags - ctags(1))



Oh, I did not know that the ctags came with the base system. I just thought I installed it from the port. Also is there a command which tells me whether the program is from the base or from the ports.

Thank you.


----------



## SirDice (Mar 16, 2011)

bhargava said:
			
		

> Also is there a command which tells me whether the program is from the base or from the ports.


That's simple. Everything in /usr/local/(bin|sbin)/ is installed by a port. /bin/, /sbin/, /usr/bin/, /usr/sbin/ are part of the base.


----------



## DutchDaemon (Mar 16, 2011)

So run [cmd=]which ctags[/cmd] and you'll see which one is used by default.


----------



## bhargava (Mar 16, 2011)

Thank you SirDice and DutchDaemon.


----------



## Brahma (Apr 14, 2016)

Dear Bhargav,

How can run ctags  with Cscope?  I tried with same and facing following mentioned error. 
Please share commands to run ctags successfully


----------

