GTAGS.CONF(5)

πŸ’– GTAGS.CONF ✨

okay bestie, gather round, because this is the page for gtags.conf(5) β€” it lives in the File Formats Manual section of the manual because it's literally a file format, and it's the whole config vibe for GNU Global. no cap. 🫢


🌸 NAME 🌸

gtags.conf β€” the configuration data for GNU Global, periodt πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

gtags.conf
~/.globalrc

like. those are the files. that's the energy. πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

so gtags.conf holds the configuration data for global(1), gozilla(1), gtags(1) and htags(1). all four of them go hunting for these files in this exact order, and they read from the first one that exists and is readable. first come first served, no arguments. πŸ‘‘

  1. --gtagsconf file
  2. $GTAGSCONF
  3. [project root]/gtags.conf
  4. [project root]/[objdir]/gtags.conf
  5. $HOME/.globalrc
  6. /etc/gtags.conf
  7. [sysconfdir]/gtags.conf

[sysconfdir] is /usr/local/etc by default, but you can change it with the --sysconfdir option of the configure script. and [objdir] is obj by default, and you can switch that up with GTAGSOBJDIR or MAKEOBJDIR. slay. ✨

its syntax is giving termcap(5) energy β€” similar and all β€” except for some extra extensions described later. iykyk. a file includes one or more records, and you pick a record using a label. the default label is default. and if GTAGSLABEL is set, then its value is what gets used instead. but bestie, please be aware: the meaning of default here is different from the meaning of default in termcap(5). don't get it twisted. 😭

lines starting with # are ignored, bye. πŸ™ˆ a record consists of one or more fields separated by : and it ends with a newline. the first field must have a label name. every field after that has a variable definition. and there are three types of those variables:

  • Boolean β€” this type has no value; existence of the variable means true, otherwise false. it's giving "i'm here so yes." πŸ’…
  • Number β€” this type has a number value after #.
  • String β€” this type has a string value after =. most variables are relevant to string type, they're the main characters honestly.

if the data includes : or a newline, you need to quote it with \. and an empty field is permitted, but... it doesn't make sense. like bestie why. πŸ’€

when there's more than one definition, the previous one is the one that gets adopted. exception though β€” all values of skip, langmap and gtags_parser are adopted and connected respectively. those three ate and left no crumbs. πŸ”₯

🧚 Variable substitution 🧚

variable substitution similar to sh(1) is available, and you can refer to any string variable using a $ prefix. so like, for example, the following b has a value of XYZ:

:a=Y:b=X${a}Z:

see how that works? iconic. πŸ’œ

🌈 Including another record 🌈

tc is a special variable β€” it reads in the definitions in another record. it's similar to the tc of termcap(5). its syntax is as follows:

tc=label[@file]

if only a label is given, tc is read from a record specified by the label in the same file. if @file is also given, then tc is read from a record specified by the label in the specified file. that file should be an absolute path, and it should not include variables, okay? πŸ“Œ and different from termcap(5) β€” you can use tc anytime, anywhere. no scheduling needed. πŸ’«


πŸ‘‘ CONFIGURATION πŸ‘‘

about variables for each command, please see each manual β€” i'm not gonna spoiler them for you. πŸŽ€

you can use the following environment variables as a string variable. if these variables are set, then environment variables of the same name are set before command execution. ✨

  • GREP_COLOR
  • GREP_COLORS
  • GTAGSBLANKENCODE
  • GTAGSCACHE
  • GTAGSFORCECPP
  • GTAGSGLOBAL
  • GTAGSGTAGS
  • GTAGSLIBPATH
  • GTAGSLOGGING
  • GTAGSTHROUGH
  • GTAGS_OPTIONS
  • HTAGS_OPTIONS
  • MAKEOBJDIR
  • MAKEOBJDIRPREFIX
  • TMPDIR

the following variables are also available as a string variable. by default, each of them has a directory path given by the configure script. πŸ¦‹

  • bindir
  • datadir
  • libdir
  • libexecdir
  • localstatedir
  • sysconfdir

⭐ ENVIRONMENT ⭐

the following environment variables affect the execution of the commands. vibe check them before you run anything. πŸ”₯

  • GTAGSCONF β€” if this variable is set, its value is used as a configuration file.
  • GTAGSLABEL β€” if this variable is set, its value is used as a label of the configuration file. the default is default.

🌸 SEE ALSO 🌸

global(1), gozilla(1), gtags(1), htags(1).

GNU Global source code tag system (http://www.gnu.org/software/global/).


πŸ’– HISTORY πŸ’–

the gtags.conf file appeared in Global-3.0 (1998). a true vintage icon, honestly. πŸŽ€


and that's the whole page, bestie!! this is GNU Project's gtags.conf(5) from Nov 2015 β€” GNU Project, Nov 2015, mwah. go configure something gorgeous. πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from
  • arch rolling: global 6.7-1 Β· BSD-3-Clause AND GPL-2.0-only AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LicenseRef-CALDERA AND LicenseRef-PD AND MIT
  • fedora 44: global 6.7-1.fc44 Β· GPL-3.0-or-later and LGPL-2.0-or-later and LGPL-2.1-or-later and BSD-3-Clause and MIT and LicenseRef-Fedora-Public-Domain and blessing and GFDL-1.2-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms