ctagsexuberant-ctags

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.


Solution

  • 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.