ReneFroger
ReneFroger

Reputation: 530

How specify the location of TAGS file?

I have the following parameters for the ctags:

ctags -f TAGS -e -R --langmap=php:+.inc.foo.bar --list-maps=php 

Any idea how I could specify where the TAGS-file should be placed? I found nothing about this in man ctags and ctags --help, only about which filename the TAGS file should have.

Upvotes: 3

Views: 2536

Answers (2)

Mofi
Mofi

Reputation: 49097

The file name after parameter -f can be just a file name without path, but can be also with a relative path or with an absolute path.

A Windows example:

ctags -f "C:\My Projects\ProjectX\ProjectX_tags.txt" -e -R --langmap=php:+.inc.foo.bar --list-maps=php

Double quotes are needed only if the path or file name contains a space or one of these characters &()[]{}^=;!'+,`~. The usage of surrounding " is never wrong. It can be just wrong not using surrounding " on Windows around a file name argument string depending on the characters.

Upvotes: 2

Alan Thompson
Alan Thompson

Reputation: 29958

How about something like:

ctags -f - > /path/to/final/dest/tags

so the -f - part redirects the tags file to stdout, then we use shell redirection to send it to the destination of our choice.

Upvotes: 0

Related Questions