0

I have an issue where every terminal I open up has the first line:

$home/.zshrc:1: command not found:
followed by whatever I have as the first line in my .zshrc file. (See "What changes to a .zshrc file could cause every terminal one opens to output: '@home/.zshrc:1: command not found: xyz'?" and "Why doesn't 'sourcing' my .zshrc file change my aliases?".)

A few people have asked if there is potentially anything buggy in my .zshenv or .zprofile file, but I don't have either of them anywhere on my system. I do have a .bash_profile, could that file be functioning as a .zprofile?

  • What's the output of sed -n 'l;q' ~/.zshrc? Possibly it has a trailing CR character as would happen if you had edited it on a Microsoft operating system. – Stéphane Chazelas Feb 1 at 12:42
  • Your question is also not very clear. If that first line of that .zshrc invokes a function, then yes, that won't work unless that function has been declared or marked for autoloading earlier. – Stéphane Chazelas Feb 1 at 12:45
  • You appear to be discussing one of the questioner's other two questions, M. Chazelas. It already has an answer, note. – JdeBP Feb 1 at 17:22
  • @JdeBP is correct. The other question is substantially more thorough than this one as well, so I will delete this thread, unless anyone expresses a reason not to, within 24 hours. – Grant Feb 1 at 22:07

Your Answer

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

Browse other questions tagged or ask your own question.