I've download ctags from Homebrew, which was installed in /usr/local/bin/ctags. Currently I have an older version of 'ctags' which is located in /usr/bin/ctags/.

I want the new version to be the default when executing ctags via the Terminal.

How can that be achieved?


The safest way is to make sure /usr/local/bin comes before /usr/bin in your $PATH variable.

  • what is the safest way to change the $PATH variable? – Anonymous Feb 14 '13 at 19:54
  • 1
    It should be set in your shell config file (.profile, .bashrc for bash, .zshrc or .zshenv for zsh, etc...) You probably just need to rearrange the order of the folders. Assuming bash: look for a line that starts "export PATH=…" The delimiter between the folder names is a colon. – Ɱark Ƭ Feb 14 '13 at 19:56
  • You don't want ctags as part of that path, just /usr/local/bin – Ɱark Ƭ Feb 14 '13 at 20:08
  • 1
    You need to open a new shell window to execute the changes to ~/.bash_profile. – Ɱark Ƭ Feb 14 '13 at 20:12
  • That should work. – Ɱark Ƭ Feb 14 '13 at 20:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .