(FYI: The OS is macOS Big Sur (11.6))
I tried to customize the ZSH terminal shell (e.g. prompt, auto-completion behavior) by editing the ZSH files, but failed. I have tried both the following, and none worked:
1. Edit ~/.zshrc:
- Edit
~/.zshrc
:
When I tried to edit the (blank) file (even under the sudo command), I got the following error message: ".zshrc" E166: Can't open linked file for writing (similar problem happens when trying on.zshenv
. - Edit
/etc/zshrc
:
This worked, until the computer restarted and resets the file.
When I tried to edit the (blank) file (even under the sudo command), I got the following error message: ".zshrc" E166: Can't open linked file for writingWhat is the correct way to deal with this? (similar problem happens when trying on .zshenv
2. Edit /etc/zshrc
This worked, until the computer restarted and resets the file.
What is the correct way to deal with this? Thank you very much! N.B.: I'm running macOS Big Sur 11.6.