1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>ctags-faq — Universal Ctags 0.3.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/classic.css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="ctags-lang-iPythonCell" href="ctags-lang-iPythonCell.7.html" />
<link rel="prev" title="ctags-client-tools" href="ctags-client-tools.7.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="ctags-lang-iPythonCell.7.html" title="ctags-lang-iPythonCell"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="ctags-client-tools.7.html" title="ctags-client-tools"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Universal Ctags 0.3.0 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="../man-pages.html" accesskey="U">Man pages</a> »</li>
<li class="nav-item nav-item-this"><a href="">ctags-faq</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="ctags-faq">
<span id="ctags-faq-7"></span><h1><a class="toc-backref" href="#id2">ctags-faq</a><a class="headerlink" href="#ctags-faq" title="Permalink to this headline">¶</a></h1>
<p>Universal Ctags FAQ</p>
<dl class="field-list simple">
<dt class="field-odd">Version</dt>
<dd class="field-odd"><p>5.9.0</p>
</dd>
<dt class="field-even">Manual group</dt>
<dd class="field-even"><p>Universal Ctags</p>
</dd>
<dt class="field-odd">Manual section</dt>
<dd class="field-odd"><p>7</p>
</dd>
</dl>
<p>This is the Universal Ctags FAQ (Frequently-Asked Questions).
It is based on <a class="reference external" href="http://ctags.sourceforge.net/faq.html">Exuberant Ctags FAQ</a></p>
<div class="contents topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#ctags-faq" id="id2">ctags-faq</a></p>
<ul>
<li><p><a class="reference internal" href="#description" id="id3">DESCRIPTION</a></p>
<ul>
<li><p><a class="reference internal" href="#what-is-the-difference-between-universal-ctags-and-exuberant-ctags" id="id4">What is the difference between Universal Ctags and Exuberant Ctags?</a></p></li>
<li><p><a class="reference internal" href="#how-can-i-avoid-having-to-specify-my-favorite-option-every-time" id="id5">How can I avoid having to specify my favorite option every time?</a></p></li>
<li><p><a class="reference internal" href="#what-are-these-strange-bits-of-text-beginning-with-which-follow-many-of-the-lines-in-the-tag-file" id="id6">What are these strange bits of text beginning with <code class="docutils literal notranslate"><span class="pre">;"</span></code> which follow many of the lines in the tag file?</a></p></li>
<li><p><a class="reference internal" href="#why-can-t-i-jump-to-class-member" id="id7">Why can’t I jump to <code class="docutils literal notranslate"><span class="pre">class::member</span></code>?</a></p></li>
<li><p><a class="reference internal" href="#why-do-i-end-up-on-the-wrong-line-when-i-jump-to-a-tag" id="id8">Why do I end up on the wrong line when I jump to a tag?</a></p></li>
<li><p><a class="reference internal" href="#how-do-i-jump-to-the-tag-i-want-instead-of-the-wrong-one-by-the-same-name" id="id9">How do I jump to the tag I want instead of the wrong one by the same name?</a></p></li>
<li><p><a class="reference internal" href="#how-can-i-locate-all-references-to-a-specific-function-or-variable" id="id10">How can I locate all references to a specific function or variable?</a></p></li>
<li><p><a class="reference internal" href="#why-does-appending-tags-to-a-tag-file-tag-so-long" id="id11">Why does appending tags to a tag file tag so long?</a></p></li>
<li><p><a class="reference internal" href="#how-should-i-set-up-tag-files-for-a-multi-level-directory-hierarchy" id="id12">How should I set up tag files for a multi-level directory hierarchy?</a></p></li>
<li><p><a class="reference internal" href="#does-universal-ctags-support-unicode-file-names" id="id13">Does Universal Ctags support Unicode file names?</a></p></li>
<li><p><a class="reference internal" href="#why-does-zsh-cause-zsh-no-matches-found-error" id="id14">Why does zsh cause “zsh: no matches found” error?</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#see-also" id="id15">SEE ALSO</a></p></li>
<li><p><a class="reference internal" href="#author" id="id16">AUTHOR</a></p></li>
</ul>
</li>
</ul>
</div>
<section id="description">
<h2><a class="toc-backref" href="#id3">DESCRIPTION</a><a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<section id="what-is-the-difference-between-universal-ctags-and-exuberant-ctags">
<h3><a class="toc-backref" href="#id4">What is the difference between Universal Ctags and Exuberant Ctags?</a><a class="headerlink" href="#what-is-the-difference-between-universal-ctags-and-exuberant-ctags" title="Permalink to this headline">¶</a></h3>
<p>Universal Ctags is an unofficial fork of Exuberant Ctags.
The differences are summarized in <a class="reference internal" href="ctags-incompatibilities.7.html#ctags-incompatibilities-7"><span class="std std-ref">ctags-incompatibilities(7)</span></a> man page.</p>
<p>The most notable one is that Universal Ctags doesn’t read <code class="docutils literal notranslate"><span class="pre">~/.ctags</span></code> file.
Instead, it reads <code class="docutils literal notranslate"><span class="pre">*.ctags</span></code> under <code class="docutils literal notranslate"><span class="pre">~/.ctags.d</span></code> directory.</p>
</section>
<section id="how-can-i-avoid-having-to-specify-my-favorite-option-every-time">
<h3><a class="toc-backref" href="#id5">How can I avoid having to specify my favorite option every time?</a><a class="headerlink" href="#how-can-i-avoid-having-to-specify-my-favorite-option-every-time" title="Permalink to this headline">¶</a></h3>
<p>Either by setting the environment variable <code class="docutils literal notranslate"><span class="pre">CTAGS</span></code> to your custom
options, or putting them into a <code class="docutils literal notranslate"><span class="pre">~/.ctags.d/anyname.ctags</span></code> file in your home
directory.</p>
</section>
<section id="what-are-these-strange-bits-of-text-beginning-with-which-follow-many-of-the-lines-in-the-tag-file">
<h3><a class="toc-backref" href="#id6">What are these strange bits of text beginning with <code class="docutils literal notranslate"><span class="pre">;"</span></code> which follow many of the lines in the tag file?</a><a class="headerlink" href="#what-are-these-strange-bits-of-text-beginning-with-which-follow-many-of-the-lines-in-the-tag-file" title="Permalink to this headline">¶</a></h3>
<p>These are <em>extension flags</em>. They are added in order to provide extra
information about the tag that may be utilized by the editor in order to
more intelligently handle tags. They are appended to the EX command part of
the tag line in a manner that provides backwards compatibility with existing
implementations of the Vi editor. The semicolon is an EX command separator
and the double quote begins an EX comment. Thus, the extension flags appear
as an EX comment and should be ignored by the editor when it processes the
EX command.</p>
<p>Some non-vi editors, however, implement only the bare minimum of EX commands
in order to process the search command or line number in the third field of
the tag file. If you encounter this problem, use the option <code class="docutils literal notranslate"><span class="pre">--format=1</span></code> to
generate a tag file without these extensions (remember that you can set the
CTAGS environment variable to any default arguments you wish to supply). Then
ask the supplier of your editor to implement handling of this feature of EX
commands.</p>
</section>
<section id="why-can-t-i-jump-to-class-member">
<h3><a class="toc-backref" href="#id7">Why can’t I jump to <code class="docutils literal notranslate"><span class="pre">class::member</span></code>?</a><a class="headerlink" href="#why-can-t-i-jump-to-class-member" title="Permalink to this headline">¶</a></h3>
<p>Because, by default, ctags only generates tags for the separate identifiers
found in the source files. If you specify the <code class="docutils literal notranslate"><span class="pre">--extra=+q</span></code> option, then
ctags will also generate a second, class-qualified tag for each class member
(data and function/method) in the form <code class="docutils literal notranslate"><span class="pre">class::member</span></code> for C++, and in the form
<code class="docutils literal notranslate"><span class="pre">class.method</span></code> for Eiffel and Java.</p>
</section>
<section id="why-do-i-end-up-on-the-wrong-line-when-i-jump-to-a-tag">
<h3><a class="toc-backref" href="#id8">Why do I end up on the wrong line when I jump to a tag?</a><a class="headerlink" href="#why-do-i-end-up-on-the-wrong-line-when-i-jump-to-a-tag" title="Permalink to this headline">¶</a></h3>
<p>By default, ctags encodes the line number in the file where macro (<code class="docutils literal notranslate"><span class="pre">#define</span></code>)
tags are found. This was done to remain compatible with the original UNIX
version of ctags. If you change the file containing the tag without
rebuilding the tag file, the location of tag in the tag file may no longer
match the current location.</p>
<p>In order to avoid this problem, you can specify the option <code class="docutils literal notranslate"><span class="pre">--excmd=p</span></code>,
which causes ctags to use a search pattern to locate macro tags. I have
never uncovered the reason why the original UNIX ctags used line numbers
exclusively for macro tags, but have so far resisted changing the default
behavior of Exuberant (and Universal) Ctags to behave differently.</p>
</section>
<section id="how-do-i-jump-to-the-tag-i-want-instead-of-the-wrong-one-by-the-same-name">
<h3><a class="toc-backref" href="#id9">How do I jump to the tag I want instead of the wrong one by the same name?</a><a class="headerlink" href="#how-do-i-jump-to-the-tag-i-want-instead-of-the-wrong-one-by-the-same-name" title="Permalink to this headline">¶</a></h3>
<p>A tag file is simple a list of tag names and where to find them. If there
are duplicate entries, you often end up going to the wrong one because the
tag file is sorted and your editor locates the first one in the tag file.</p>
<p>Standard Vi provides no facilities to alter this behavior. However, Vim
has some nice features to minimize this problem, primarily by examining all
matches and choosing the best one under the circumstances. Vim also provides
commands which allow for selection of the desired matching tag.</p>
</section>
<section id="how-can-i-locate-all-references-to-a-specific-function-or-variable">
<h3><a class="toc-backref" href="#id10">How can I locate all references to a specific function or variable?</a><a class="headerlink" href="#how-can-i-locate-all-references-to-a-specific-function-or-variable" title="Permalink to this headline">¶</a></h3>
<p>There are several packages already available which provide this capability.
Namely, these are: GLOBAL source code tag system, GNU id-utils, cscope,
and cflow. As of this writing, they can be found in the following locations:</p>
<ul class="simple">
<li><p>GLOBAL: <a class="reference external" href="http://www.gnu.org/software/global">http://www.gnu.org/software/global</a></p></li>
<li><p>id-utils: <a class="reference external" href="http://www.gnu.org/software/idutils/idutils.html">http://www.gnu.org/software/idutils/idutils.html</a></p></li>
<li><p>cscope: <a class="reference external" href="http://cscope.sourceforge.net">http://cscope.sourceforge.net</a></p></li>
<li><p>cflow: <a class="reference external" href="ftp://www.ibiblio.org/pub/Linux/devel/lang/c">ftp://www.ibiblio.org/pub/Linux/devel/lang/c</a></p></li>
</ul>
</section>
<section id="why-does-appending-tags-to-a-tag-file-tag-so-long">
<h3><a class="toc-backref" href="#id11">Why does appending tags to a tag file tag so long?</a><a class="headerlink" href="#why-does-appending-tags-to-a-tag-file-tag-so-long" title="Permalink to this headline">¶</a></h3>
<p>Sometimes, in an attempt to build a global tag file for all source files in
a large source tree of many directories, someone will make an attempt to run
ctags in append (<code class="docutils literal notranslate"><span class="pre">-a</span></code>) mode on every directory in the hierarchy. Each time
ctags is invoked, its default behavior is to sort the tag file once the tags
for that execution have been added. As the cumulative tag file grows, the sort
time increases arithmetically.</p>
<p>The best way to avoid this problem (and the most efficient) is to make
use of the <code class="docutils literal notranslate"><span class="pre">--recurse</span></code> (or <code class="docutils literal notranslate"><span class="pre">-R</span></code>) option of ctags by executing the following
command in the root of the directory hierarchy (thus running ctags only once):</p>
<blockquote>
<div><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>ctags -R
</pre></div>
</div>
</div></blockquote>
<p>If you really insist on running ctags separately on each directory, you can
avoid the sort pass each time by specifying the option <code class="docutils literal notranslate"><span class="pre">--sort=no</span></code>. Once the
tag file is completely built, use the sort command to manually sort the
final tag file, or let the final invocation of ctags sort the file.</p>
</section>
<section id="how-should-i-set-up-tag-files-for-a-multi-level-directory-hierarchy">
<h3><a class="toc-backref" href="#id12">How should I set up tag files for a multi-level directory hierarchy?</a><a class="headerlink" href="#how-should-i-set-up-tag-files-for-a-multi-level-directory-hierarchy" title="Permalink to this headline">¶</a></h3>
<p>There are a few ways of approaching this:</p>
<ol class="arabic simple">
<li><p>A local tag file in each directory containing only the tags for source
files in that directory.</p></li>
<li><p>One single big, global tag file present in the root directory of your
hierarchy, containing all tags present in all source files in the
hierarchy.</p></li>
<li><p>A local tag file in each directory containing only the tags for source
files in that directory, in addition to one single global tag file
present in the root directory of your hierarchy, containing all
non-static tags present in all source files in the hierarchy.</p></li>
<li><p>A local tag file in each directory of the hierarchy, each one
containing all tags present in source files in that directory and all
non-static tags in every directory below it (note that this implies
also having one big tag file in the root directory of the hierarchy).</p></li>
</ol>
<p>Each of these approaches has its own set of advantages and disadvantages,
depending upon your particular conditions. Which approach is deemed best
depends upon the following factors:</p>
<ol class="upperalpha">
<li><p>The ability of your editor to use multiple tag files.</p>
<p>If your editor cannot make use of multiple tag files (original vi
implementations could not), then one large tag file is the only way to
go if you ever desire to jump to tags located in other directories. If
you never need to jump to tags in another directory (i.e. the source
in each directory is entirely self-contained), then a local tag file
in each directory will fit your needs.</p>
</li>
<li><p>The time is takes for your editor to look up a tag in the tag file.</p>
<p>The significance of this factor depends upon the size of your source
tree and on whether the source files are located on a local or remote
file system. For source and tag files located on a local file system,
looking up a tag is not as big a hit as one might first imagine, since
vi implementations typically perform a binary search on a sorted tag
file. This may or may not be true for the editor you use. For files
located on a remote file system, reading a large file is an expensive
operation.</p>
</li>
<li><p>Whether or not you expect the source code to change and the time it
takes to rebuild a tag file to account for changes to the source code.</p>
<p>While Universal Ctags is particularly fast in scanning source code
(around 1-2 MB/sec), a large project may still result in objectionable
delays if one wishes to keep their tag file(s) up to date on a
frequent basis, or if the files are located on a remote file system.</p>
</li>
<li><p>The presence of duplicate tags in the source code and the ability to
handle them.</p>
<p>The impact of this factor is influenced by the following three issues:</p>
<ol class="arabic">
<li><p>How common are duplicate tags in your project?</p></li>
<li><p>Does your editor provide any facilities for dealing with duplicate
tags?</p>
<p>While standard vi does not, many modern vi implementations, such
as Vim have good facilities for selecting the desired match from
the list of duplicates. If your editor does not support duplicate
tags, then it will typically send you to only one of them, whether
or not that is the one you wanted (and not even notifying you that
there are other potential matches).</p>
</li>
<li><p>What is the significance of duplicate tags?</p>
<p>For example, if you have two tags of the same name from entirely
isolated software components, jumping first to the match found
in component B while working in component A may be entirely
misleading, distracting or inconvenient (to keep having to choose
which one if your editor provides you with a list of matches).
However, if you have two tags of the same name for parallel builds
(say two initialization routines for different hosts), you may
always want to specify which one you want.</p>
</li>
</ol>
</li>
</ol>
<p>Of the approaches listed above, I tend to favor Approach 3. My editor of
choice is Vim, which provides a rich set of features for handling multiple
tag files, which partly influences my choice. If you are working with
source files on a remote file system, then I would recommend either
Approach 3 or Approach 4, depending upon the hit when reading the global
tag file.</p>
<p>The advantages of Approach 3 are many (assuming that your editor has
the ability to support both multiple tag files and duplicate tags). All
lookups of tag located in the current directory are fast and the local
tag file can be quickly and easily regenerated in one second or less
(I have even mapped a keystroke to do this easily). A lookup of a
(necessarily non-static) tag found in another directory fails a lookup in
the local tag file, but is found in the global tag file, which satisfies
all cross-directory lookups. The global tag file can be automatically
regenerated periodically with a cron job (and perhaps the local tag files
also).</p>
<p>Now I give an example of how you would implement Approach 3. Means of
implementing the other approaches can be performed in a similar manner.</p>
<p>Here is a visual representation of an example directory hierarchy:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>project
`-----misccomp
| `...
`-----sysint
`-----client
| `-----hdrs
| `-----lib
| `-----src
| `-----test
`-----common
| `-----hdrs
| `-----lib
| `-----src
| `-----test
`-----server
`-----hdrs
`-----lib
`-----src
`-----test
</pre></div>
</div>
<p>Here is a recommended solution (conceptually) to build the tag files:</p>
<ol class="arabic">
<li><p>Within each of the leaf nodes (i.e. <code class="docutils literal notranslate"><span class="pre">hdrs</span></code>, <code class="docutils literal notranslate"><span class="pre">lib</span></code>, <code class="docutils literal notranslate"><span class="pre">src</span></code>, <code class="docutils literal notranslate"><span class="pre">test</span></code>) build a tag
file using “<code class="docutils literal notranslate"><span class="pre">ctags</span> <span class="pre">*.[ch]</span></code>”. This can be easily be done for the whole
hierarchy by making a shell script, call it <code class="docutils literal notranslate"><span class="pre">dirtags</span></code>, containing the
following lines:</p>
<blockquote>
<div><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/bin/sh</span>
<span class="nb">cd</span> <span class="nv">$1</span>
ctags *
</pre></div>
</div>
</div></blockquote>
<p>Now execute the following command:</p>
<blockquote>
<div><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>find * -type d -exec dirtags <span class="o">{}</span> <span class="se">\;</span>
</pre></div>
</div>
</div></blockquote>
<p>These tag files are trivial (and extremely quick) to rebuild while
making changes within a directory. The following Vim key mapping is
quite useful to rebuild the tag file in the directory of the current
source file:</p>
<blockquote>
<div><div class="highlight-text notranslate"><div class="highlight"><pre><span></span>:nmap ,t :!(cd %:p:h;ctags *.[ch])&<CR><CR>
</pre></div>
</div>
</div></blockquote>
</li>
<li><p>Build the global tag file:</p>
<blockquote>
<div><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> ~/project
ctags --file-scope<span class="o">=</span>no -R
</pre></div>
</div>
</div></blockquote>
<p>thus constructing a tag file containing only non-static tags for all
source files in all descendent directories.</p>
</li>
<li><p>Configure your editor to read the local tag file first, then consult
the global tag file when not found in the local tag file. In Vim,
this is done as follows:</p>
<blockquote>
<div><div class="highlight-text notranslate"><div class="highlight"><pre><span></span>:set tags=./tags,tags,~/project/tags
</pre></div>
</div>
</div></blockquote>
</li>
</ol>
<p>If you wish to implement Approach 4, you would need to replace the
<code class="docutils literal notranslate"><span class="pre">dirtags</span></code> script of step 1 with the following:</p>
<blockquote>
<div><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/bin/sh</span>
<span class="nb">cd</span> <span class="nv">$1</span>
ctags *
<span class="c1"># Now append the non-static tags from descendent directories</span>
find * -type d -prune -print <span class="p">|</span> ctags -aR --file-scope<span class="o">=</span>no -L-
</pre></div>
</div>
</div></blockquote>
<p>And replace the configuration of step 3 with this:</p>
<blockquote>
<div><div class="highlight-text notranslate"><div class="highlight"><pre><span></span>:set tags=./tags;$HOME,tags
</pre></div>
</div>
</div></blockquote>
<p>As a caveat, it should be noted that step 2 builds a global tag file whose
file names will be relative to the directory in which the global tag file
is being built. This takes advantage of the Vim <code class="docutils literal notranslate"><span class="pre">tagrelative</span></code> option,
which causes the path to be interpreted a relative to the location of the
tag file instead of the current directory. For standard vi, which always
interprets the paths as relative to the current directory, we need to
build the global tag file with absolute path names. This can be
accomplished by replacing step 2 with the following:</p>
<blockquote>
<div><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> ~/project
ctags --file-scope<span class="o">=</span>no -R <span class="sb">`</span><span class="nb">pwd</span><span class="sb">`</span>
</pre></div>
</div>
</div></blockquote>
</section>
<section id="does-universal-ctags-support-unicode-file-names">
<h3><a class="toc-backref" href="#id13">Does Universal Ctags support Unicode file names?</a><a class="headerlink" href="#does-universal-ctags-support-unicode-file-names" title="Permalink to this headline">¶</a></h3>
<p>Yes, Unicode file names are supported on unix-like platforms (Linux, macOS,
Cygwin, etc.).</p>
<p>However, on Windows, you need to use Windows 10 version 1903 or later to use
Unicode file names. (This is an experimental feature, though.) On older versions
on Windows, Universal Ctags only support file names represented in the current
code page. If you still want to use Unicode file names on them, use Cygwin or
MSYS2 version of Universal Ctags as a workaround.</p>
</section>
<section id="why-does-zsh-cause-zsh-no-matches-found-error">
<h3><a class="toc-backref" href="#id14">Why does zsh cause “zsh: no matches found” error?</a><a class="headerlink" href="#why-does-zsh-cause-zsh-no-matches-found-error" title="Permalink to this headline">¶</a></h3>
<p>zsh causes error on the following cases;</p>
<blockquote>
<div><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>ctags --extra<span class="o">=</span>+* ...
ctags --exclude<span class="o">=</span>foo/* ...
</pre></div>
</div>
</div></blockquote>
<p>This is the 2nd most significant incompatibility <em>feature</em> of zsh.</p>
<p>Cited from “Z-Shell Frequently-Asked Questions”, “<a class="reference external" href="http://zsh.sourceforge.net/FAQ/zshfaq02.html">2.1: Differences from sh and
ksh</a>”;</p>
<blockquote>
<div><p>… The next most classic difference is that unmatched glob patterns cause
the command to abort; set <code class="docutils literal notranslate"><span class="pre">NO_NOMATCH</span></code> for those.</p>
</div></blockquote>
<p>You may add “<code class="docutils literal notranslate"><span class="pre">setopt</span> <span class="pre">nonomatch</span></code>” on your <code class="docutils literal notranslate"><span class="pre">~/.zshrc</span></code>. Or you can escape glob
patterns with backslash;</p>
<blockquote>
<div><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>ctags --extra<span class="o">=</span>+<span class="se">\*</span> ...
ctags --exclude<span class="o">=</span>foo/<span class="se">\*</span> ...
</pre></div>
</div>
</div></blockquote>
<p>Or quote them;</p>
<blockquote>
<div><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>ctags <span class="s1">'--extra=+*'</span> ...
ctags <span class="s1">'--exclude=foo/*'</span> ...
</pre></div>
</div>
</div></blockquote>
</section>
</section>
<section id="see-also">
<h2><a class="toc-backref" href="#id15">SEE ALSO</a><a class="headerlink" href="#see-also" title="Permalink to this headline">¶</a></h2>
<p>The official Universal Ctags web site at:</p>
<p><a class="reference external" href="https://ctags.io/">https://ctags.io/</a></p>
<p><a class="reference internal" href="ctags.1.html#ctags-1"><span class="std std-ref">ctags(1)</span></a>, <a class="reference internal" href="tags.5.html#tags-5"><span class="std std-ref">tags(5)</span></a></p>
</section>
<section id="author">
<h2><a class="toc-backref" href="#id16">AUTHOR</a><a class="headerlink" href="#author" title="Permalink to this headline">¶</a></h2>
<p>This FAQ is based on <a class="reference external" href="http://ctags.sourceforge.net/faq.html">Exuberant Ctags FAQ</a> by
Darren Hiebert and <a class="reference external" href="mailto:vberthoux%40users.sourceforge.net">vberthoux<span>@</span>users<span>.</span>sourceforge<span>.</span>net</a></p>
<p>Universal Ctags project: <a class="reference external" href="https://ctags.io/">https://ctags.io/</a></p>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">ctags-faq</a><ul>
<li><a class="reference internal" href="#description">DESCRIPTION</a><ul>
<li><a class="reference internal" href="#what-is-the-difference-between-universal-ctags-and-exuberant-ctags">What is the difference between Universal Ctags and Exuberant Ctags?</a></li>
<li><a class="reference internal" href="#how-can-i-avoid-having-to-specify-my-favorite-option-every-time">How can I avoid having to specify my favorite option every time?</a></li>
<li><a class="reference internal" href="#what-are-these-strange-bits-of-text-beginning-with-which-follow-many-of-the-lines-in-the-tag-file">What are these strange bits of text beginning with <code class="docutils literal notranslate"><span class="pre">;"</span></code> which follow many of the lines in the tag file?</a></li>
<li><a class="reference internal" href="#why-can-t-i-jump-to-class-member">Why can’t I jump to <code class="docutils literal notranslate"><span class="pre">class::member</span></code>?</a></li>
<li><a class="reference internal" href="#why-do-i-end-up-on-the-wrong-line-when-i-jump-to-a-tag">Why do I end up on the wrong line when I jump to a tag?</a></li>
<li><a class="reference internal" href="#how-do-i-jump-to-the-tag-i-want-instead-of-the-wrong-one-by-the-same-name">How do I jump to the tag I want instead of the wrong one by the same name?</a></li>
<li><a class="reference internal" href="#how-can-i-locate-all-references-to-a-specific-function-or-variable">How can I locate all references to a specific function or variable?</a></li>
<li><a class="reference internal" href="#why-does-appending-tags-to-a-tag-file-tag-so-long">Why does appending tags to a tag file tag so long?</a></li>
<li><a class="reference internal" href="#how-should-i-set-up-tag-files-for-a-multi-level-directory-hierarchy">How should I set up tag files for a multi-level directory hierarchy?</a></li>
<li><a class="reference internal" href="#does-universal-ctags-support-unicode-file-names">Does Universal Ctags support Unicode file names?</a></li>
<li><a class="reference internal" href="#why-does-zsh-cause-zsh-no-matches-found-error">Why does zsh cause “zsh: no matches found” error?</a></li>
</ul>
</li>
<li><a class="reference internal" href="#see-also">SEE ALSO</a></li>
<li><a class="reference internal" href="#author">AUTHOR</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="ctags-client-tools.7.html"
title="previous chapter">ctags-client-tools</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="ctags-lang-iPythonCell.7.html"
title="next chapter">ctags-lang-iPythonCell</a></p>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="ctags-lang-iPythonCell.7.html" title="ctags-lang-iPythonCell"
>next</a> |</li>
<li class="right" >
<a href="ctags-client-tools.7.html" title="ctags-client-tools"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Universal Ctags 0.3.0 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="../man-pages.html" >Man pages</a> »</li>
<li class="nav-item nav-item-this"><a href="">ctags-faq</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2015, Universal Ctags Team.
Last updated on 11 Jun 2021.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.0.2.
</div>
</body>
</html>
|