0

I recently downloaded iTerm 3 and I have this issue where it automatically cd's in a certain directory when I type the name.

So for example, I want to run grunt, but there's a grunt directory. So when I type grunt, it doesnt run the CLI command, but it automatically cd's into the grunt directory. How can I turn that off?

For example (output of my console):

~ → cd Desktop/dir1
dir1 → ls
dir2
dir1 → dir2
dir2 →

when I type dir2, it should not automatically assume I want to cd right?

Angelo A
  • 2,744
  • 6
  • 28
  • 37
  • would you like to share more details ? The current working directory when you type grunt, and what happens if you type './grunt' ? – sel-fish Jun 13 '16 at 00:07
  • it seems that it's a settings in my OS X machine. This behaviour also appears on the normal Terminal. What I just want: I dont want the terminal to assume I want to CD in a directory when I type only a directory name. – Angelo A Jun 13 '16 at 09:51
  • can you copy your operations and the output to the body of question ? It seems a setting in ''com.googlecode.iterm2.plist". – sel-fish Jun 13 '16 at 09:56
  • @sel-fish see my edits – Angelo A Jun 13 '16 at 11:21
  • I'm afraid this behavior has nothing to do with iTerm, but caused by your zsh... – sel-fish Jun 13 '16 at 11:44

1 Answers1

1

I'm afraid this behavior has nothing to do with iTerm, but caused by zsh.
You can turn it off by execute:

unsetopt AUTO_cd

There is a related question here.

Community
  • 1
  • 1
sel-fish
  • 4,308
  • 2
  • 20
  • 39