ctags --version not working on macOs

Created on 29 Jun 2018  ·  6Comments  ·  Source: universal-ctags/ctags

I have installed the latest version via home-brew and when you do ctags --version you get:

➜ ctags --version
ctags: Warning: Ignoring non-option in CTAGS variable
ctags: --version option may not follow a file name

This is causing other programs which use this to detect Universal Ctags to fail

Most helpful comment

or could you try

    $ unset CTAGS
    $ ctags --version

if you use bash or zsh.

All 6 comments

Could you show me the output of

   $ echo $CTAGS

on the same environment where you run ctags --version.

➜ echo $CTAGS
/usr/local/bin

or could you try

    $ unset CTAGS
    $ ctags --version

if you use bash or zsh.

That made it work:

Universal Ctags 0.0.0(c3bd6bb), Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Jun 28 2018, 11:46:56
  URL: https://ctags.io/
  Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +case-insensitive-filenames

Should I add the unset to my .zshrc ?

Should I add the unset to my .zshrc ?

I don't know.

See the description of CTAGS in ctags.1 man page.
Someone sets the value to the variable for some reasons.
The impact of clearing the variable is not clear for me.

It would seem it was my fault had export CTAGS=/usr/local/bin in my .zshrc with a comment next to it that I did this to force brew version of ctags to be used.

Removed this from my .zshrc and is all working.

Good catch that it was related to this and thanks for your time and help.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kristijanhusak picture kristijanhusak  ·  19Comments

masatake picture masatake  ·  47Comments

cweagans picture cweagans  ·  13Comments

hucan7 picture hucan7  ·  19Comments

EvanCarroll picture EvanCarroll  ·  14Comments