I started getting this weird line every time I open a new terminal tab.

3='cd -3'
ruby-2.1.5 ➜  /Volumes/dev_directory

It started about a month ago and I've looked in the



where else can I look for it?

  • What shell are you using? If bash have you looked at /etc/bashrc /etc/profile, and the files in /etc/bash_completion.d? – Anthon Jun 23 '15 at 8:17
  • Try env SHELLOPTS=xtrace /path/to/Terminal – Stéphane Chazelas Jun 23 '15 at 8:27
  • @StéphaneChazelas Or just $SHELL -x. – n.st Jun 23 '15 at 8:45
  • @n.st. We don't know how that "Terminal" implementation starts the $SHELL. It may very well start it as a login shell. In which case, bash -lx may be better. – Stéphane Chazelas Jun 23 '15 at 8:58
  • @n.st, env SHELLOPTS=xtrace can also be useful in that it activates xtrace also for bash scripts (and on OS/X sh is bash) called from those bashrc files. – Stéphane Chazelas Jun 23 '15 at 10:33

That output looks a lot like something called alias with fewer parameters than intended.
Try running

echo | $SHELL -ix | grep alias

to find whatever is printing the annoying line, then grep for that in your home directory, /etc, perhaps /usr/share, and wherever else you might have put something that influences your shell.

(As for that command: -x prints a trace of all commands that are executed, and -i ensures you get a login shell (i.e. your shell's rc and profile files are loaded) even though input is coming from a pipe.)

  • yeah, that was it, an alias I've added to sublime text 3... thanks – Ohad Perry Jun 23 '15 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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