Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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

share|improve this answer
    
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. –  Mark Feb 14 '13 at 19:56
    
You don't want ctags as part of that path, just /usr/local/bin –  Mark Feb 14 '13 at 20:08
1  
You need to open a new shell window to execute the changes to ~/.bash_profile. –  Mark Feb 14 '13 at 20:12
    
That should work. –  Mark Feb 14 '13 at 20:13
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.