0

After migrating my Macbook Air M1 to my new Macbook Air M2 using the Migration Assistant, my zsh Terminal seems broken in a strange way.

The terminal is set to run the script ~/.zshrc on startup. This script was migrated from the old machine, where it worked flawlessly.

On the new machine, a new Terminal always opens with [Process completed], and I'm not able to do anything in it.

So I opened ~/.zshrc in an editor and removed everything. Opening a terminal now results in

[Command not found: ~/.zshrc]

[Could not create a new process and open a pseudo-tty.]

(Uh, what? An empty file counts as a "Command not found"?)

Then I added echo "hello" to the file:

hello

[Process completed]

Why do I get [Process completed]? In similar questions, the problem could be solved by emptying the ~/.zshrc contents.

But I get the problem even if the contents of the ~/.zshrc file are trivial.

2
  • Ah, just noticed: "The terminal is set to run the script ~/.zshrc on startup": What do you mean with that, did you add something specific to Terminal for this?
    – nohillside
    Aug 5 at 10:03
  • @nohillside no, I just mean that if you go to the Terminal Preferences, you see ~/.zshrc in the "Shell opens with" --> "Command (complete path):" textbox.
    – cheesus
    Aug 5 at 11:08

1 Answer 1

1

You don't need to specify .zshrc in Terminal Preferences. Just set it to either the default shell or to the path of your shell binary.

enter image description here

2
  • Thanks! Strange that this worked on my Macbook Air M1, but not on the new M2 one.
    – cheesus
    Aug 5 at 11:37
  • @cheesus Strange indeed. But glad I could help.
    – nohillside
    Aug 5 at 11:43

You must log in to answer this question.

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