1

PLEASE HELP! changed order of oh-my-zsh in ~/.zrshrc lines (put them at the end of the file due to some other req from anoter software), saved, closed and reopen terminal and for each command excecuting termnial or iterm - there's the same error response!! even simple command do not work and generate the same output.

upon openning the terminal i see those lines (before typing anything):

nvm:7: command not found: tr
nvm:7: command not found: tr
/Users/user/.oh-my-zsh/oh-my-zsh.sh:69: command not found: rm
compdump:136: command not found: mv
detect-clipboard:33: command not found: uname
/Users/user/.rvm/scripts/rvm:12: command not found: uname
/Users/user/.rvm/scripts/rvm:29: command not found: ps
spaceship_jobs:3: command not found: awk                                        
spaceship_jobs:3: command not found: wc
spaceship_jobs:3: command not found: tr

tried :

nano .zshrc

output:

spaceship_exec_time_preexec_hook:2: command not found: date zsh: command not found: nano spaceship_jobs:3: command not found: awk spaceship_jobs:3: command not found: wc spaceship_jobs:3: command not found: tr

tried: nano .bash_profile

output:

spaceship_exec_time_preexec_hook:2: command not found: date zsh: command not found: nano spaceship_jobs:3: command not found: awk spaceship_jobs:3: command not found: wc spaceship_jobs:3: command not found: tr

even simple ls command: output:

spaceship_exec_time_preexec_hook:2: command not found: date zsh: command not found: ls spaceship_jobs:3: command not found: awk spaceship_jobs:3: command not found: wc spaceship_jobs:3: command not found: tr

using macOS bigsur 11.4

thanks

  • Obviously you have messed up your `path` variable. I don't know what you are doing in your `.zshrc`, so I can't recommend much. If you have screwed it up completely, it is perhaps better to recreate it from scratch, as if you would do on a new account, or maybe from your last stable backup (you **do** backup your files, don't you?). An alternative would be to put a `echo $path[*]` at the start of your .zshrc and then start a new shell with `/usr/bin/zsh -lx` and inspect the trace for debugging. – user1934428 Dec 29 '21 at 07:55
  • From the error messages, the _preexec_ hook seems to be broken, so you could also start to comment out this. I would even comment out everything which pertains to oh-my-zsh, just to give you a stable system again. – user1934428 Dec 29 '21 at 07:57

0 Answers0